Protocol Tutorial

IPv6 Header Format

Complete guide to IPv6 header structure: version, traffic class, flow label, payload length, next header, hop limit, source address, and destination address. Compare with IPv4.

Protocol Overview

Internet Protocol version 6 (RFC 8200)

Header Size: 40 bytes (320 bits)
Fields: 8
Endianness: big
Spec: RFC 8200

Header Fields

FieldOffsetSizeTypeDescription
Version
version
0 bits4 bitsuint8IP version (always 6 for IPv6)
Traffic Class
traffic_class
4 bits8 bitsuint8hexTraffic class for QoS
Flow Label
flow_label
12 bits20 bitsuint32hexFlow label for QoS handling
Payload Length
payload_length
32 bits16 bitsuint16Length of payload in bytes (excluding header)
Next Header
next_header
48 bits8 bitsuint8Type of next header
Known values: 0=Hop-by-Hop, 6=TCP, 17=UDP, 43=Routing, +6 more
Hop Limit
hop_limit
56 bits8 bitsuint8Hop limit (similar to TTL in IPv4)
Source IP
source_ip
64 bits128 bitsuint64hexSource IPv6 address (128 bits)
Destination IP
dest_ip
192 bits128 bitsuint64hexDestination IPv6 address (128 bits)

Common IPv6 Mistakes

  • 1Confusing Payload Length (excludes header) with IPv4's Total Length (includes header)
  • 2Forgetting that IPv6 header is fixed 40 bytes (no IHL field, no options in base header)
  • 3Misreading Flow Label (20 bits) as part of Traffic Class
  • 4Not understanding extension headers: Next Header indicates the type of following header
  • 5Assuming IPv6 completely replaces IPv4 (dual-stack is common in practice)

Try It Yourself

Parse real IPv6 packets in the interactive visualizer

Open Visualizer

Quick Facts

ProtocolIPv6
Header Size40 bytes
Fields8
Endiannessbig
SpecificationRFC 8200