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
| Field | Offset | Size | Type | Description |
|---|---|---|---|---|
Version version | 0 bits | 4 bits | uint8 | IP version (always 6 for IPv6) |
Traffic Class traffic_class | 4 bits | 8 bits | uint8hex | Traffic class for QoS |
Flow Label flow_label | 12 bits | 20 bits | uint32hex | Flow label for QoS handling |
Payload Length payload_length | 32 bits | 16 bits | uint16 | Length of payload in bytes (excluding header) |
Next Header next_header | 48 bits | 8 bits | uint8 | Type of next header Known values: 0=Hop-by-Hop, 6=TCP, 17=UDP, 43=Routing, +6 more |
Hop Limit hop_limit | 56 bits | 8 bits | uint8 | Hop limit (similar to TTL in IPv4) |
Source IP source_ip | 64 bits | 128 bits | uint64hex | Source IPv6 address (128 bits) |
Destination IP dest_ip | 192 bits | 128 bits | uint64hex | Destination 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)
Related Resources
Quick Facts
ProtocolIPv6
Header Size40 bytes
Fields8
Endiannessbig
SpecificationRFC 8200