Have you ever wondered how computers and devices communicate with each other? One key is IP addresses.
An IP address is a string of numbers assigned to a domain or device that connects to the internet. This address is part of the Internet Protocol, a set of rules governing how data should be addressed and routed across the internet. IP addresses are designed so that the location of any domain or digital device connected to the internet can be pinpointed and distinguished from another. This enables devices to send and receive data from each other.
IP addresses have different formats depending on the version of the Internet protocol the device or network is using. In this post, we’ll explain the key differences between the two versions, IPv6 and IPv4.
What is IPv6?
IPv6 is the latest version of the Internet Protocol. In this format, IP addresses consist of eight sets of four hexadecimal digits separated by colons. Possible values of a hexadecimal digit are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f.
The IPv6 address of my computer, for example, is 2601:19b:700:b70:1106:49ab:ac46:2e12.
First deployed in 1999, this protocol was designed to eventually replace IPv4.
What is IPv4?
IPv4 is the fourth version of the Internet Protocol (although it was the first formal standard — or public version — of IP deployed in 1981). In this format, IP addresses consist of four numbers separated by dots, with each number ranging from zero to 255.
The IPv4 address of my computer, for example, is 71.232.101.120.
IPv6 vs IPv4
IPv6 is the latest version of the Internet Protocol that's designed to replace IPv4 eventually. An IPv6 address is a 128-Bit IP address that uses both letters and numerals. IPv4 is the fourth version of the Internet Protocol, which still routes the majority of internet traffic. An IPv4 address is a 32-Bit IP address that uses numerals only.
While these two versions of the Internet Protocol are primarily differentiated by how they are formatted, they also differ in terms of speed, security, and header. Let’s take a closer look at each of these differences below.
Address
IPv6 addresses are made up of 128 binary bits separated by colons(:). They consist of letters and numerals. The possible values include: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f.
IPv4 addresses are made up of 32 binary bits separated by dots(.). They consist of numerals only, ranging from zero to 255.
As you can tell, the IPv6 address format is more complicated than IPv4. This is by necessity.
Using the IPv4 format, there were approximately 4.3 billion unique IP addresses available. That seemed like plenty a couple of decades ago. But as more and more devices connected to the internet, we began to run out of possible IPv4 addresses. Thus, IPv6 was born.
With the IPv6 format, there’s a theoretical maximum of 340,282,366,920,938,463,463,374,607,431,768,211,456 unique IP addresses. This number is so large that it essentially means infinity — we will never run out of IP addresses again.
While IPv4 is still the predominant protocol on the internet, it is slowly being transitioned out in favor of IPv6.
Here’s a nice illustration of the difference between IPv6 and IPv4 addresses:
Header
Despite looking more complicated, IPv6 actually has simplified header addresses than IPv4. While IPv4 offers 12 header fields, IPv6 dropped or made some fields optional so it only offers eight. These less common fields can still be used if needed in IPv6 extension headers. This reduces how much bandwidth is required to process IPv6 headers.
With IPv4, six fields need to be processed by an intermediate router. With IPv6, only four need to be. This also makes the forwarding of most IPv6 packets more efficient.
However, IPv6 headers do contain source and destination addresses that are four times longer than those of IPv4 headers (128 vs 32 bits). This makes the IPv6 headers heavier.
Here’s an illustration of the structure of an IPv6 header, which includes the eight fields:
Here’s an illustration of the structure of an IPv6 header, which includes all 12 fields:
Speed
IPv6 and IPv4 both have advantages and disadvantages that result in them having similar performance.
For example, IPv6 has simplified, more efficient routing than IPv4. That’s because IPv4 has to spend time on Network Address Translations (NAT). NAT was a stop-gap measure created when the supply of available IPv4 began running low. Basically, it’s a way to map multiple local private addresses to a public IP address before transferring the information, which allows multiple devices to employ a single IP address. The NAT gateway then directs incoming information and requests to the appropriate local private address.
Because IPv6 has so many available addresses, it does not require this resource-intensive workaround. However, IPv6 typically has larger packets of data, which can make it slower.
IPv4 also has more mature and optimized networks than IPv6 at this time. But as IPv6 is more widely adopted, these networks will get faster.
In short, IPv6 and IPv4 have about the same performance so don’t use speed as part of your criteria to decide which to adopt for your website or network.
Security
Internet Protocol Security (IPsec) is a system designed to provide cryptographically-based security for both IPv6 and IPv4. Although released after IPv4, IPsec was retrofitted to IPv4. It is still optional for IPv4 but mandated for IPv6.
IPsec offers a range of security services including access control, connectionless integrity, data origin authentication, protection against replays, confidentiality (ie. encryption), and limited traffic flow confidentiality.
This set of services is provided through the use of two traffic security protocols, the Authentication Header (AH) and the Encapsulating Security Payload (ESP), as well as cryptographic key management procedures and protocols.
However, the level of security offered by the use of these protocols ultimately depends on how they were implemented and the operating environment in which they were implemented (either a web host or a security gateway environment).
So, in short, when properly implemented and configured, an IPv4 network can be as secure as an IPv6 network. So don’t use security as part of your criteria to decide which to adopt for your website or network.
The Different Formats of IP Addresses
The internet protocol allows blocks of data — otherwise known as packets or datagrams — to be transmitted from sources to destinations, which are identified by unique addresses known as IP addresses. We’ve covered the two versions of the internet protocol that exist today at length. While IPv4 makes up the majority of today’s traffic, eventually it will transition to IPv6 out of necessity. So it’s important to understand both IPv6 and IPv4 and how they compare in terms of addresses, headers, speed, and security.