Octet

What are IPv6 extension headers? Name the main ones and the order they go in.

Show the answer

Say this first

Optional headers between the IPv6 header and the payload, chained by the Next Header field: each one says what comes after it. The main ones are Hop-by-Hop Options (0), Routing (43), Fragment (44), ESP (50), AH (51) and Destination Options (60). Only Hop-by-Hop is meant for routers along the path, and only if they are configured to process it. The rest are for the destination, or for the nodes listed in a Routing header.

Go deeper

The chain

Output
IPv6 header    Next Header = 0   (Hop-by-Hop)
Hop-by-Hop     Next Header = 44  (Fragment)
Fragment       Next Header = 6   (TCP)
TCP segment

The headers

ValueHeaderWho processes it
0Hop-by-Hop Optionsrouters on the path, if configured to (RFC 8200)
60Destination Optionsthe destination, or each listed hop when placed before a Routing header
43Routingthe nodes listed in it
44Fragmentthe destination, at reassembly
51AHthe destination
50ESPthe destination
59No Next Headernothing follows

Recommended order (RFC 8200)

  1. IPv6 header
  2. Hop-by-Hop Options (must come first if present)
  3. Destination Options (for the hops in the Routing header)
  4. Routing
  5. Fragment
  6. AH
  7. ESP
  8. Destination Options (for the final destination)
  9. Upper layer (TCP, UDP, ICMPv6)

Each appears at most once, except Destination Options, which may appear twice.

Routing header types

  • Type 0: source routing through a list of hops. Deprecated by RFC 5095 because a packet could bounce between two hosts many times and amplify traffic.
  • Type 2: Mobile IPv6.
  • Type 4: the Segment Routing Header used by SRv6 (RFC 8754).

Traps

  • Saying every router processes every extension header.
  • Forgetting that ESP and AH are extension headers too.
How did you do?Book 4.2 IP Version 6