Understanding the IPv6 Extension Headers and ICMP

This is (Seventh Article) in continuation of our last one article, a new series of networking articles. In this segment, we are going to discuss the IPv6 Extension Headers (in the previous article, we have talked about normal IPv6 Headers) and also, we will try to understand the role of ICMP in networking.

IPv6 Extension Headers

It is found that several fields of IPv4 are no longer in IPv6. Notably among these are Checksum, Option and Fragmentation fields. One of the primary goals of designing IPv6 was the fast processing of packets. An error check is done at upper layers, namely TCP/UDP in IPv6. With no Option field, IPv6 is made of fixed size frame, reducing node processing delay. However, the scope of extension of the header exists in IPv6.

IPv6 Extension Headers

Hop-By-Hop Extension Header: The payload length field of IPv6 defines the maximum payload size in bytes. Thus, the maximum size of the payload is limited to 65,535 bytes. Many applications like those of multimedia services may require payloads in sizes larger than 65,535 bytes. Hop-by-hop extension header supports larger payloads, above 65,535 bytes. This extension header may increase the size of payload by 2^19 bytes.

Routing Extension Header: This is typically that of the Loose Source and Record Route (LSRR) Option field of IPv4 and is used to provide addresses of routers that IPv6 packets shall follow to reach the destination node. This is useful for sending packets by the virtual circuit switching mode of Store and Forward technique. This makes IPv6 support time-sensitive services of large data.

Fragment Extension Header: This is used for the purpose of the fragmentation of packets as in IPv4. The minimum IPv6 packet size is 1280 bytes. When the receiving node is on a network that has the Maximum Transfer Unit (MTU) and is less than 1280 bytes, the sender fragments the packets. By fragmentation, packets are made of the size that the network may carry. Details of fragmentation are conveyed to the receiving node by fragment extension header. For example, when the packet is fragmented, each part of that packet is assigned the same identification number. The identification number is 32 bits and the same is notified in the variable extension header field. In IPv4, intermediate nodes may fragment data. In IPv6, only the original sender or node can fragment data.

Authentication Extension Header: This is used to authenticate that the original packet sent by the sender is received perfectly by the receiver. When Extension Header is included, variable extension header fields will include the authenticated code like that of MD5 (Message Digest 5) or digest by a hash function of all headers. Note that the hop count field will change at each hop. Thus, the digest is either excluded from the hop count field or its code is made 0 in the authentication.

Encapsulating Security Payload (ESP) Extension Header: This is used to provide data security to the payload only by means of encryption/decryption technique, ES (Data Encryption Standard). When this header is included, the sender provides security information in variable extension header fields. The receiver using the information in variable extension header fields decrypts the payload.

Internet Control Message Protocol (ICMP)

IPv6 has dropped the fragmentation and reassembly feature at intermediate routers. Data, if required, is fragmented for packetization at the source only. Reassembling is done at the destination only. When an IPv6 packet received by an intermediate router is too large to be carried forward on the outgoing link, the router simply drops the packet and then sends an ICMP error message to the sender. Error message so sent reads like Packet Too Big. The sender on receiving the ICMP error message Packet Too Big fragments the packet in a smaller size and then transmits fragmented packets, each as one unit.

ICMP for IPv4 is used by hosts, nodes, routers, and gateways to communicate network layer information to each other. ICMP information is carried as IP payloads like TCP or UDP information. ICMP messages are basically used for error reporting, among other tasks.

ICMP Message Format

An ICMP message is made of a Type field, a Code field and the first eight bytes of an IP datagram. A datagram is for the ICMP message generated in the first place so that the sender knows about the packet that caused the error. An ICMP message is sent as IP datagram with TOS field set to 0 and protocol field set to 1 that defines the ICMP pack.

After headers, ICMP messages are included as payload. ICMP message format has four parts: 1-byte Type field, 1-byte Code field, 2-byte Checksum field used to provide checksum (1’s complement addition) of all 16-bit headers and additional information field, depending on the header of the ICMP message.

For timestamp requests, additional information is made of a 2-byte identifier, 2-byte sequence number and 4-byte originating timestamp. For echo request and reply, additional information is made of 1-byte identifier, 1-byte sequence number, and original IP header. For destination not reachable and others, additional information contains 4 bytes of unused fields, followed by the original IP header.

A new version of ICMP has been defined for IPv6. It does use existing types and codes but has added new types and codes. Added new ICMP type includes Packet Too Big, Unrecognized IPv6 options and others. Different error-reporting ICMP messages are Destination Unreachable, Source Quench, Time Exceeded, Parameter Problem and Redirect. Various ICMP messages for management queries are echo request and reply, timestamp request and reply, address mask request and reply, and router request and advertisement.

This is enough for this section; we have talked about the idea of the IPv6 Extension Headers and the role of ICMP in networking. In the next article, we will take a look at Address Resolution and the role of DHCP in networking.

If you have any suggestions or thoughts, just comment down below.

Related Concepts:

1. Understanding the Communication and Internet Beginning

2. Understanding the idea of Internet, OSI Model and TCP Model

3. Understanding the TCP Layer and TCP Packet Header

4. Understanding the IP address and IPv4 Packet Header

5. Understanding the UDP Headers, ARP and RARP Protocol

6. Understanding the IPv6 Address and IPv6 Packet Headers

Biplab Das

Biplab Das

My name is Biplab Das. I’m a writer, Blogger, Youtuber and full time IT support engineer whose childhood obsession with science fiction never quite faded. A quarter-century later, the technology that I coveted as a kid is woven into the fabric of everyday life. I’ve spent the past years to learn these technologies, I recently published a book on computer science fundamentals. People say smartphones are boring these days, but I think everyone is beginning to take this wonderful technology marvel for granted.
Keep Digging Technology.

Sign up for our Newsletter

Sign Up for our Newsletter for daily Updates !

shares