IPv6 // RFC 8200

A fixed 40-byte header, 128-bit addresses and a next-header chain that replaces IPv4 options. IPv6 dropped the header checksum, moved fragmentation to the source and separated routing, fragment and destination options into extension headers. The result is simpler to forward and harder to parse blindly.

RFC 8200 · IPv6 RFC 5952 · address text RFC 4291 · addressing RFC 8201 · PMTUD 40 B fixed header 128-bit addresses no header checksum
layer internet header 40 B fixed payload length 16 bits · includes extensions next header extension chain

01Header layout

fixed 40 bytes · no options in the base header

The IPv6 header is always 40 bytes. The first 32 bits pack Version, Traffic Class and Flow Label; then come Payload Length, Next Header, Hop Limit, and the 128-bit source and destination addresses. There is no IHL, no header checksum and no base-header options field.

Payload Length is not the frame length

Payload Length counts everything after the 40-byte base header: extension headers plus the upper-layer payload. It does not include the base header and it does not include Ethernet padding or FCS. A value of zero is valid for an empty packet, or for an RFC 2675 jumbogram when a Hop-by-Hop Jumbo Payload option is present.

02Traffic class & flow label

the first 32 bits, packed

Version, Traffic Class and Flow Label share the first 32 bits. Traffic Class is the same DSCP/ECN octet used by IPv4 Differentiated Services; Flow Label is a separate 20-bit identifier intended for flow classification and load balancing. It is not a port and it does not identify a connection.

first 32-bit wordversion 6 · traffic class · flow label
0 · 0x00
0x12345
0x60012345
binary 0110 0000 0000 0001 0010 0011 0100 0101

The high nibble is the version (6). The next 8 bits are DSCP (6 bits) plus ECN (2 bits). The low 20 bits are the flow label. A flow label of zero means “no label”; routers must not change a non-zero label.

FieldBitsUseReference
Version4Always 6 for IPv6; a different value is not an IPv6 header.RFC 8200 §3
Traffic Class8DSCP (6 bits) + ECN (2 bits), same semantics as IPv4 Differentiated Services.RFC 2474 · RFC 3168
Flow Label20Flow identification for load balancing and classification; zero means unlabelled.RFC 6437

03Addresses

128 bits · RFC 5952 text form

An IPv6 address is 128 bits, written as eight 16-bit hexadecimal groups. Leading zeros in a group are removed and the longest run of zero groups is compressed with ::. Only one :: is allowed. The wire format is always the full 16 bytes; the shortened text form is only a display convention.

address parser

RFC 5952 · RFC 4291
Enter an IPv6 address.

parsed address

wire + text
PrefixMeaningNotesReference
::/128UnspecifiedNever a valid destination; a source before an address is assigned.RFC 4291 §2.5.2
::1/128LoopbackThe local host, equivalent in role to 127.0.0.1 but a single address.RFC 4291 §2.5.3
::ffff:0:0/96IPv4-mappedAn IPv4 address embedded in IPv6; displayed as ::ffff:192.0.2.1.RFC 4291 §2.5.5
fe80::/10Link-local unicastValid only on one link; local tools need a zone such as %eth0.RFC 4291 §2.5.6
fc00::/7Unique localPrivate-use addresses, roughly the IPv6 counterpart of RFC 1918.RFC 4193
ff00::/8MulticastNo broadcast. ff02::1 is all-nodes on the local link.RFC 4291 §2.7
2001:db8::/32DocumentationReserved for examples and documentation, never for production traffic.RFC 3849
2000::/3Global unicastThe current global-unicast range; not every address inside it is routable.RFC 4291 §2.4
zone identifiers are local syntax

fe80::1%eth0 tells the local stack which interface to use. The %eth0 part is not encoded in the IPv6 header and does not travel across the wire. It is scope information, not an address field.

04Extension headers

the next-header chain

IPv6 moves optional processing into separate extension headers. Each one starts with a Next Header byte and a length field, then type-specific data. Only Hop-by-Hop must be first; the usual order is Hop-by-Hop, Destination Options, Routing, Fragment, AH, ESP, a final Destination Options header, then the upper-layer protocol.

fragment header

8 bytes

routing header

8+ bytes
Next HeaderHeaderLength ruleWhat it doesReference
0Hop-by-Hop Options(Hdr Ext Len + 1) × 8 BMust be first; Router Alert and Jumbo Payload live here.RFC 8200 §4.3
43Routing(Hdr Ext Len + 1) × 8 BType 0 source routing is deprecated; type 4 is SRH.RFC 8200 §4.4 · RFC 8754
44FragmentAlways 8 BOffset, M flag and 32-bit identification.RFC 8200 §4.5
51AH(Payload Len + 2) × 4 BAuthentication header; IPsec integrity and authentication.RFC 4302
60Destination Options(Hdr Ext Len + 1) × 8 BOptions for the final destination, before or after routing.RFC 8200 §4.6
50ESPEncrypted; stop parsingThe rest is encrypted; the next header is protected inside ESP.RFC 4303
59No Next Header—Ends the packet; there is no upper-layer payload.RFC 8200 §4.7
58ICMPv6Upper layerErrors, echo and Neighbor Discovery.RFC 4443 · RFC 4861
6TCPUpper layerConnection-oriented transport.RFC 9293
17UDPUpper layerDatagram transport; checksum is mandatory in IPv6.RFC 768
132SCTPUpper layerMessage-oriented transport with multihoming.RFC 9260
41IPv6 encapsulationUpper layerAn inner IPv6 packet; used by tunnels.RFC 2473

