📦

Understanding IPv6 Header Structure

May 8, 2025

IPv6 Headers Explained

Overview

IPv6 offers several improvements over IPv4, primarily in addressing capacity, but also features a more efficient header format. Despite the larger address size, the IPv6 header is only twice as large as IPv4's due to its streamlined structure.

Fixed Header

  • Length: 40 bytes
  • Includes essential information for routing packets.
  • Fields:
    1. Version (4-bits): Indicates the protocol version, i.e., 0110 for IPv6.
    2. Traffic Class (8-bits):
      • 6 bits for type of service.
      • 2 bits for Explicit Congestion Notification (ECN).
    3. Flow Label (20-bits): Helps maintain packet sequence, used for streaming/real-time data.
    4. Payload Length (16-bits): Indicates the byte count of the payload, allows up to 65535 bytes.
    5. Next Header (8-bits): Specifies the type of Extension Header or the Upper Layer Protocol.
    6. Hop Limit (8-bits): Prevents infinite packet looping, similar to TTL in IPv4.
    7. Source Address (128-bits): Originator address of the packet.
    8. Destination Address (128-bits): Recipient address of the packet.

Extension Headers

  • Placed between the Fixed Header and the Upper Layer Header.
  • Allow IPv6 to include optional information not necessary for every packet.
  • Identification:
    • Fixed Header's Next Header field directs to the first Extension Header.
    • Each Extension Header's Next-Header field points to subsequent headers, forming a linked list.
  • No Further Headers: A value of 59 indicates there are no subsequent headers.
  • Must be supported as per RFC 2460.

Sequence of Extension Headers

  • Should be processed by first and subsequent destinations and by the final destination.
  • Arranged in a linked list format, as depicted in relevant diagrams.

Additional Resources

These headers and their structures are crucial for understanding the robustness and flexibility of IPv6 compared to IPv4.