Difference Between IPv4 and IPv6 Headers

IPv4 vs IPv6 Headers

IPv4 (Internet Protocol version 4) is the fourth version of the Internet Protocol (IP). It is used on packet-switched Link Layer networks such as Ethernet. IPv4 uses the best effort delivery method, which does not provide a guarantee of delivery. IPv4 packet is made up of a header and a data section. This header contains fourteen fields. IPv6 (Internet Protocol version 6) is the version of IP that followed the IPv4. IPv6 was developed as a solution to the address exhaustion of IPv4. IPv6 packets are also made up of a header and a data section. The IPv6 header is made up of fixed size part that could provide the main functionality and the option to extend the header to include special features.

What are IPv4 Headers?

Version

(4 bits)

IHL (Internet Header Length)

(4 bits)

Type of Service

(8 bits)

Total Length

(16 bits)

Identification

(16 bits)

Flags

(3 bits)

Fragment Offset

(13 bits)

Time to Live

(8 bits)

Protocol

(8 bits)

Header Checksum

(16 bits)

Source IP Address

(32 bits)

Destination IP Address

(32 bits)

Options

(variable length)

Padding

(variable length)

In the IPv4 header, the source address and the destination address has the length of 32 bits. Therefore, the IPv4 allows an address space of 4.3×109 (232) addresses. Among these, some addresses are reserved for special uses such as private networks or multicast addresses, which further reduces the available number of addresses for public use.

What are IPv6 Headers?

Version

(4 bits)

Traffic Class

(8 bits)

Flow Label

(20 bits)

Payload Length

(16 bits)

Next Header

(8 bits)

Hop Limit

(8 bits)

Source Address

(128 bits)

Destination Address

(128 bits)

The header of IPv4 consists of a fixed part and an extension. The fixed part contains the source and destination addresses, a hop counter and a reference to the extension header (if there is a one). One of the important features in IPv6 header is the large address space. Both source and destination addresses are allowed to have 128 bits. This would create a 3.4×1038 (2128) address space. The extension header contains special information like information about routing, security, etc.

What is the difference between IPv4 and IPv6 Headers?

IPv4 is the fourth version of the Internet Protocol and IPv6 is the successor of IPv6. The most important difference between these two is the size of address space. IPv4 allows only 32 bit source and destination addresses, whereas IPv6 allows 128 bit source and destination addresses. This makes the address space of IPv4 4.3×109 (232) and the address space of IPv6 3.4×1038 (2128), which is much larger. Furthermore, IPv4 contains a space allocated for options, but in IPv6 this section is moved to the extension header. In addition, IPv6 header has a fixed size of 40 bytes, while the IPv4 header could be variable in size due to the options section in the IPv4 header. Also some of the sections in the header have been renamed. For example, the type of service has been renamed to traffic class; total length has been renamed to payload length, etc. Furthermore, some of the fields in the IPv4 such as IHL, identification, flags are not present in IPv6.