Skip to main content
  1. Network Articles/
  2. IPv6 Articles/

IPv6 Packet Header Structure

Table of Contents

IPv6 Packet Header Structure

An IPv6 (Internet Protocol version 6) packet consists of a fixed-length 40-byte basic header, followed by optional extension headers and the payload. Compared to the IPv4 header, the number of fields is reduced, and optional information is separated out into extension headers. This article explains the role of each field in the basic header.

Description of Each Field

Field NameSizeDescription
Version4 bitsIndicates the IP version. Fixed at 6 for IPv6.
Traffic Class8 bitsEquivalent to IPv4’s Type of Service field. Represents packet priority and congestion notification, used as DSCP and ECN.
Flow Label20 bitsA value used to identify packets belonging to the same flow (a sequence of related communication). RFC 6437 recommends that the sender assign a pseudo-random value. It lets a router identify a flow without having to re-parse the upper-layer headers, which is useful for load balancing and similar purposes. Using it is optional, however, and the value itself does not express a priority (priority handling is the job of the Traffic Class field).
Payload Length16 bitsThe number of bytes of extension headers plus data, excluding the basic header. Does not include the 40 bytes of the basic header itself.
Next Header8 bitsEquivalent to IPv4’s Protocol field. Indicates the type of the header that immediately follows — the type of the next extension header if one follows, or the upper-layer protocol type (TCP, UDP, etc.) otherwise.
Hop Limit8 bitsEquivalent to IPv4’s TTL. The maximum number of router hops the packet may traverse; decremented by 1 at each router and discarded once it reaches 0.
Source Address128 bitsThe source IPv6 address of the packet.
Destination Address128 bitsThe destination IPv6 address of the packet.

Key Differences from the IPv4 Header

The following fields present in the IPv4 header have been removed or changed in the IPv6 basic header.

Handling in IPv4Handling in IPv6
Header ChecksumRemoved. Error detection is handled by the upper layer (TCP/UDP) or lower layer (Ethernet, etc.), reducing recalculation cost at the IP level. In exchange, the UDP checksum — optional in IPv4 — is mandatory in IPv6 (RFC 8200 §8.1).
Identification, Flags, Fragment OffsetRemoved from the basic header. When fragmentation is needed, it is added as a Fragment extension header. Fragmentation along the path by routers no longer occurs — only the source performs it.
IHL (Header Length)Removed. Unnecessary since the basic header is always a fixed 40 bytes.
OptionsRemoved. Replaced by a scheme in which Extension Headers are chained together via the Next Header field.

Common Extension Header Values

The value of the Next Header field indicates the type of extension header or upper-layer protocol. Common values are as follows.

Next Header ValueType
0Hop-by-Hop Options extension header
6TCP
17UDP
43Routing extension header
44Fragment extension header
50ESP (IPsec)
51AH (IPsec)
58ICMPv6
59No Next Header (indicates no header follows)
60Destination Options extension header

Extension headers are chained together using the Next Header field, eventually reaching the upper-layer protocol. Protocol numbers (Next Header values) are managed by IANA, and the full list of assigned values is published here.

Header Size

Note that while IPv4’s Total Length represents the length of the entire packet including the IP header, IPv6’s Payload Length does not include the 40-byte basic header.
ItemSizeNotes
IPv6 basic headerFixed at 40 bytesA simplified field layout that is always a fixed length.
Extension headersVariable length (zero or more)Chained together, with each one’s type indicated by the Next Header field.
Entire IPv6 packetUp to 65575 bytes (excluding jumbograms)The 40-byte basic header plus the maximum Payload Length of 65535 bytes.

Unlike IPv4, if the packet size is larger than the MTU of a link along the path, routers do not perform fragmentation. The source host determines the appropriate size via Path MTU Discovery and, if necessary, fragments the packet itself using a Fragment extension header. A router that receives a packet exceeding the MTU discards it and returns an ICMPv6 Packet Too Big message to the source.

Related RFCs

RFCTitleSummary
RFC 8200Internet Protocol, Version 6 (IPv6) SpecificationThe current IPv6 specification. Defines the basic header structure and the extension-header chaining scheme. An Internet Standard that replaced RFC 2460.
RFC 2460Internet Protocol, Version 6 (IPv6) SpecificationThe previous IPv6 specification. Obsoleted by RFC 8200, but often referenced for historical context.
RFC 6437IPv6 Flow Label SpecificationDefines how the Flow Label is set and what it is used for. Recommends that the sender assign a pseudo-random value, and specifies that use of the field by routers is optional.

Related Articles