## 3 Background and Related Works
### Overview of 6 LoWPAN Compression Solutions  
Packet compression is a fundamental technique adopted as an adaptation for several protocols in the context of constrained networks. So, minimizing packet length has a direct impact in minimizing the energy consumption of a constrained device in processing and overcoming the big differences in capabilities of IP networks and WSNs integrated into IoT. Especially, when the problem is related to traffic admission ability and the maximum possible authorized size of the protocol data unit in both networks. IPv6 requires the maximum transmission unit (MTU) to be at least 1280 octets. In contrast, IEEE 802.15.4's standard packet size is 127 octets. A maximum frame overhead of 25 octets  
Figure 1: Handshake exchanged messages of standard HIP DEX. at the media access control layer. An optional but highly recommended security feature at the link-layer poses an additional overhead. For example, 21 octets are consumed for AES-CCM-128 leaving only 81 octets for upper layers. In this context, the 6 LoWPAN adaptation layer specifies the rules of the compression and fragmentation of IPv6 datagrams so that they could safely fit in Internet-integrated WSNs. The 6 LoWPAN standard is defining header compression and fragmentation of IPv6 datagrams over IPv6-connected WSNs. The compression process consists of IP Header Compression (IPHC) and Next Header Compression (NHC). Thus, all operations of compression/decompression and fragmentation/reassembly of all exchanged IPv6 packets in both directions (incoming/outgoing) are performed by the 6 LoWPAN Border Router (6 BR). The compression technique has many important advantages and interesting features, among which we cite:  
* Minimal communication cost: reduced length of compressed packets has as consequence a lower amount of formation will be communicated;
* Lower energy consumption for the communication phase;
* Minimal packet fragmentation rates: the reduced sizes of the exchanged packets help to reduce the fragmentation frequency;
* Gain in storage space;
* Optimization of the used throughput: the removal of unnecessary bytes of information from a packet's header, data throughput will be eventually improved because significant bytes in the message will be free to contain the application data. The IPv6 protocol has a 40 bytes header that is composed of a substantial amount of compressible fields: IPv6 source and receivers addresses, length, and many others [30]. These fields are the only ones that can be compressed or removed. So, IPv6 nodes are hierarchically assigned 128 bit IP addresses, through an arbitrary length network prefix. IEEE 802.15.4 devices may use either IEEE 64 bit extended addresses or, after an association event, 16-bit addresses that are unique within a PAN. In 802.15.4, the maximum size of the PSDU (Physical layer Service Data Unit) is 127 bytes. With the 25 bytes of the MAC sub-layer (without security), this results in 102 bytes at the link level. By adding data link layer security (AES-CCM-128), only 81 bytes remain available at the IP level. We should also take into account the overhead due to the headers of IPv6 (40 bytes), any extension headers, UDP (8 bytes), or TCP (20 bytes). Finally, the user data is low (33 bytes on UDP and 21 by TCP) and does not allow respecting the IPv6 specifications which impose a minimum MTU of 1280 bytes. The compressibility must respect the rules of the 6 LoWPAN standard. The reduced, and the uncompressed fields are systematically preceded by encoding bytes to identify the protocol header and its compressible fields. The encoding bytes are generally one byte. The encoding format takes advantage of the fields that are implicitly known to all nodes in the network or can be deduced from the MAC layer. RFC 49443 defines the compression mechanism for IPv6 headers for LowPAN: LOWPAN_HC1.