IPv6 Header Structure Format and Fields Explained

Unlike the variable 20-to-60-byte IPv4 header, the IPv6 base header is always 40 bytes (320 bits). IPv6 does not need a Header Length field because the base header size is fixed. The first byte after it is at offset 40 and may begin an extension header or an upper-layer header.

IPv6 Header FieldSize
Version4 bits
Traffic Class8 bits
Flow Label20 bits
Payload Length16 bits
Next Header8 bits
Hop Limit8 bits
Source Address128 bits
Destination Address128 bits

IPv6 40-byte base header diagram showing eight fields and their bit lengths
IPv6 base header layout showing the position and size of all eight fields.

IPv6 Header Fields Explained

Version (4 Bits)

The Version field is always 6, represented as 0110 in binary.

Traffic Class (8 Bits)

Like the Differentiated Services field in IPv4, Traffic Class supports Quality of Service (QoS) and congestion notification.

  • DSCP (6 bits): Identifies traffic classes, such as voice or bulk transfers, for configured QoS policies. Marking a packet does not guarantee priority.
  • ECN (2 bits): Allows compatible network devices to signal congestion without dropping eligible packets. A supporting transport protocol, such as ECN-enabled TCP, communicates congestion feedback to the sender.

Flow Label (20 Bits)

The Flow Label identifies packets belonging to the same flow. A value of 0 indicates an unlabeled flow. Nonzero labels normally remain unchanged in transit. Under RFC 6437, devices can use the Source Address, Destination Address, and Flow Label as a three-field input for ECMP or EtherChannel load balancing.

Payload Length (16 Bits)

Payload Length counts all bytes after the 40-byte base header, including extension headers and upper-layer data. Its maximum ordinary value is 65,535 bytes. IPv6 jumbograms use a Payload Length value of 0 and a 32-bit Jumbo Payload option in the Hop-by-Hop Options header.

Packet math example: A packet containing an 8-byte Fragment header, a 20-byte TCP header, and 1,000 bytes of application data has a Payload Length of 1,028 bytes (8 + 20 + 1,000). Its total IPv6 packet size is 1,068 bytes (40 + 1,028).

Exam Tip: Payload Length vs. Total Length

IPv4 Total Length includes the IP header and payload. IPv6 Payload Length excludes the 40-byte base header but includes extension headers.

Next Header (8 Bits)

Next Header identifies the header immediately after the IPv6 base header. ESP is an exception because its Next Header value appears in its trailer.

ValueProtocol or Extension Header
0Hop-by-Hop Options
6TCP
17UDP
41IPv6 Encapsulation
43Routing
44Fragment
50ESP
51AH
58ICMPv6
59No Next Header
60Destination Options
89OSPFv3

Hop Limit (8 Bits)

Hop Limit prevents packets from circulating indefinitely, much like IPv4 Time to Live (TTL). Each forwarding router decrements it by one. A router discards a packet if the value is already zero or becomes zero during forwarding, normally sending ICMPv6 Type 3, Code 0 (Hop Limit Exceeded in Transit).

  • Neighbor Discovery Protocol (NDP) messages must arrive with Hop Limit 255. Receivers reject messages with other values to help prevent off-link spoofing.

Source and Destination Addresses (128 Bits Each)

  • Source Address: Normally contains a unicast address, such as 2001:db8:10:1::10. During Duplicate Address Detection (DAD), a host uses the unspecified address ::. Multicast addresses cannot be source addresses.
  • Destination Address: Can identify a unicast, multicast, or anycast destination, such as 2001:db8:20:1::20. IPv6 has no broadcast addresses. Anycast uses unicast address syntax and routes traffic to an appropriate instance, typically the nearest according to routing metrics.

IPv6 Extension Headers (RFC 8200)

Optional features appear in extension headers between the base header and upper-layer protocol. The standard IPv6 extension headers have lengths that are multiples of eight bytes, although AH and ESP follow their own format rules.

OrderExtension HeaderNHScope and Role
1Hop-by-Hop Options0Examined by transit nodes when configured. Can carry Router Alert or Jumbo Payload options.
2Destination Options (Pre-Routing)60Processed by the first destination and subsequent destinations identified by a Routing header.
3Routing43Identifies specified destinations. Includes Segment Routing Header use in SRv6. Routing Type 0 is deprecated.
4Fragment44Supports source fragmentation and destination reassembly using a fixed 8-byte header.
5Authentication Header (AH)51Provides IPsec integrity, origin authentication, and anti-replay protection without encryption.
6Encapsulating Security Payload (ESP)50Provides IPsec confidentiality and can provide integrity and authentication in transport or tunnel mode.
7Destination Options (Final)60Processed by the final destination and can contain endpoint options and padding.
IPv6 Next Header chaining diagram showing recommended RFC 8200 extension header order
Recommended extension header order and Next Header chaining in an IPv6 packet.

