The IPv6 is the latest version of the Internet Protocol. Its header is subdivided into a mandatory fixed header and optional extension headers. The fixed header has 8 fields and fixed size of 40 bytes, while all extension headers are multiple of 8 octets in size. To meet this requirement, some extension headers require internal padding.
The IPv4 fixed header contains the following fields:
Version (4 bits): The version of the IP packet. For IPv6 it is always equal to 6.
Traffic Class (6+2 bits): It indicates the IPv6 packet’s priority class and provides similar functionality to the DSCP and ECN fields in the IPv4 header. It is divided into two parts. The six most-significant 6 bits are used for differentiated services code point (DSCP), which is responsible for data packet classification and managing network traffic. The remaining 2 bits are used for Explicit Congestion Notification (ECN), which adapts ECN-aware devices traffic rates to congestion without requiring packet loss.
Flow label (20 bits): The flow is a sequence of packets that are sent from a particular source to a unicast or multicast destination and it is uniquely identified by the combination of the source address and a non-zero flow label. The flow label indicates to which specific sequence a packet belongs. It is used for prioritized delivery, such as the one needed by real-time data services (voice and video). For default router handling, the flow label field is set to 0 and if that remains unchanged, it indicates that the traffic does not belong to any sequence or flow. The flow label is assigned by the source node randomly and uniformly from the range 1 to FFFFF hex.
Payload Length (16 bits): It indicates the size of information that a particular packet contains in its payload, including any extension headers. It allows data of up to 65535 octets and if a higher packet payload is required then the payload length field will be set to 0 and jumbo payload (jumbogram) option will be used in the Hop-by-Hop options extension header. Jumbograms are used to transmit heavy data payload because they allow the exchange of packets with payloads of up to 4 294 967 295 octets, by making use of a 32-bit length field.
Next Header (8 bits): This field specifies the transport layer protocol (like TCP, UDP, ICMPv6 or other) used by a packet’s payload. It is identical to the IPv4 protocol field and the same values are used in both versions. They define the layout of the header that will immediately follow the IPv4 or IPv6 header. The value 59 is used if there is no next header following, not even a header of an upper-layer protocol. The packet ends right after it and the payload should be empty.
Hop Limit (8 bits): The field indicates the maximum number of links over which the IPv6 packet can travel before being discarded. It has a similar function to the IPv4 Time To Live field except that there is no relation to the amount of time that the packet is queued at the router. An ICMPv6 Time Exceeded message is sent to the source address when the Hop Limit equals 0 and then the packet is discarded.
Source Address (128 bits): Indicates the source IP address.
Destination Address (128 bits): Indicates the destination IP address.
Unlike the IPv4 options, the IPv6 ones are placed in separate extension headers. They are located between the IPv6 header and the transport-layer header in a packet. This is a major improvement in router performance for packets that contain options because most of the IPv6 extension headers are not examined or processed by any router until the packet arrives at its final destination, while in IPv4, the presence of any options requires the router to examine all options.
IPv6 options are always an integer multiple of eight octets long and that improves performance when handling subsequent option headers. The extension headers can be of arbitrary length and they are not limited to 40 bytes like the IPv4 ones. This feature, plus the manner in which IPv6 options are processed, permits IPv6 options to be used for functions that are not practical in IPv4, like the IPv6 authentication and security encapsulation options.
The IPv6 defined extension headers are listed in the preferred order below (between the IPv6 header and the Upper-Layer header), which is recommended when more than one extension header is used in the same packet:
|Extension Header||Identified by Next Header value of||Description|
|Hop-by-Hop Options header||0||Special options that require hop-by-hop processing|
|Destination Options header||60||Optional information to be examined by the destination node|
|Routing header||43||Extended routing, similar to the IPv4 loose source route|
|Fragment header||44||Fragmentation and reassembly|
|Authentication header||51||Integrity, authentication and security|
|Encapsulating Security Payload header||50||Confidentiality through encryption|
Note that each extension header should occur at most once at the same packet, except for the Destination Options header, which should occur at most twice (once before a Routing header and once before the upper-layer header). New extension headers may be defined in the future and their ordering constraints relative to the above-listed headers must be specified.
The IPv6 has major enhancements over the older IPv4 protocol. It can handle packets more efficiently with increased security and improved performance. Currently, according to Google, the world has a 29% IPv6 adoption, which is expected to rise on an ongoing basis.