IPv6 Datagram Header Format

Before learning IPv6 datagram header and fields, I recommend you to learn IPv4 datagram header the different fields in IPv4 datagram header also.

IPv6 Datagram Packet Structure

IPv6 has a much simpler packet header compared with IPv4, by including only the information needed for forwarding the IP datagram. IPv4 has a fixed length header of size 40 bytes. Fixed length IPv6 header allows the routers to process the IPv6 datagram packets more efficiently. The following figure shows the structure of IPv6 datagram packet.

Structure of IPv6 Packet

We may divide IPv6 datagram packet header as three parts. 1) IPv6 datagram packet header 2) Extension Header 3) Upper Layer Protocol Data. IPv6 datagram packet has also extension headers of varying lengths. If extension headers are present in IPv6 datagram packet, a Next Header field in the IPv6 header points the first extension header. Each extension header contains another Next Header field, pointing the next extension header. The last IPv6 datagram packet extension header points the upper layer protocol header (Transmission Control Protocol (TCP), User Datagram Protocol (UDP) , or Internet Control Message Protocol (ICMPv6)). There is no "options" in IPv6 datagram packet header, which was present in IPv4 header.

IPv6 Datagram Packet Header and Fields

IPv6 Datagram Header Format


• Version:  The size of the Version field is 4 bits. The Version field shows the version of IP and is set to 6.

• Traffic Class: The size of Traffic Class field is 8 bits. Traffic Class field is similar to the IPv4 Type of Service (ToS) field. The Traffic Class field indicates the IPv6 packet’s class or priority.

• Flow Label: The size of Flow Label field is 20 bits. The Flow Label field provide additional support for real-time datagram delivery and quality of service features. The purpose of Flow Label field is to indicate that this packet belongs to a specific sequence of packets between a source and destination and can be used to prioritized delivery of packets for services like voice.

• Payload Length: The size of the Payload Length field is 16 bits. The Payload Length field shows the length of the IPv6 payload, including the extension headers and the upper layer protocol data

• Next Header: The size of the Next Header field is 8 bits. The Next Header field shows either the type of the first extension (if any extension header is available) or the protocol in the upper layer such as TCP, UDP, or ICMPv6.

• Hop Limit: The size of the Hop Limit field is 8 bits The Hop Limit field shows the maximum number of routers the IPv6 packet can travel. This Hop Limit field is similar to IPv4 Time to Live (TTL) field.

This field is typically used by distance vector routing protocols, like Routing Information Protocol (RIP) to prevent layer 3 loops (routing loops).

• Source Address: The size of the Source Address field is 128 bits. The Source Address field shows the IPv6 address of the source of the packet.

• Destination Address: The size of the Destination Address field is 128 bits. The Destination Address field shows the IPv6 address of the destination of the packet.

Related Tutorials
• Limitations of IPv4
• IPv6 History and related RFCs
• IPv6 Features
• Introduction to IPv6 Addressing
• IPv6 Address formats
• Types of IPv6 Addresses
• Differences Between IPv4 and IPv6