What size is an internet protocol (ip) v6 payload field?

This blog helps you understanding and grasping IPv6 Header Details. IPv6 is the replacement Internet protocol for IPv4. It corrects some of the deficiencies of IPv4 and simplifies the way that addresses are configured and how they are handled by Internet hosts. IPv4 has proven to be robust, easily implemented, and interoperable, and has stood the test of scaling an inter-network to a global utility the size of the Internet. However, the initial design did not anticipate the following conditions:

  • Recent exponential growth of the Internet and the impending exhaustion of the IPv4 address space.
  • The ability of Internet backbone routers to maintain large routing tables.
  • Need for simpler auto-configuration and renumbering.
  • Requirement for security at the IP level (IPSec).
  • Need for better support for real-time delivery of data, known as quality of service (QoS). 

With its 32-bit address format, IPv4 can handle a maximum 4.3 billion unique IP addresses. While this number may seem very large, it is not enough to sustain and scale the rapidly rising growth of the Internet. Although improvements to IPv4, including the use of NAT, have allowed the extended use of the protocol, address exhaustion is inevitable and could happen as soon as 2012.

With its 128-bit address format, IPv6 can support 3.4 x 1038 exchange   unique IP addresses. This number of addresses is large enough to configure a unique address on every node in the Internet and still have plenty of addresses left over. It is also large enough to eliminate the need for NAT, which has its own inherent problems.

A few countries, governmental agencies, and multinational corporations have either already deployed or mandated deployment of IPv6 in their networks and software products. Some emerging nations have no choice but to deploy IPv6 because of the unavailability of new IPv4 addresses.

Advantages of IPv6

Besides providing an almost limitless number of unique IP addresses for global end-to-end reachability and scalability, IPv6 has the following additional advantages:

  • Simplified header format for efficient packet handling
  • Larger payload for increased throughput and transport efficiency
  • Hierarchical network architecture for routing efficiency
  • Support for widely deployed routing protocols (OSPF, BGP, etc.)
  • Autoconfiguration and plug-and-play support
  • Elimination of need for network address translation (NAT) and application layered gateway (ALG)
  • Increased number of multicast addresses .

An IPv6 Packet consists of a fixed-sized Header and variable-sized Payload. IPv6 header is 40 bytes in size.

Version (4 bits):  This field is similar to the "Version" field in IPv4 Header. The version field indicates the version of the header and its value is set to 6 (Value 0110) for IPv6.

Traffic Class (8 bits): This field defines the prioritization of the Traffic. This field is Similar to the "TOS" field in IPv4 Header. 8 bits are divided into two parts. The most significant 6 bits are used for Type of Service (or DSCP). The least significant 2 bits are used for Explicit Congestion Notification (ECN).

Flow Label (20 bits): This a new field included in IPv6 header basically used to distinguish the flow of packets. A source device can label the packets by setting a non zero value in the Flow Label field. The packets marked with the same Flow Label value would be given the same treatment by various devices (Routers/L3 Switches) that exist in the path. Multiple active flows may exist from a source to a destination along with packets that are not associated with any flow i.e with Flow Label value 0.

Payload length (16 bits): This field indicates the size of the payload in bytes, including any extension headers. A Jumbo payload is indicated by the value zero in the Payload Length field, details explained in this field below. This field is similar to the "Total Length" field in IPv4 header but not exactly identical to it.

In IPv6,  The Payload Length = Variable Length Data - (minus) IPv6 header, 

In IPv4, Total Length = Variable Length Data size + IPv4 Header.

The total size of an IPv6 packet can be derived by adding 40bytes to the Payload Length field.


IPv6 Payload is also composed of Extension Headers along with Upper layer data. With 16 bits, up to 65535 bytes is the maximum length of Payload, but if the Extension Headers contain Hop-by-Hop Extension Header, then the payload may exceed 65535 bytes and this field is set to 0.  You can see more details about Extension Header in my other article "IPv6 Extension Headers".

Next Header (8 bits): This field is similar to the "Protocol Field" in the IPv4 Header. This field identifies the protocol running at the transport layer for e.g. TCP(6)/UDP(17)/OSPF(89)/EIGRP (88) etc. Also, note that This field is used to indicate either the type of Extension Header or if the Extension Header is not present then it indicates the Upper Layer Protocol at Transport layer.

Hop Limit (8 bits): This field is similar to "Time to Live (TTL)" field in IPv4 header. The source device set the value in this field and its value is decremented by one by each node in the path that forwards the packet.  The packet is discarded when the hop count gets zero. This field is used to prevent the packet to remain in an indefinite loop due to any routing related errors.

