The Internet Protocol (IP) is the fundamental protocol that enables end-to-end communication between hosts on the Internet. Living in the Network Layer of the OSI model, IP is able to reach the intended host by simply using the destination IP address and the routing protocols that have been configured on the networks between the hosts.
IP has gone through a very long development process, resulting in IP version 4 and IP version 6 as the two most prominent versions of this protocol today.
In this article, we’ll examine why that is, we’ll compare these two protocols in order to showcase their differences, and we’ll also explore what the future holds for these protocols.
History
IP versions 1 to 3 were experimental versions designed between 1973 and 1978. IP was first officially described in an IEEE paper in 1974, although it wasn’t referred to by its current name.
In September of 1978, the first protocol to be called IP version 4 with the header structure as we know it today, was described and was later standardized in RFC 791 in 1981.
It is phenomenal to realize that today, over 40 years later, we are still using IPv4 extensively. Such a time period is really an eternity when it comes to networking and is a testament to how well-designed the protocol is.
Its primary limitation today is that the address space IPv4 provides has been exhausted. IPv4 is still extensively in use today only because of the implementation of several innovative features (such as Network Address Translation-NAT) that have provisionally and temporarily overcome this problem.
IPv6 was developed primarily to resolve the problem of IPv4 address space exhaustion. Development started as early as 1994 but was first officially described in 1998.
IPv6 has many additional features that have been added and are useful, and in some cases, vital for today’s networks.
Let’s take a closer look at each of these protocols and how they work.
IPv4
IPv4 Header
Each IP packet is composed of an IP header and the payload. The payload is the actual data we want to transmit, such as part of an email, or part of an image from a web page. The following is an illustration of an IP packet and its components.
When it comes to IPv4, the header contains addressing information that includes the IPv4 source and destination addresses among other information found within various fields. The following diagram shows the structure of an IPv4 header.
Image Source: By Michel Bakni – Postel, J. (Septemper 1981) RFC 791, Internet Protocol, DARPA Internet Program Protocol Specification, The Internet Society, p. 11 DOI: 10.17487/RFC0791., CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=79949694
The fields titled Source address and Destination address contain the addresses that correspond to the IPv4 address of the host sending the packet and the intended recipient of the packet.
IPv4 address format
IPv4 addresses are composed of 32-bit binary numbers. An example of an IPv4 address is as follows:
11000000101010000000000100000001
However, because we humans find it difficult to comprehend such representations of numbers, we use the dotted decimal format, where the value is separated into eight-bit sections, and each section is represented in decimal. The above address written in dotted decimal format is:
192.168.1.1
IPv4 features
A 32-bit address theoretically delivers up to 4,294,967,296 or 4.29 billion unique addresses, but in reality, the number is far smaller.
Many IPv4 address ranges are reserved for specific purposes. The number of usable public IPv4 addresses is actually closer to 3.7 billion.
IPv6
IPv6 header
IPv6 packets are like IPv4 packets in that they too have a header and a payload.
The structure of the header differs substantially. Below is a representation of the IPv6 header.
Image Source: By Michel Bakni – S. Deering, R. Hinden (July 2017) RFC 8200, Internet Protocol, Version 6 (IPv6) Specification, The Internet Society, p. 6 DOI: 10.17487/RFC8200., CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=82498564
What is immediately striking is the size of the Source and Destination address fields. In addition, you can see that the structure is less cluttered with fewer fields in total. We’ll see why this is in a moment.
IPv6 address format
IPv6 addresses are represented by 128-bit binary numbers. An example of such an address will be a series of 128 zeros and ones.
Once again, because we humans find it difficult to gain any useful information from such a representation, we use eight groups of 16 bits each written in hexadecimal, with each group separated by a colon. For example, an IPv6 address in hexadecimal representation is as follows:
2001:ABCD:0000:0000:0000:0000:0000:0001
This can be further reduced by replacing any consecutive sections of zeros with two colons (::) resulting in the following:
2001:ABCD::0001
And finally, we can also remove any leading zeros from any group of 16 bits resulting in:
2001:ABCD::1
The truth is it takes a bit of practice to get familiar with all of these representation rules, especially for those that have had experience only with IPv4. However, after a few exercises and a bit of practice, you will find that you will quickly get the hang of it.
IPv6 features
The 128-bit IPv6 address space can represent up to 340,282,366,920,938,463,463,374,607,431,768,211,456 unique addresses. That’s 2128 or 3.4 x 1038 unique addresses.
With such a large number, each square meter on the face of the Earth (including oceans) can be assigned vastly more addresses than the full IPv4 address space! You can see that we won’t have an address space exhaustion any time soon with IPv6.
But a large address space is not the only thing that is new with IPv6. Some of the most important features include:
- The use of extension headers – The IPv6 header is modular, and you can append additional headers based on what features are needed. Extension headers are used for things like inherent security, packet flow (QoS), and mobility to name a few.
- Stateless autoconfiguration – IPv6-enabled devices are able to obtain their own IPv6 address and gateway information from the local router without the need for any network configuration.
- Simplified processing by routers – IPv6’s elegant design makes the processing of IPv6 packets more efficient than IPv4, due to the less complex header design.
Comparison Table of IPv4 and IPv6
IPv4 | IPv6 | |
Address format | 32-bit address length | 128-bit address length |
Address space size | 4.29 x 109 unique addresses | 3.4 x 1038 unique addresses |
Address representation | Dotted decimal format | Hexadecimal format |
Extension headers | No | Yes |
Stateless autoconfiguration | No, DHCP server is needed for the automatic setup of networking parameters | Yes |
Packet fragmentation | Performed by the sender and by forwarding routers | Performed only by the sender |
Packet flow | No packet flow identification | Packet flow identification is available |
Layer 2 address discovery | Address Resolution Protocol (ARP) | ARP is replaced with a more efficient Neighbor Discovery Protocol (NDP) |
Broadcasts? | Yes | Broadcasts are replaced by multicasts |
Security | No inherent security features, must depend on application to apply security | Inherent security can be applied using extension headers |
What the future holds
The Internet is currently in the middle of a transition from IPv4 to IPv6. World IPv6 Launch Day was declared on June 6, 2012, and world IPv6 adoption, according to Google, is still around 40% as of the date of this writing.
As you can see, the transition is literally taking decades for reasons that we will not go into here. What this means is that IPv4 is still around and is expected to be around for a long time yet. It is estimated that IPv4 will still have a substantial presence on the worldwide Internet well into the early 2030s.
Even so, IPv6 will eventually take over, and it is expected to be around for decades to come. Just like IPv4 has lasted over 40 years, IPv6 is also expected to have similar longevity.
Hmm, that’s an interesting thing to think about, where will you be when IPv6 is replaced?
Useful links:
- IEEE paper on “A Protocol for Packet Network Intercommunication” which is the first documentation describing IP.
- RFC 791 – Official initial standardization of IPv4
- RFC 2460 – Official initial standardization of IPv6
- RFC 8200 – Currently valid standardization of IPv6
Related Posts
- What is OSPF NSSA (Not So Stubby Area) and How is it Configured?
- Comparison of BOOTP vs DHCP Protocols in Computer Networks
- Pros and Cons of SD-WAN in Networks – Description and Discussion
- Comparison of GNS3 vs EVE-NG vs Packet Tracer for Networks Simulation
- Subnetting vs Supernetting – What’s the Difference? (Explanation Guide)