wire / wire-format / ipv6-header

IPv6 fixed header

The IPv6 fixed header is 40 bytes: version (4 bits) + traffic class (8) + flow label (20), payload length (16), next header (8), hop limit (8), source address (128), destination address (128).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: IPv6 fixed header

wire format

spec: RFC 8200

The IPv6 fixed header is 40 bytes: version (4 bits) + traffic class (8) + flow label (20), payload length (16), next header (8), hop limit (8), source address (128), destination address (128).

fieldsizemeaning
Version4 bitsAlways 6.
Traffic Class8 bitsDSCP (6) + ECN (2).
Flow Label20 bitsFlow identifier for QoS; 0 means no flow.
Payload Length16 bitsLength of everything after the 40-byte fixed header.
Next Header8 bitsProtocol of the next header (6 TCP, 17 UDP, 58 ICMPv6, 43 routing, ...).
Hop Limit8 bitsDecremented per hop; packet discarded at 0.
Source Address128 bitsSender IPv6 address.
Destination Address128 bitsReceiver IPv6 address.

example:

60 00 00 00 00 00 06 40 20 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01 20 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 02

Version 6, no traffic class/flow, payload length 0, next header 6 (TCP), hop limit 64, src/dest 2001:db8::1 -> 2001:db8::2


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/ipv6-header or /wire-format/ipv6-header.json