Short Bytes: IPv6 is the replacement for the IPv4 which is going to run out of its address space soon. In this article, I have tried to elaborate the differences between the two protocols. IPv6 is better in many aspects but it is not backward compatible with the IPv4 which can be considered as its drawback.The internet is a gigantic network of computers across the globe. Billions of devices communicate with each other on daily basis to send and receive data. For instance, when you access a website, you’re communicating with the server computer hosting the website. You send a request for the website and the server sends the relevant data to you.
You just don’t bump into a random server and start requesting for website data. You type the website’s name in your web browser, which, then asks the DNS server to resolve the IP address of the server where the website is hosted. Then a connection is established with the server and a request for website data is made. The website then gets loaded on your web browser.
Where does the IP addresses come from?
These addresses, which look like 22.214.171.124, are the internet protocol addresses assigned to every device which connects to the internet. An IP address is the identity of a device on the internet. It is also useful in routing the internet traffic to and from that device. The data travels in the form of packets having the source and destination IP address in their header which enables them to reach the correct device.
The IP addresses are defined according to the Internet Protocol, included in the Internet Protocol Suite, which is a set of rules to manage how the data packets travel across the internet and reach their destination. Now, for instance, you send 10 packets to a destination. Each packet will know the destination IP address but it’s possible that the packets may take different paths to reach the destination, may not reach in the correct order, or may not reach at all. This is because IP is a connectionless protocol. It doesn’t care about the integrity of the data sent over the network.
The connection-oriented Transmission Control Protocol, also a part of the Internet Protocol Suite, comes in for the rescue operation. TCP ensures that your packets end up safely on the destination computer. It establishes a connection between two communicating devices on the internet and keeps an eye on the order and reliability of the data packets reaching the end device. That’s why the IP is referred as the TCP/IP.
The IPv4 or the Internet Protocol version 4 (RFC 791) was originally used in the ARPANET. Although, it’s the fourth generation of the Internet Protocol but it is the first major version of the Internet Protocol that finds its application for most of the internet. There is newer IPv6 which is in the process of being deployed.
According to IPv4, the IP addresses are actually in binary numbers in the form of 0s and 1s. But they can also be written as decimal numbers separated by a dot. This is done to ensure that they don’t bounce over our heads.
The IPv4 uses a 32-bit address space which is equivalent to 4 bytes. It means that the total number of IP addresses on the internet can go all the way to 2^32. That’s roughly 4.3 billion addresses.
2^32 is a big number but it isn’t enough to accommodate the rising population of internet connected devices like laptops, tablets, smartphones, etc. Hence, the IPv6 protocol has been brought into existence. It has a big address space of 128-bits. And the total number of unique addresses are 2^128. So, the limit of IP addresses goes beyond the reach for many decades or maybe centuries.
The 128-bit IPv6 address looks a bit different than the IPv4 address. Each group separated by a colon (instead of a dot) represents 16-bits in the form of four hexadecimal digits . The 64 bits of the IPv6 address represent the network address which is used for routing and the rest 64 bits give details about the host’s network interface.
What’s the difference: IPv4 vs IPv6
The main difference between the IPv4 and IPv6 is their address space which takes IPv6 ages ahead of the IPv4 protocol. But it isn’t the only difference between the two. There are other things that make IPv6 a better option for the internet.
IPv4 is old and it wasn’t created with much security aspects in mind. It presumes that the endpoint applications have security measures of their own. Still, it has managed to come this far. But the IPv6 is designed to make the journey of the packets more secure. Things, like checking for packet integrity and encrypting the data, have been soldered to the IPv6 which was an attachment in the case of its predecessor.
The IPv6 protocol is designed to ensure end-to-end security over a connection. A major addition IPSec includes cryptographic protocols to enable secure data communication. Authentication Header (AH) and Encapsulating Security Payload (ESP) protocols are part of IPSec which enable authentication and data integrity. ESP also ensures the data privacy. Another main protocol is the Internet Key Exchange (IKE) protocol which is used to set up and establish shared security attributes between two endpoint devices.
IPSec is a major requirement for IPv6. But in the case of IPv4, the IPSec protocol has been implemented as an optional addition.
Fewer things in the head
In the case of IPv6, the packet header doesn’t have unimportant fields. It has only 8 fields in comparison to 13 in the case of IPv4. The extra fields are now optional header extensions. Also, the size of the header (40 bytes) is almost double of IPv4 (20 bytes). The less clutter in the header contributes to simplified packet processing in the router. Thus, making the processing more efficient and less time consuming.
The IPv4 addresses are limited and have to be used for billions of devices on the internet. Hence, the concept of Network Address Translation came into existence. It allows a number of devices to use the same IP address. But wait, IP addresses are unique.
A pool of IP addresses starting from 192.168.0.1 till 192.168.255.254 can be used for private networks such as the ones in organizations or the one we have in our house. The public IP address is assigned to the router and the connected device are allotted to one of the private IPs.
When a packet originates from a device, it goes to the router which changes the source private address in the header with the public address and sends it towards the destination. Similarly, at the time of arrival, it removes the public address from the packet header and puts the private address of the recipient device on the network.
The IPv6 has plenty of addresses at its disposal, so, each device could have its own public address giving it a unique identity on the internet and say goodbye to NAT. This can be helpful in the case of applications like P2P file sharing, multiplayer games, VoIP, streaming, etc.
NAT brings along some benefits for the device by adding an extra layer of security. The devices are not directly visible on the network. IPv6 also has an equivalent of the IPv4 private address in the form of unique local address which is not routable on a global scale.
No Geographical Limitations
Since the US created the internet and internet protocol, the distribution of the IP address pool is also favored for the country. Almost 50 percent of all the IP addresses are reserved for the United States. But in the case of IPv6, there is no preference given to any particular region in the world.
In fact, there is no need of dividing the addresses because 2^128 IP addresses are roughly 4.8×10^28 addresses for each of the 7 billion people on the earth.
Better Quality of Service (QoS) in IPv6
The concept of QoS is very much similar for the IPv4 and IPv6. The contrast lies in the header fields which differentiate the packet processing during the transmission. In the IPv4 header, the 8-bit DS (Differentiated Services) field is used to classify the packet and what kind of service it is associated with. This check is done at almost every intermediate router present in the packet’s path.
The IPv6 header makes the process easier. Its header includes a 20-bit Flow Label field which enables quick processing of the packets. It allows routers to identify and handle packets belonging to the same flow i.e. the packets originating from a particular source and terminating to a particular destination. The flow is recognized by the combination of packet source and the value of Flow Label. The delivery of the packets becomes more efficient and thus, the improves the QoS.
IPv6 Stateless Auto-Configuration
The IPv6 protocol incorporates a feature known as neighbor discovery. This enables machines and routers on a network to find and talk to each other. A device can autoconfigure its IPv6 address and inform other devices. This eliminates the requirement of a DHCP server to auto-configure IP address for the device, as in the case of IPv4. This process is known as stateless auto-configuration
But we can’t kick out DHCP altogether. The stateless auto-configuration is not applicable in practical network scenarios. Thus, IPv6 also supports DHCPv6 which enables stateful auto-configuration through a DHCPv6 protocol.
No backward compatibility
The people at the Internet Engineering Task Force, who designed the IPv6 standard, have expressed their regret on the fact that they didn’t make it compatible with the older IPv4. Actually, they visualized a situation wherein the devices would be running the IPv4 and IPv6 protocols simultaneously in dual-stack mode.
An alternative is to fake it till you make it. This can be achieved by tunneling i.e. putting IPv6 packets inside the IPv4 packets. Also, the network address and protocol translator (translate IPv6 packets into Iv4 packets) can be used to overcome this problem.
Other than the above-stated differences, the IPv6 also supports better multicasting features but doesn’t support broadcasting, unlike IPv4. The IPv6 is built upon the roots of IPv4 following many of its design concepts. This would enable a smooth shift from IPv4 to IPv6 over a period of time. Also, the two protocols are not compatible with each other. So, the devices will have to support both IPv4 and IPv6 protocols until the time IPv6 is omnipresent on the internet.
It’s no denying the fact that IPv6 is better than IPv4 in many aspects. It has been in existence for more than a decade. Yet, its deployment hasn’t been on the butter track despite the fact that the IPv4 address space is burning out. It might be due to constant improvement in the IPv4, like NAT and CIDR which enable efficient use of the limited IP address pool. Still, the IPv6 adoption has been on a slow rise.
Many leading domain name systems now support IPv6 addresses. For example, the Google public DNS. As per Akamai’s IPv6 adoption visualization, Belgium has the highest adoption rate of 41.3% followed by Greece at 24.9% and Germany at 23.3%. These number would rise in the future as more people, organizations, and governments are becoming aware of IPv6’s benefits.
If you have something to add, tell us in the comments below.