# SDN Architecture for 6 LoWPAN Wireless Sensor Networks
## 5 Evaluation and Results
### AMI Scenario  
In this scenario, we evaluate the communication between nodes and the 6 LBR, the most common communication in 6 LoWPAN-RPL networks. We compare the operation of an SD6 WSN shortest path application against the RPL DODAG. The location of nodes is chosen to simulate a neighborhood area network (NAN) commonly found in AMI networks [34]. There are many real AMI scenarios that use 6 LoWPAN for the communication between energy consumption meters and the meter data collector (MDC). The simulation scenario is a residential neighborhood formed by streets, with energy meters on both sides, using the grid-type topology shown in Figure 14. One can observe one 6 LBR for each street connected to a metering center containing MDC servers and SD6 WSN controllers. In this scenario, we evaluate the impact of SD6 WSNP messages by comparing the number of such messages with the number of RPL control messages. We also evaluate the average round-trip latency observed in the paths computed by RPL with that observed in the paths computed by the SD6 WSN application. The grid is formed by two parallel lines with a distance of 10 m between nodes, where Node 1 represents the 6 LBR (see Figure 15). This scenario allows variation of the number of hops in the paths by changing the transmission range of the nodes. In real scenarios, the range variation is due to several factors, among them the attenuation and reflections of the transmitted signal. The transmission range is varied using the Unit Disk Graph Medium (UDGM) model available on COOJA, setting transmission range to 25 m, 50 m, 100 m and 150 m and the interference range to twice the transmission range. The other wireless media settings in COOJA are transmission success rate to 75% and reception success rate to 100%. Figure 14: Advanced metering infrastructure (AMI) scenario. MDC, meter data collector. As described in Section 4.2, the communication between the Contiki firmware emulated in COOJA and the hosting machine occurs through an SLIP connection provided by the program \"tunslip6.c\". Figure 16 illustrates how COOJA integrates with the controller and the SD6 WSN application. The firmware of 6 LBR and motes also include the traffic generation application described in Section 5.1 and a server program that receives the traffic and returns it back. Traffic generation timings have been adjusted so that traffic starts 180 seconds after the initialization of the firmware, allowing RPL and SD6 WSN processes to stabilize, with the entire topology discovered. The paths between nodes and the 6 LBR are computed for each transmission range, which directly influences the number of neighbors of each node. The RPL and the SD6 WSN application use the ETX metric as the weight of the corresponding links, choosing the path with the lowest accumulated ETX. RPL uses a distributed protocol, while SD6 WSN uses a centralized algorithm. Figure 17 illustrates the influence of the transmission range on the number of neighbors for each node and the consequent variation of the hop number between the 6 LBR and the intermediate and the farthest nodes. In Figure 17a, for the 25-m transmission range, each node has three to six neighbors, increasing to seven to 14 neighbors for the 50-m range (Figure 17b), to 13 to 18 for the 100-m range (Figure 17c) and to 19 neighbors for the 150-m range (Figure 17d). In the latter case, all nodes have direct connectivity to the 6 LBR. In order to simulate different transmission ranges, four COOJA scripts were created in \"nogui\" mode (without the graphical interface). The produced logs contain transmission timestamps, allowing the calculation of the latency. Packets were captured by the COOJA plugin named radiologger-headless, the records of which are compatible with the Wireshark tool. For each range, the simulation is performed thirty times. Table 5 compares the number of SD6 WSNP messages with respect to RPL messages, the last being present in both cases. It can be observed that the increase caused by SD6 WSNP messages is lower for larger transmission ranges.