Source-Only Fragmentation and PMTUD

IPv6 routers do not fragment packets during forwarding. Every IPv6 link must support an MTU of at least 1,280 bytes, although the path MTU can be larger. If a packet exceeds the outgoing MTU, the router drops it and sends ICMPv6 Type 2 (Packet Too Big), reporting the supported MTU.

The Fragment header contains an 8-bit Next Header, 8 reserved bits, a 13-bit Fragment Offset measured in 8-byte units, 2 reserved bits, a 1-bit M (More Fragments) flag, and a 32-bit Identification field.

Exam Tip: AH, ESP, and Extension Header Filtering

AH authenticates protected fields while accounting for mutable values such as Hop Limit, but it does not encrypt data. ESP supports encryption and authentication and is widely used in IPsec VPNs. Some devices drop uncommon headers or process them outside the normal hardware forwarding path, but behavior varies.

IPv4 Header vs. IPv6 Header

FeatureIPv4IPv6
Base Header SizeVariable (20–60 bytes)Fixed (40 bytes)
Address Size32 bits128 bits
Header Length FieldPresent (IHL)Removed
Length Field ScopeTotal Length (header + data)Payload Length (extensions + data)
Header ChecksumPresentRemoved
FragmentationSource and routersSource only (1,280-byte minimum link MTU)
Loop PreventionTTLHop Limit
Next ProtocolProtocol fieldNext Header field
Optional FeaturesHeader optionsExtension headers
Flow IdentificationNo equivalent header field20-bit Flow Label

Removing the IPv6 header checksum eliminates the need to recalculate it after each Hop Limit change. TCP checksums are required, and IPv6 UDP checksums are normally mandatory, with narrowly defined tunneling exceptions.

How Routers Process an IPv6 Packet and Lab Verification

IPv6 lab topology with PC1, R1, R2 and SRV1 illustrating Hop Limit decrement and Path MTU Discovery
IPv6 forwarding topology showing route lookup, Hop Limit changes, and PMTUD.

  1. Route Lookup: R1 matches the Destination Address against its IPv6 routing table.
  2. Hop Limit Decrement: R1 reduces Hop Limit from 64 to 63. If forwarding would reduce it to zero, R1 discards the packet and normally sends ICMPv6 Type 3, Code 0.
  3. MTU Validation: If the packet exceeds the 1,280-byte outgoing MTU on G0/1, R1 drops it and sends ICMPv6 Type 2 (Packet Too Big) to PC1.
  4. Upper-Layer Handoff: SRV1 follows the Next Header information to process the upper-layer protocol, such as ICMPv6 (58) or TCP (6).

Exam Tip: ICMPv6 and Firewall Configuration

Blocking essential ICMPv6 traffic can disrupt PMTUD and Neighbor Discovery, including Router Solicitation and Advertisement messages (Types 133–134) and Neighbor Solicitation and Advertisement messages (Types 135–136). TCP connections may establish but larger transfers can fail when Packet Too Big messages are blocked.

Wireshark IPv6 packet decode and Cisco IOS interface output used to verify Next Header and MTU
Inspect IPv6 header fields in Wireshark and verify interface MTU using Cisco IOS.

Use these commands and display filters to inspect the IPv6 header in your lab:

ToolCommand or FilterVerification Target
Cisco IOSshow ipv6 interface g0/1Check the interface MTU, link-local address, and IPv6 interface information.
Cisco IOSping ipv6 2001:db8:20:1::20Verify reachability. Use the platform's supported extended ping options to test packet sizes across a 1,280-byte path.
Wiresharkipv6.nxt == 58Find packets whose IPv6 base header directly identifies ICMPv6.
Wiresharkicmpv6.type == 2Find Packet Too Big messages associated with PMTUD.

Key Takeaways

  • Fixed Base Header: IPv6 uses eight fields totaling 40 bytes, without an IPv4-style Header Length field or header checksum.
  • Payload Length: Includes extension headers and upper-layer data, but excludes the 40-byte base header.
  • Next Header: Identifies the next protocol or extension header. RFC 8200 recommends an extension header order.
  • Hop Limit: Decreases at forwarding hops. NDP messages require a received Hop Limit of 255.
  • Fragmentation: Only the source fragments IPv6 packets. Routers use Packet Too Big messages to support PMTUD.
  • Flow Label: Can help devices distribute flows across multiple paths when supported by their forwarding implementation.

When you examine an IPv6 packet, start with the fixed header, check Payload Length and Next Header, and then follow any extension headers.

ComputerNetworkingNotes Networking Tutorials IPv6 Header Structure Format and Fields Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com