Octet

Walk me through the IPv6 header. What was removed compared with IPv4, and why?

Show the answer

Say this first

It is a fixed 40 bytes with eight fields: Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, and the 128-bit source and destination addresses. Compared with IPv4, the header length field, the header checksum, the fragmentation fields and options are gone. A fixed header with no checksum is cheaper for routers, fragmentation moved to an extension header used only by the source, and options moved to extension headers that most routers never look at.

Go deeper

The fields

FieldBitsNotes
Version4always 6
Traffic Class8DSCP (6 bits) and ECN (2 bits), same as IPv4 ToS
Flow Label20marks packets of one flow, used for ECMP and LAG hashing
Payload Length16bytes after the 40-byte header, extension headers included
Next Header8next extension header or the upper layer: 6 TCP, 17 UDP, 58 ICMPv6
Hop Limit8the TTL, renamed; decremented at each router
Source address128
Destination address128

What changed and why

IPv4IPv6Reason
IHL (header length)goneheader is always 40 bytes
Header checksumgonelayer 2 FCS and layer 4 checksums already cover errors; routers no longer recompute a checksum at every hop
Identification, flags, fragment offsetFragment extension headeronly the source fragments
Optionsextension headerskeep the fast path simple
ProtocolNext Headercan point to an extension header
TTLHop Limitname now matches what it does

Consequences

  • The UDP checksum, optional in IPv4, is mandatory in IPv6 (tunnel protocols have a narrow exception).
  • Payloads above 65,535 bytes need the Jumbo Payload option in a Hop-by-Hop header. Almost nothing uses it.

Traps

  • Saying Payload Length includes the 40-byte header. It does not.
  • Saying IPv6 removed TTL. It renamed it.
How did you do?Book 4.2 IP Version 6