Difference Between IPv4 and IPv6 | Full Explaination
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 type the website’s domain 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 127.0.0.1, 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 [This mean using TCProtocol].
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 connection less protocol. It doesn’t care about the integrity of the data sent over the network.
The connection-oriented Transmission Control Protocol “TCP”, 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 was originally used in the ARP A NET. 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.
Reduces the need of NAT:
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.
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.
So for that IPv6 is the winner 😀 Share this article with you’re friends, and do not forget to leave you’re opinion below 🙂