IPv6 Packet Structure: Base Header and Extension Headers

Classified in Computers

Written on in English with a size of 2.54 KB

IPv6 Packet Format: Base Header

Each IPv6 packet consists of a mandatory base header followed by the payload. The payload is made up of two parts: optional extension headers and the upper-layer data. The base header is 40 bytes long, whereas the extension headers and the data from the upper layer can contain up to 65,535 bytes of information.

The base header has 8 fields:

  • Version: A 4-bit field that defines the version of IP, such as IPv4 or IPv6. For IPv6, the value of this field is 6.
  • Priority: A 4-bit field that defines the priority of the packet, which is important in connection with traffic congestion.
  • Flow Label: A 24-bit field designed for providing special handling for a particular flow of data.
  • Payload Length: A 2-byte field used to define the total length of the IP datagram, excluding the base header.
  • Next Header: An 8-bit field that defines the header that follows the base header in the datagram.
  • Hop Limit: An 8-bit field that has the same purpose as Time To Live (TTL) in IPv4.
  • Source Address: A 16-byte (128-bit) Internet address that identifies the original source of the datagram.
  • Destination Address: A 16-byte (128-bit) Internet address that identifies the final destination of the datagram. However, this field will contain the address of the next router if source routing is being used.

IPv6 Extension Headers

As stated earlier, the length of the IPv6 base header is 40 bytes and it always remains constant. In IPv6, the fixed base header can be followed by up to six extension headers. This mechanism for including optional information differs from IPv4, where such options were part of the main header itself.

The IPv4 header had space for some optional fields requiring particular processing of packets. These optional fields were not used often and could deteriorate router performance because their presence had to be checked for each packet. IPv6 replaces these IPv4 optional fields with extension headers, which gives more functionality to the IP datagram.

In IPv6, optional Internet layer information is encoded in separate headers that may be placed between the IPv6 base header and the upper-layer header in a packet. There are a small number of defined extension headers, each identified by a distinct Next Header value in the preceding header.

Related entries: