The IPv4 Address Exhaustion Problem

🤔 Why IPv6 was Developed

Time for some real talk. Here's the hard truth. The IANA is out of IP addresses. When IPv4 was first developed, a 32-bit number was chosen to represent the address for a node on a network. The Internet was in its infancy and no one really expected it to explode in popularity the way it has. Thirty-two bits were chosen, but it's just not enough space for the number of Internet-connected devices we have in the world. IPv6 was developed exactly because of this issue.

📈 The Development of IPv6

By the mid-1990s, it was more and more obvious that we were going to run out of IPv4 address space at some point, so a new Internet Protocol was developed. Internet Protocol version 6 or IPv6. You might wonder what happened to version 5 or IPv5. It's actually a fun bit of trivia. IPv5 was an experimental protocol that introduced the concept of connections. It never really saw wide adoption and connection state was handled better later on by the transport layer and TCP. Even though IPv5 is mostly a relic of history, when development of IPv6 started, the consensus was to not reuse the IPv5 name.

🔍 The Differences Between IPv4 and IPv6

The biggest difference between IPv4 and IPv6 is the number of bits reserved for an address. While IPv4 addresses are 32 bits, meaning there can be around 4.2 billion individual addresses, IPv6 addresses are 128 bits in size. The size difference is staggering once you do the math. 💻

🔢 The Massive IPv6 Address Space

Don't worry, we won't make you. Two to the power of 128 would produce a 39-digit long number. That number range has a name you've probably never even heard of, an undecillion. An undecillion isn't a number you hear a lot because it's ginormous, there really aren't things that exists at that scale. Some guesses on the total number of atoms that make up the entire planet earth and every single thing on it get into that number range. That should tell you we're talking about a very large number. 🌍

📝 Writing IPv6 Addresses

If we can give every atom on Earth its own IP address, we'll probably be okay when it comes to network devices for a very long time. Just for fun, let's look at what that number actually looks like. It looks like this. 🤯

Wow, mind-blowing. Just like how an IPv4 address is really just a 32-bit binary number, IPv6 addresses are really just 128-bit binary numbers. IPv4 addresses are written out in four octets of decimal numbers just to make them a little more readable for humans. But trying to do the same for an IPv6 address just wouldn't work. Instead, IPv6 addresses are usually written out as eight groups of 16 bits each. Each one of these groups is further made up of four hexadecimal numbers. 🔢

📒 Reserved IPv6 Address Spaces

A full IPv6 address might look something like this. 💻 That's still way too long, so IPv6 has a notation method that lets us break that down even more. A way to show how many IPv6 addresses there are is by looking at our example IP. Every single IPv6 address that begins with 2001:0db8 has been reserved for documentation and education or for books and courses just like this one. That's over 18 quintillion addresses, much larger than the entire IPv4 address space reserved just for this purpose. 🤯

There are two rules when it comes to shortening an IPv6 address. The first is that you can remove any leading zeros from a group. The second is that any number of consecutive groups composed of just zeros can be replaced with two colons. I should call out that this can only happen once for any specific address. Otherwise, you couldn't know exactly how many zeros were replaced by the double colons. 🔍

🌐 Other Reserved IPv6 Address Spaces

The IPv6 address space has several other reserved address ranges besides just the one reserved for documentation purposes or the loopback address. For example, any address that begins with FF00:: is used for multi-cast, which is a way of addressing groups of hosts all at once. It's also good to know that addresses beginning with FE80:: are used for link-local unicast. Link-local unicast addresses allow for local network segment communications and are configured based upon a host's MAC address. The link-local address are used by an IPv6 host to receive their network configuration, which is a lot like how DHCP works. The host's MAC address is run through an algorithm to turn it from a 48-bit number into a unique 64-bit number. It's then inserted into the address's host ID. 💻

🔍 The IPv6 Address Structure

The IPv6 address space is so huge, there was never any need to think about splitting it up into address classes like we used to do with IPv4. From the very beginning, an IPv6 address had a very simple line between network ID and host ID. The first 64 bits of any IPv6 address is the network ID, and the second 64 bits of any IPv6 address is the host ID. This means that any given IPv6 network has space for over nine quintillion hosts. 🤯 Still, sometimes network engineers might want to split up their network for administrative purposes. IPv6 subnetting uses the same cider notation that you're already familiar with. This is used to define a sub-net mask against the network ID portion of an IPv6 address. 💻

Last updated