# Dynamic-RPL: Enhancing RPL-Based IoT Networks with Effective Support of Dynamic Topology Management
## 6 Experimentation  
There are different operation systems (OSs) customized for IoT devices with constrained resources and limited capabilities. Choices that are widely adopted are ContikiOS [31] and TinyOS [32], which provide open-source implementations. A number of the IoT devices in the market support both OSs such as Zolertia-Z1 [33]. The network stacks of these OSs are IPv6-based with the full support of 6 LowPAN and RPL. 6 LowPAN provides IP adaptation whereas IPv6-based network routing is enabled using the RPL implementation. However, ContikiOS incorporates an additional software component that supports IoT simulation development. It comes with the Cooja network simulator, which provides an effective environment for developing a wide range of RPL-based IoT simulations. It enables the emulation of a variety of IoT setups using different choices of virtual IoT modes while running the real implementation of Contiki OS. In this work, the Cooja simulator was utilized for the implementation and experimentation of the proposed solution. The implementation of the proposed solution required certain modifications to the code base of RPL in the network stack of ContikiOS. Most of these were applied to specific source files. The rpl-dag.c and rpl-icmp6.c files were modified to implement the global control messages, global-parent selection strategy, and dynamic multi-DODAG algorithm. Note that the thresholds for LD-LSI (x) and LD-Size (y) were set to the values of 85% and 7, respectively. It was considered that an acceptable performance indicator should be at least 85% and the sizes of local-DODAGs should be relatively balanced according to the total number of nodes (that made seven as the approximate value). The rpl-mrhof.c file was then modified to incorporate the implementation of LSOF. An experimental evaluation methodology was designed to study the efficiency of the proposed solution. It was based on utilizing the Cooja simulator to investigate the overall performance of the proposed solution in two experimental setups, referred to as S1 and S2. Figure 9: An example scenario of a single-DODAG Dynamic-RPL network (after running the dynamic multi-DODAG algorithm). These were designed to consider varying-scale and varying-complexity scenarios. The network in S1 was initially set up to build a single-DODAG topology of 28 nodes. S2 has a network of an initial topology formed with 45 nodes in a multi-DODAG setup. These were multi-hop network topologies established over wireless connections. The random position strategy was adopted for placing the nodes in a simulated deployment area of 300 \(\times\) 300 m.  
The Zolertia-Z1 mote implemented using Cooja was selected for all the nodes. It runs an MSP430 16-MHz MCU with 8 KB of RAM and 92 KB of flash memory. No serious issues were encountered with such limited memory capacity as it was enough to successfully accommodate the modified RPL implementation. The modes also have CC2420 transceivers, which enabled the establishment of IEEE 802.15.4 wireless connectivity. Additional configurations were also made to enable each node to run a UDP client and transmit IoT data traffic. Frequent transmissions of the data packets were set for each node at a varied transmission interval of \(\pm\)5 s. The communications were carried out using the nodes with other local nodes in addition to external destinations. In addition, different Cooja plugins were also run at each node to facilitate easy collection of the simulation data. These include the \"collect-view\" and \"powertrace\" Cooja modules, which provide experimental data regarding overall network performance and energy consumption. Other important settings were also adjusted for each node to have a communication range and interference range of 25 and 50 m, respectively. A summary of the simulation parameters is presented in Table 2.  
Four main evaluation stages were considered to achieve effective experimentation of the proposed solution.