Introduction to Networking

IPV6 Header Format

IPV6 is also a datagram and connectionless service like IPV4. But its size and working functionality are a bit different from IPV4.

IPv6 headers have one Fixed Header and zero or more Optional Headers.

  • Fixed header is also called base header. It is the compulsory part of the IPV6 header. All the necessary information, which is compulsory for a router, is kept in the Fixed Header. The IPv6 fixed header is 40 bytes (320 bits) long.
  • Optional Headers are also called Extension Headers. The optional Header holds some extra (optional) information that helps routers understand how to handle a packet or flow control. With 40 bytes of a fixed header, some extension headers can also be used, which may increase the size of the packet.

IPV6 Header contains the following information.

IPV6 Header

1. Version: it is a 4-bit field. It represents version IPV6 in binary 0110 (6).

2. Traffic Class: it is an 8-bit field, which is also known as priority. These 8 bits are divided into two parts.

  • The most significant 6 bits are used for Type of Service. it replaces IPv4’s ‘type of service’ field. Its basic purpose is to provide quality of service (QoS).
  • The least significant 2 bits handle the packets in Congestion (i.e., loop). Instead of dropping packets, the last 2-bits use Explicit Congestion Notification (ECN) to handle the packets.

3. Flow Label: it is a 20-bit field. It uses the virtual circuit for data transmission. In this way, the sequential flow of the packets belonging to a datagram is maintained. This field avoids the re-ordering of data packets because all data travel in a single path. It is designed for streaming/real-time media.

4. Payload Length. It is a 16-bit field. It tells the routers about the size of the payload which belongs to a particular packet. With 16 bits, up to 65535 bytes of data can be indicated.

5. Next Header: it is an 8-bit field. It tells the type of Extension Header, which is additionally used with a base header to send more data or informations. Some extension headers are given below

Extension Headers in IPV6 Header

If the extension header is used along with the payload, then the corresponding bits value is presented in this field. It means if the Routing header is used as an extension header, then 43(in bits) is represented in the Next header (8bit) field. 

Note: Extension headers are optional and are used if needed.

6. Hop Limit: it is an 8-bit field. This field is used to stop packets from looping in the network infinitely. This is the same as TTL in IPv4. The Hop-Limit field value is decremented by 1 as it passes a link (i.e., router). When the value of Hop-limit field reaches 0 the packet is discarded.

7. Source Address(128-bits): This field indicates the address of the originator of the packet.

8. Destination Address(128-bits): This field provides the address of the intended recipient of the packet.

9. This is the payload portion of the IPv6 packet.

Note: We can say that an IPv6 address (128 bits) is 4 times larger than an IPv4 (32bit) address, but the base header (40bytes) of an IPv6 is only 2 times larger than that of an IPv4 header (20bytes).

IPv6 Packet Contains

  • base header
  • may contain zero, one or more extension headers
  • Data needs to transfer

All components of IPV6 Header