# Evaluation of 6 LoWPAN Generic Header Compression in the Context of a RPL Network
## 3 Preliminaries  
6 LoWPAN is a protocol that enables the use of IPv6 in LoWPANs. LoWPANs connect to other IPv6 networks via edge routers, which manage network interconnection. The IPv6 protocol stack in 6 LoWPAN resembles a standard Internet Protocol (IP) stack, with some dissimilarities (Figure 1). At the level of the physical and MAC layers, the IP stack can run over protocols such as IEEE 802.3 (Ethernet) [16] and IEEE 802.11 (Wi-Fi) [17]. Conversely, 6 LoWPAN operates over low-power wireless links and often uses IEEE 802.15.4 as the underlying physical and MAC layer. Moreover, the 6 LoWPAN stack exclusively supports IPv6 for network layer communication and uses an adaptation layer. In a IP stack, both Internet Protocol version 4 (IPv4) and IPv6 can be used as internetworking protocols. They both count on the help of ICMP for, amongst other things, error reporting, network diagnostics and neighbour discovery [18]. In the IP stack, routing protocols, such as Open Shortest Path First (OSPF), populate the forwarding tables needed by the routers to guide IP packets in the right direction. These classic link state-based routing protocols create too much communication overhead for LoWPANs and are replaced by lightweight distance vector protocols such as the RPL, a routing protocol optimised for routing from node to sink. \begin{table}
\begin{tabular}{p{56.9 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Compression Format** & **Fragm.** & **Link Type** & **Compression** \\ \hline \multirow{4}{*}{ROHC [11]} & \multirow{4}{*}{✗} & \multirow{4}{*}{Any} & The compressor and decompressor are implemented as state machines. A shared context is maintained by both the compressor and decompressor using feedback messages, which modify the state machines of both ends. Redundancy in packet headers that can be inferred from previously transmitted packets is removed. **Only headers are compressed, not the payload**. \\ \hline \multirow{4}{*}{SCHC [9]} & \multirow{4}{*}{✓} & \multirow{4}{*}{LPWAN} & Compression is defined in terms of fields and a shared static context. The shared context is a set of rules that define how to compress and decompress fields. When both ends of the connection know the shared context, they can compress and decompress **any header or payload** as defined by the rules. \\ \hline \multirow{4}{*}{6 LoWPAN [2,3]} & \multirow{4}{*}{✓} & \multirow{4}{*}{LPWAN} & Compression is defined for IPv6 headers, IPv6 extension headers and UDP headers. Compression and decompression can be stateless or stateful. In the stateful case, address contexts are shared. **6 LoWPAN-GHC**[4] is an extension for 6 LoWPAN that allows the compression of **any header or payload** not handled by 6 LoWPAN. \\ \hline \multirow{4}{*}{MIHC [7]} & \multirow{4}{*}{✓ 1} & \multirow{4}{*}{LPWAN} & **Only the IPv6 header** is compressed. The first IPv6 header is transmitted uncompressed. Subsequent packets transmitted by the same sender and receiver use a Unique Pair Identifier (UPI) instead of the full IPv6 header. The UPI is only 8 bits long and identifies the IPv6 header. \\ \hline \hline \end{tabular}  
* It is not clear from the paper whether fragmentation is supported. We assume it uses the fragmentation mechanism as defined by 6 LoWPAN.  
\end{table} 
Table 1: Contextualisation of compression formats for IPv6 packets. In the 6 LoWPAN stack, the common choice for a transport protocol is the lightweight UDP. This protocol can undergo compression. At the application layer of the IP protocol stack, the Hypertext Transfer Protocol (HTTP) is frequently used, running over the TCP. Following a client-server model, the HTTP involves clients initiating requests to servers. For the 6 LoWPAN stack, the lightweight Constrained Application Protocol (CoAP) is the preferred option and enables a constrained sensor node to take the role of server. The CoAP serves a purpose similar to the HTTP but is specifically designed for constrained devices and low-power networks.