Confused by the difference between IPv4 and IPv6?
IP, short for Internet Protocol, is a protocol that helps computers and devices communicate with each other over a network. As the “v” in the name indicates, there are different versions of the Internet Protocol: IPv4 and IPv6.
In this article, I’m going to dig deeper into everything you need to know to understand the difference between IPv4 and IPv6.
What is Internet Protocol (IP)?
Internet Protocol (IP) is a set of rules that facilitate the routing of data packets so that they can travel over networks and reach the correct destination.
When a computer tries to send information, the information is broken down into small pieces, called packets. In order to ensure that these packets all arrive at the right place, each packet contains IP information.
The other part of the puzzle is that each device or domain on the Internet is assigned an IP address that uniquely identifies it to other devices.
This includes your own computer, you’ve probably come across this before. If you use one of the many “What’s My IP Address” tools, you will get your computer’s IP address and a rough estimate of your location (which should be correct unless you are using a VPN).
Your most familiar IP address probably looks like this:
The IP address that you’re most familiar with probably looks something like this:
32.253.431.175
By assigning each device an IP address, networks are able to efficiently route all of these data packets and ensure they get to the right place.
What is IPv4?
Despite the “4” in the name, IPv4 is actually the first version of IP to be used. It was released in 1983 and even today it remains the best-known version for identifying devices on a network.
IPv4 uses a 32-bit address, which is the format you are probably most familiar with when you say “IP address”. This 32-bit address space provides nearly 4.3 billion unique addresses, although some IP blocks are reserved for special uses.
Here is an example of an IPv4 address:
32.253.431.175
What is IPv6?
IPv6 is a newer version of IP that uses a 128-bit address format and includes both letters and numbers. Here is an example of an IPv6 address:
3002: 0bd6: 0000: 0000: 0000: ee00: 0033: 6778
Why do we need a new version of IP?
At this point, you might even be wondering why IPv6 exists.
Well, while the 4.3 billion potential IP addresses in IPv4 may sound like a lot, we need a lot more IP addresses!
There are a lot of people in the world who have a lot of devices. This problem is even more important with the rise of IoT (Internet of Things) devices and sensors, as these dramatically expand the number of connected devices.
To put it simply, the world was running out of unique IPv4 addresses, which is the main reason we needed IPv6.
But there are also other more down-to-earth technical reasons, which we will discuss.
What is the difference between IPv4 and IPv6?
Now let’s move on to the difference between IPv4 and IPv6.
The most obvious difference, and the most applicable for ordinary people, is the difference in formats:
IPv4 uses a 32-bit address
IPv6 uses a 128 address
Without going into the calculations (we’ll keep this for the next section), this means that IPv6 offers 1,028 times more addresses than IPv4, which essentially solves the “lack of addresses” problem (at least for the foreseeable future).
IPv6 is also an alphanumeric address separated by periods, while IPv4 is only numeric and separated by periods. Here is an example of each again:
IPv4 – 32.253.431.175
IPv6 – 3002: 0bd6: 0000: 0000: 0000: ee00: 0033: 6778
There are also a few technical differences between IPv4 and IPv6, although non-developers don’t really need to know them. Here are some of the most notable technical differences:
IPv6 includes built-in Quality of Service (QoS).
IPv6 has a built-in network security layer (IPsec).
IPv6 eliminates network address translation (NAT) and enables end-to-end connectivity at the IP layer.
Multicast is a basic specification for IPv6, while it is optional for IPv4. Multicast allows a packet to be transmitted to multiple destinations in a single operation.
IPv6 has larger packet headers (about twice the size of IPv4).
How many addresses are there in IPv4 and IPv6?
As we mentioned above, IPv6 supports 1,028 times more IP addresses than IPv4.
IPv4 supports approximately 4.29 billion addresses.
IPv6, on the other hand, supports … well, the simplest way to write it is 2 ^ 128 different addresses. If you want to know the exact number, here is the number of unique addresses that IPv6 offers: 340,282,366,920,938,463,463,374,607,431,768,211,456
This means that we still have a long way to go before we run out of IPv6 addresses!
Is there a difference between the speed of IPv4 and that of IPv6? What is the fastest?
In general, there is no major difference between IPv4 and IPv6 speeds, although there is some evidence to suggest that IPv6 might be slightly faster in some situations.
In terms of no difference, Sucuri ran a series of tests on sites that supported both IPv4 and IPv6 and found that there was virtually no difference at most of the sites tested.
However, you can also find evidence showing that IPv6 is faster. For example, Facebook’s Engineering blog said, “We have observed that accessing Facebook can be 10-15% faster over IPv6”.
Likewise, Akamai tested a single URL on an iPhone / mobile network and found that the site had a median load time that was 5% faster with IPv6 compared to IPv4.
However, there are a lot of variables, so it is difficult to compare performance without conducting tightly controlled experiments.
One of the reasons that IPv6 might be faster is that it doesn’t waste time on Network Address Translation (NAT). However, IPv6 also has larger packet headers, so it could potentially be slower in some use cases.
IPv4 or IPv6: Which is more popular?
Although the numbers change as IPv6 increases in adoption, IPv4 remains the most widely used Internet protocol.
Google maintains public statistics on the availability of IPv6 for Google users by country around the world. These numbers represent the percentage of all traffic to Google sites that is on IPv6, rather than IPv4.
Worldwide, IPv6 has about 32% availability, but it differs greatly from country to country. For example, the United States has over 41% IPv6 adoption, while the United Kingdom has around 30% and Spain only 2.5%.