Table of Contents
The End of IPv4
IP: A set of rules in the internet to send packets, the data units, to their correct destination.
Even if you’re not a developer, you’ve likely heard of the term IP. And if you have an interest in IT, you’ve probably heard that IPv4 has been completely exhausted (a story that has been around for about 10 years). Today, we explore what IP is, why IPv4 is running out, and how it’s still being used despite this depletion!
Internet Protocol
1. IP
Internet Protocol is a set of rules primarily used for exchanging information in the form of packets between sending and receiving hosts on a packet exchange network. It is responsible for addressing hosts and fragmenting and reassembling packets in the OSI network layer.
Wikipedia
For two nodes on a network to communicate, they need to follow a common protocol. IP is the protocol for the internet. Its most significant feature is packet exchange, where data is sent in units called packets. Each packet is routed individually between nodes, contrasting with the circuit-switching method, which maintains a dedicated communication connection throughout the transmission.
2. IPv4
To identify a node on a network, an address is required. IPv4 is a widely used IP addressing system consisting of four 8-bit sections. It is commonly expressed in decimal for ease of readability. With a total of 32 bits, it can represent 2^32 or 4,294,967,296 addresses. Established in September 1981, it seemed sufficient back then, but with the proliferation of communication devices today, it has become inadequate. Nevertheless, it’s still the most widely used addressing system.
3. IPv6
IPv6 is a 128-bit addressing system developed to solve the exhaustion of the 32-bit IPv4 addresses. It can represent 2^128 addresses, approximately 3.4*10^38 (a number that’s hard to even read). Unlike IPv4, it’s usually expressed in hexadecimal. Besides expanding the address space, IPv6 introduces additional features like automatic host address configuration, packet size expansion, and enhanced security. Although its adoption is increasing, IPv4 usage is still higher.
4. The Forgotten IPv5
You might have heard about IPv4 and IPv6, but probably never about IPv5. That’s because IPv5 was never officially adopted as a official protocol. Developed under the name Internet Stream Protocol by Apple, NeXT, and Sun Microsystems, IPv5 was designed for transmitting video and audio data. Although more efficient than IPv4 for such data, it still used a 32-bit addressing system, leading to the same address depletion issues as IPv4. Thus, it was abandoned in favor of moving directly to IPv6.
Why IPv4 Hasn’t Died Yet
1. IPv4 Depletion
In reality, IPv4 has virtually been depleted. On February 4, 2011, IPv4 addresses were exhausted, leading to a halt in allocations by IANA(Internet Assigned Numbers Authority) to regional management organizations, and by 2015, North American IP agencies had run out. While some agencies may still have a small surplus, it’s essentially considered depleted. So how are we still getting IPv4 addresses for new AWS EC2 instances?
2. Private IPs
One reason IPv4 continues to be used is the delay in exhaustion due to private IPs. When we talk about IP addresses, we usually mean public IPs, which are necessary for identifying a node on the internet. However, in privately configured networks not connected to the internet, private IPs can be used. These private IPs can access the internet through NAT (Network Address Translation) servers. To avoid confusion, public and private IP address ranges are distinct.
RFC 1918 name | IP address range | Number of addresses | Largest CIDR block (subnet mask) | Host ID size | Mask bits | Classful description[Note 1] |
---|---|---|---|---|---|---|
24-bit block | 10.0.0.0 – 10.255.255.255 | 16777216 | 10.0.0.0/8 (255.0.0.0) | 24 bits | 8 bits | single class A network |
20-bit block | 172.16.0.0 – 172.31.255.255 | 1048576 | 172.16.0.0/12 (255.240.0.0) | 20 bits | 12 bits | 16 contiguous class B networks |
16-bit block | 192.168.0.0 – 192.168.255.255 | 65536 | 192.168.0.0/16 (255.255.0.0) | 16 bits | 16 bits | 256 contiguous class C networks |
A typical use of private IPs is in households. Various devices like family members’ phones, computers, tablets, and IoT gadgets need internet connections. If each device had a public IP address, IPv4 would have been exhausted much sooner. Fortunately, each device uses a private IP and accesses the internet through NAT (routers).
3. Cloud Companies and IPv4 Management
Though private IPs have delayed IPv4 exhaustion, how do cloud companies use IPv4 addresses in this depleted state? First, the depletion of addresses doesn’t mean all IPv4 addresses are in use. Corporations own and manage IPv4 addresses.
3-1. Purchasing IPv4 Addresses
The most straightforward approach is simply buying additional IPv4 addresses. Since IP addresses are assets that can be purchased and owned, cloud companies often buy IPv4 addresses. For example, in 2017, MIT sold 8 million addresses, and companies like Amazon were among the buyers. As of 2020, Amazon reportedly owns about 100 million IPv4 addresses, valued at approximately 2.5 billion dollars.
3-2. Reclaiming IPv4 Addresses
When creating an AWS EC2 instance, an IP address is assigned from Amazon’s public IPv4 address pool, unrelated to the user’s account. This address is relinquished when the instance is stopped or when an Elastic IP is associated with the instance, making it available for reuse. IPv4 addresses, being valuable assets, are managed by cloud providers to ensure they are not unnecessarily occupied.
The Adoption Rate of IPv6
The fundamental solution to IPv4 depletion is adopting IPv6. Although slow, global support for IPv6 is gradually increasing. A website summarizing national IPv6 support rates gives an idea of its adoption. Green indicates high support rates, while red indicates low ones.
Globally, the support rate for IPv6 is 31%. India has the highest support rate at 60%, while South Korea has a very low rate of 7.8%. Perhaps the low rate in South Korea is due to the country being allocated 100 million IPv4 addresses and the extensive use of private IPs. Despite early 2000s concerns, the depletion of IPv4 hasn’t caused major problems. However, as the number of internet-connected devices inevitably increases, the adoption of IPv6 is expected to rise.