Identifies IPv4 and IPv6 Headers

Source: Internet
Author: User

As we all know, IPv6 brings new features to our network. In terms of usage, it also has multiple advantages. Now, we compare the features of IPv4 and IPv6 headers, because there are many differences between IPv6 headers. Let's take a closer look. Next we will compare IPv4 and IPv6 headers. The Version field does not change in the two Protocols. IPv6 discards the Internet Header Length, Type of Service, Identification, Flags, Fragment Offset, and Header Checksum fields of IPv4. The Total Lenght, Time to Live, and Protocol fields have new names in IPv6. The functions are slightly redefined. The Option field in IPv4 has been removed from the header and changed to the Extension function. Finally, IPv6 adds two new fields: Traffic Class and Flow Label. This section describes each header field of an IPv6 package.

Version: the length of the Version field is still 4 bits, indicating the Protocol Version number.

Traffic Class: This 8-bit field can assign different classes or priorities to the package. It is similar to the Type of Service field of IPv4, leaving room for differentiated services.

Flow Label: The Flow Label field is a new field of IPv6. The source node uses this 20-bit field to handle packet requests in a specific sequence (the result is better than the best-effort forwarding ). For real-time data transmission such as voice and video, you can use the Flow Label field to ensure QoS.

Payload Length: This 16-bit field indicates the Payload Length. Unlike the Total Length field in an IPv4 packet, the value of this field is not counted as the 40-bit IPv6 Header. Only the extensions behind the header and the length of the Data Section are calculated. Because this field is 16 bits long, it can represent a data payload of up to 64 KB. If the payload is larger, it is represented by the jumbogram Extension Section.

Next Header: This 8-bit field is similar to the Protocol field in IPv4, but there are some differences. In an IPv4 packet, the transport layer header, such as TCP or UDP, always follows the IP header. In IPv6, the extension part can be inserted in the IP header and transport layer header. Such extensions include verification, encryption, and sharding. The Next Header field indicates whether the transport layer Header or the extended part is behind the IPv6 Header.

Hop Limit: This 8-bit replaces the TTL field in IPv4. After a specified number of Route segments, the packet is discarded to prevent packet forwarding. When a package passes through a vro, the value of the Hop Limit field is reduced by one. IPv4 uses a time value, which is used to subtract one second from the TTL field each time a route segment passes through. IPv6 replaces the value with the hop value.

Source Address: this field specifies the starting Address of the origin host. The length is 128 bits.

Destination Address: this field specifies the Destination Address of the transmission signal. The length is 128 bits.

Network personnel may be surprised to find that the checksum and fragment fields have disappeared from the IPv6 Header. The header checksum of discarded packets is used to improve the routing efficiency. Although there may still be errors in the packet header, the designers of the new protocol think this risk is acceptable, especially considering the upper and lower layers of the IP layer: the data link layer and the transport layer will check for errors.

As for sharding, IPv6 does allow packet segmentation, but this process is performed in the header extension part rather than the header itself. In addition, the IPv6 package can only be split by the source node and re-assembled by the target node: the router is not allowed to intervene to split or re-assemble the package. The purpose of this sharding feature is to reduce the processing overhead in transmission. Assuming that the size of the network frame is large enough today, most packets do not need to be sharded. If you have to split the IPv6 package, the source node determines the maximum transmission unit (MTU) of each link ). One way is to send a test package to the target address. If the test package is too large for a link, the link returns an Internet Control Message Protocol (ICMP) message to the source node, and the source node reduces the packet size accordingly.

The extension mechanism for implementing the sharding and other options is an important feature of IPv6 re-design. It replaces the Options field of IPv4, which enhances the security function of IPv4 packets and enriches the source route selection. Instead of adding this enhancement feature to the IPv6 Header, the designer designs an extension that can be inserted between the IP header and the higher-level protocol header. This makes the unscalable package process faster and provides a series of extensible options, such as encryption, verification, sharding, source routing, segment, and target options. As mentioned above, these extensions are calculated in the total payload length of the package.

Table 1 IPv4 Header Format

4bit version 4-bit Header Length 8bit service type 16-bit Packet Length
ID (16bit) Df mf standard offset (16 bit)
Survival time (8bit) Transmission Protocol (8bit) Header checksum (16 bit)
Sending address (32bit)
Sink address (32bit)
Option (8bit) ......... Fill

Table 2 IPv6 Header Format

4bit version 4bit priority 24-bit traffic id
Data Length (16 bit) Next packet header (8bit) Maximum number of hops (8 bit)
Starting address (128bit)
Destination Address (128bit)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.