Common options

OptionTypeFormatUseReference
Pad10x001 byteSingle-byte alignment padding.RFC 8200 §4.2
PadN0x01Type + length + N zerosMulti-byte alignment padding.RFC 8200 §4.2
Router Alert0x05Type + 2 + valueTells routers to examine the packet; value 0 is MLD.RFC 2711
Jumbo Payload0xC2Type + 4 + 32-bit lengthPayloads over 65535 bytes; only with Payload Length 0.RFC 2675
Home Address0xC9Type + 16 + addressMobile IPv6 home address option.RFC 6275
Tunnel Encapsulation Limit0x04Type + 1 + limitLimits nested encapsulation.RFC 2473
the chain is not free-form

Only Hop-by-Hop must appear first, but routers and firewalls commonly enforce the recommended order and may drop unexpected combinations. IPv6 fragmentation is performed by the source, not by routers; a fragment header with offset 0 and M=0 is an atomic fragment. AH and ESP change the length accounting and the visibility of the upper layer.

05Encoder

base header · payload length auto

Build a structurally valid IPv6 base header and append a payload. Payload Length is calculated from the bytes you supply, so it includes any extension headers you paste or generate. The optional presets create a TCP, UDP, ICMPv6, Hop-by-Hop or Fragment example; transport checksums are calculated for the current source and destination when a preset is loaded.

IPv6 parameters

RFC 8200
59 · No Next Header

The base header has no checksum. Transport checksums use an IPv6 pseudo-header: source, destination, upper-layer length and next header. If you edit addresses after loading a preset, the preset checksum is no longer valid for the new addresses.

wire output

waiting
Set the fields and press Build IPv6.
packet hex
no bytes built yet
the header is not the whole packet

The output includes the 40-byte IPv6 header and the payload you supplied. It does not add Ethernet framing or an FCS, and it does not recompute transport checksums after you edit the addresses. Use the Ethernet explorer for EtherType 0x86DD framing.

06Decoder

IPv6 packet or Ethernet frame

Paste a raw IPv6 packet or an Ethernet II frame with EtherType 0x86DD. The decoder follows the Next Header chain through Hop-by-Hop, Routing, Fragment, AH and Destination Options headers, reports each length and offset, and stops at the first upper-layer protocol. It also detects RFC 2675 Jumbo Payload options.

parse bytes

RFC 8200 · extension chain
No IPv6 packet decoded yet.

07Wire notes

what changed from IPv4
no header checksum

IPv6 removed the per-hop header checksum. Link layers and upper layers detect errors; TCP, UDP and ICMPv6 checksums include an IPv6 pseudo-header. This means a router can decrement Hop Limit without recomputing a header checksum, but it also means a corrupted base header may not be detected until the upper layer.

  • Payload Length includes extension headers. It is not the length of the upper-layer payload alone. Subtract the chain lengths to find the transport payload. A zero value is meaningful: empty packet or jumbogram with a Jumbo Payload option.
  • Hop Limit is not TTL. It counts hops, not seconds, and is decremented on every forwarding router. Initial values are convention, not protocol constants. Zero produces ICMPv6 Time Exceeded.
  • Fragmentation belongs to the source. IPv6 routers do not fragment packets; they send ICMPv6 Packet Too Big when the packet exceeds the path MTU. The Fragment header uses a 32-bit identification and an offset in 8-byte units.
  • Address text is not wire format. The wire is always 16 bytes. RFC 5952 canonical text compresses the longest zero run, lowercases hex and omits leading zeros. Zone identifiers such as %eth0 are local scope syntax.
  • No broadcast. IPv6 uses multicast and anycast. All-nodes multicast is ff02::1; solicited-node multicast is ff02::1:ff00:0/104. ARP is replaced by Neighbor Discovery over ICMPv6.
  • Extension chains need limits. A parser must bound the number of extension headers it follows, validate every length before slicing, and stop at ESP because the next header is encrypted.
  • Filtering ICMPv6 breaks IPv6. Neighbor Discovery, Router Advertisement, Packet Too Big and Time Exceeded are not optional noise. Blanket ICMP drop policies are a common cause of IPv6 black holes.
  • Extension headers are not IPv4 options. They are chained through Next Header values and counted in Payload Length; AH uses 4-octet length units, while Hop-by-Hop, Routing and Destination Options use 8-octet units.

References

next protocol TCP flags & TLVs ->