IPv6 will replace IPv4 as the main internet protocol in the near future. That’s because, with IPv4, we could eventually run out of unique IP addresses to assign. The new internet protocol solves that problem. But how does it work, and is IPv6 better than IPv4?
IPv4 is the current protocol for creating, assigning and using IP addresses. The first widespread version of IP addresses was IPv4. This internet protocol uses 32-bit numerical addresses, which means it can have approximately 4.3 billion unique IP addresses.
When IPv4 was created 40 years ago, however, engineers did not imagine that millions of people would own at least a few internet-connected devices each the way we do now. It is now clear that IPv4 won’t be able to provide enough IPs for the global population. To make things worse, in the early days of IPv4, big corporations were allocated billions of IP addresses. Though they still haven’t been used to this day, they also refuse to give them back to the world, and we are running out of IPs.
In the ‘90s, an upgrade called IPv6 introduced 128-bit IP addresses. IPv6 provides nearly 3.4×10 ^ 38 unique addresses. That’s 340 trillion trillion trillion IP addresses (340,282,366,920,938,463,463,374,607,431,768,211,456, to be precise). That’s a lot more than IPv4’s 4.3 billion unique addresses.
Despite its obvious superiority in scale, IPv6 is yet to be fully adopted for several reasons.
The main difference between IPv4 and IPv6 protocols is that IPv4 addresses use 32 bits, while IPv6 is a 128-bit protocol. Learn below about more differences between these two protocols.
IPv4 | IPv6 | |
---|---|---|
32-bit address length | 128-bit address length | |
Provides 4.3 billion IP addresses | Provides 340 trillion trillion trillion IP addresses | |
Protocol security is dependent on individual applications | Protocol incorporates IPSEC security | |
Addresses are represented in decimals | Addresses are represented in hexadecimals | |
Fragmentation is carried out by the sender and forwarding routers | Fragmentation is carried out by just the sender | |
Packet flow identification is not available | Packet flow identification is available | |
Checksum field is available | Checksum field is not available | |
20-60 byte header | 40 byte header |
IPv4 addresses use 32 bits with dot-separated decimal notation. An example IPV4 address is localhost – 127.0.0.1. In binary, this would be written as 01111111.00000000.00000000.00000001.
IPv6 addresses use 128 bits with colon-separated hexadecimal notation. An example IPv6 address would be 2001: db8: 3333: 4444: 5555: 6666: 7777: 8888. As a 128-bit format, the binary format would be a bit long to write out for the purposes of this post.
As mentioned earlier, the longer addresses and hexadecimal notation make for a vastly greater number of addresses in IPv6.
In IPv4, the header can be 20 to 60 bytes in length. It will usually be limited to 20 bytes unless options are set at the end of the header.
In IPv6, headers have a fixed size of 40 bytes. Instead of IPv4’s Options header element, IPv6 allows for extensions, which help future-proof the protocol by making it easier to incorporate future technologies.
IPv6’s larger headers imply greater overhead. However, the larger header offers a number of advantages due to the built-in elements:
IPv4 offers broadcast, unicast, and multicast addresses. This differentiation is achieved by reserving certain IP addresses and restricting them from general use. IPv4 addresses can be used for anycast as well, but this is not a defined address type in IPv4.
IPv6 offers unicast (global, link-local, loopback, unspecified, unique local), multicast (well – known, transient, solicited-node), and anycast addresses.
Note: For anycast to work in IPv6, the routing device needs to be told that it is sharing an anycast address.
Address configuration is quite different in these two protocols.
In IPv4, addresses are configured manually or via DHCP (Dynamic Host Configuration Protocol).
IPv6 supports manual, SLAAC (StateLess Address AutoConfiguration), and DHCPv6 (stateless / stateful) configuration. In most use cases, this makes IPv6 much easier to configure and run.
IPv4 uses ARP (Address Resolution Protocol) to link internet IPv4 addresses to local link-layer addresses like MAC addresses.
IPv6 uses NDP (Neighbor Discovery Protocol) to interconnect local devices and to connect them to the local network’s internet gateway.
Here are a few similarities between IPv4 and IPv6 technologies:
In addition to the critical benefit of solving the IPv4 address shortage, IPv6 has a few key advantages that users will enjoy when it is finally adopted:
IPv6 was built with security in mind. It provides confidentiality, authentication and data integrity. The Internet Control Message Protocol (ICMP), an IPv4 component, can carry malware, so corporate firewalls often block it. IPv6 ICMP packets, on the other hand, can use IPsec, making them much safer.
Unlike IPv4 addresses, IPv6 addresses won’t favor any part of the world and will be available to everyone. 50 % of IPv4 addresses were reserved for the US when it was created.
IPv6 has longer headers but they are consistent, unlike IPv4’s variable headers. This could mean that the code for routing to these addresses will become simpler and will also require less hardware processing. In this case, IPv6 would have better service quality and user experience.
Engineers created the Network Address Translation (NAT) method to help solve the lack of IP addresses. IPv6 would create enough IP addresses for all devices, which would render NAT no longer necessary. Each device can now connect to the internet and “communicate” with websites directly.
Arguably one of the best features IPv6 has is the aforementioned stateless auto-configuration. This allows devices to assign themselves IP addresses without needing a server. Instead, IP addresses are generated using the device’s MAC address, which is unique to every phone, tablet or laptop you own. This makes it easier for devices connected to the same network to discover each other.
Here’s a short video explaining it further:
Is IPv6 also faster than IPv4? There is no clear answer right now, and there might not be until IPv6 is broadly adopted. Though the differences in performance give IPv4 a slight edge, the difference is quite small. Sucuri tested the response time of 22 domains in 6 different locations and found out that IPv6 is slightly slower than its predecessor, but only by a fraction of a second. This probably wouldn’t be perceptible to a human browsing the internet. The speed test also showed that the response time might also be affected by location.
You can use both IPv4 and IPv6. Browsers check whether IPv6 is supported by a website. If not, they send a request via IPv4.
While both have some benefits, the internet as a whole will gradually shift towards using IPv6, for the reasons outlined in this article.
You might be wondering what IPv6 has to do with VPNs. Well, many major VPN providers don’t actually support IPv6, including NordVPN. If you’re using an IPv4 address, however, that should work perfectly with your VPN; your data will be protected as it travels through the encrypted tunnel with the IPv4 protocol.
In fact, the majority of VPN software operates on IPv4. If you were to attempt using IPv6 over an IPv4 only VPN, it would probably redirect your IPv6 traffic through the default gateway and ISP. Your IPv6 traffic would travel outside the secure VPN tunnel.
At this time, part of our solution involves disabling most IPv6 traffic to ensure that user traffic is secure. However, NordVPN is planning to support IPv6 in the future.