# Evaluation of 6 LoWPAN Generic Header Compression in the Context of a RPL Network
## 5 Methodology and Measurements
### Evaluation by Means of a Simulator  
A basic simulator was developed by our research group in the context of the evaluation of the smoltcp library. A node in the simulator has a message queue for incoming frames and one for outgoing frames. Nodes have a predefined transmission range. When a node wants to transmit a frame, it puts the frame into its outgoing queue. The simulator then iterates over all these queues and puts the frames in the incoming queues of the correct receivers, only when the receiver is in transmission range of the sender. In that case, the simulator assumes a perfect frame delivery, not taking into account physical layer issues, such as interference, collision, etc. The simulator evaluates the 6 LoWPAN-GHC implementation by simulating 10 nodes, with 1 root node and 9 normal nodes. The root node will initiate and maintain the network organisation with the help of RPL control messages. The topology formed by the RPL is shown in Figure 4.  
To evaluate the implementation of 6 LoWPAN-GHC, we capture frames exchanged by the nodes during a 1-hour simulation. We run this simulation once without and once with 6 LoWPAN-GHC. The information collected during the 1-hour simulation is shown in Figure 5. Figure 4(a) shows the total number of bytes transmitted for both scenarios. The sudden increase in control traffic after 30 min of simulation time is due to the renewal of the RPL routes. This renewal happens every 30 min. We can see that the total number of bytes sent over time is less when using 6 LoWPAN-GHC. Transmitting fewer bytes means consuming less bandwidth, potentially reducing congestion. Relevant details about the RPL control packets exchanged during a 1-hour simulation are shown in Figure 4(b). A DAO control packet has the highest compression ratio, being 1.44. In the simulation, the DAO packet contained the RPL Target option and the Transit Information option. These options contain an IPv6 address or a prefix, which makes it likely that they match with parts of the dictionary and thus are compressible. The DAO packet also contains the DODAG ID, which matches partially with the dictionary. Unfortunately, the DAO contains an IPv6 Hop-by-Hop extension header, which was not compressible since it  
Figure 4: Example of an RPL network in the simulator. Node R is the root of the RPL network. The grey dashed circles represent the transmission ranges of the nodes. Figure 5: Comparison of network performance considering the number of bytes transmitted over the network and the average frame size in a RPL network with and without 6 LoWPAN-GHC. Over the period of 1 h, 7 DODAG Information Solicitation (DIS), 100 DODAG Information Object (DIO), 60 DAO and 60 DAO Acknowledgement (DAO-ACK) frames were captured. **(a)** The total number of bytes sent over the network in 1 h. The RPL topology of this network is depicted in Figure 4. **(b)** Average frame size for each RPL packet type captured over a period of 1 h, with and without 6 LoWPAN-GHC. The compression ratio is shown above the bars. did not have a match with the dictionary, nor did it have any zeros that could potentially have been compressed. DAO-ACKs have a compression ratio of 1.27. Even though the DODAG ID in the DAO-ACK can be compressed, the IPv6 Hop-by-Hop extension header cannot. The compression ratio for a DIO in our simulation is 1.34 since the DODAG ID was compressible. A DIS, an ICMPv6 packet where the content is two consecutive bytes (the Flags and Reserved fields), has a compression ratio of 1.14, where the zero bytes are represented by one bytecode. DIOs and DISs are multicast messages and their content usually remains unchanged during the lifetime of the network. When using MIHC [7] compression, where a shared context is used between a sender and a receiver node, a DIO packet would result in a total frame size of 60 bytes. This frame contains 15 bytes for the IEEE 802.15.4 frame header, 1 byte for the unique pair identifier and 44 bytes for the RPL DIO packet. Thus, the compression ratio is 1.05, compared to 1.34 when using 6 LoWPAN-GHC.