Source address (128 bits): Specifies the IPv6 address of the sending node.

Destination address (128 bits): Specifies the IPv6 address of the destination node.


Hope you have understood the concept and enjoyed reading this Post. Please share your feedback if you liked this post. You can also write to us on .

Prerequisite: Introduction to Internet Protocol version 6 

IP version 6 is the new version of Internet Protocol, which is way better than IP version 4 in terms of complexity and efficiency. Let’s look at the header of IP version 6 and understand how it is different from the IPv4 header. 

IP version 6 Header Format : 
 

Version (4-bits): Indicates version of Internet Protocol which contains bit sequence 0110. 

Traffic Class (8-bits): The Traffic Class field indicates class or priority of IPv6 packet which is similar to Service Field in IPv4 packet. It helps routers to handle the traffic based on the priority of the packet. If congestion occurs on the router then packets with the least priority will be discarded. 
As of now, only 4-bits are being used (and the remaining bits are under research), in which 0 to 7 are assigned to Congestion controlled traffic and 8 to 15 are assigned to Uncontrolled traffic. 

Priority assignment of Congestion controlled traffic : 
 

Uncontrolled data traffic is mainly used for Audio/Video data. So we give higher priority to Uncontrolled data traffic. 
The source node is allowed to set the priorities but on the way, routers can change it. Therefore, the destination should not expect the same priority which was set by the source node. 

Flow Label (20-bits): Flow Label field is used by a source to label the packets belonging to the same flow in order to request special handling by intermediate IPv6 routers, such as non-default quality of service or real-time service. In order to distinguish the flow, an intermediate router can use the source address, a destination address, and flow label of the packets. Between a source and destination, multiple flows may exist because many processes might be running at the same time. Routers or Host that does not support the functionality of flow label field and for default router handling, flow label field is set to 0. While setting up the flow label, the source is also supposed to specify the lifetime of the flow. 

Payload Length (16-bits): It is a 16-bit (unsigned integer) field, indicates the total size of the payload which tells routers about the amount of information a particular packet contains in its payload. The payload Length field includes extension headers(if any) and an upper-layer packet. In case the length of the payload is greater than 65,535 bytes (payload up to 65,535 bytes can be indicated with 16-bits), then the payload length field will be set to 0 and the jumbo payload option is used in the Hop-by-Hop options extension header. 

Next Header (8-bits): Next Header indicates the type of extension header(if present) immediately following the IPv6 header. Whereas In some cases it indicates the protocols contained within upper-layer packets, such as TCP, UDP. 

Hop Limit (8-bits): Hop Limit field is the same as TTL in IPv4 packets. It indicates the maximum number of intermediate nodes IPv6 packet is allowed to travel. Its value gets decremented by one, by each node that forwards the packet and the packet is discarded if the value decrements to 0. This is used to discard the packets that are stuck in an infinite loop because of some routing error. 

Source Address (128-bits): Source Address is the 128-bit IPv6 address of the original source of the packet. 

Destination Address (128-bits): The destination Address field indicates the IPv6 address of the final destination(in most cases). All the intermediate nodes can use this information in order to correctly route the packet. 

Extension Headers: In order to rectify the limitations of the IPv4 Option Field, Extension Headers are introduced in IP version 6. The extension header mechanism is a very important part of the IPv6 architecture. The next Header field of IPv6 fixed header points to the first Extension Header and this first extension header points to the second extension header and so on. 

IPv6 packet may contain zero, one or more extension headers but these should be present in their recommended order: 

Rule: Hop-by-Hop options header(if present) should always be placed after the IPv6 base header. 
 

Conventions : 

  1. Any extension header can appear at most once except Destination Header because Destination Header is present two times in the above list itself.
  2. If Destination Header is present before Routing Header then it will be examined by all intermediate nodes specified in the routing header.
  3. If Destination Header is present just above the Upper layer then it will be examined only by the Destination node.

Given order in which all extension header should be chained in IPv6 packet and working of each extension header : 

References: //www.ietf.org/rfc/rfc2460.txt //www.ietf.org/rfc/rfc3697.txt 

//www.cisco.com/en/US/technologies/tk648/tk872/technologies_white_paper0900aecd8054d37d.html 

This article is contributed by Abhishek Agrawal. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to . See your article appearing on the GeeksforGeeks main page and help other Geeks. 

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
 

Toplist

Latest post

TAGs