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. 32-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. 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 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. This size difference is staggering, once you do the math. Don't worry, we won't make you. 2 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 exist 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, very large number. 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. Whoa, mind blowing, right? Just like how an IPv4 address is really just a 32-bit binary number, IPv6 addresses are really just one 28-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 8 groups of 16-bits each. Each one of these groups is further made up of four hexadecimal numbers. 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, in 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. For this IP, we could apply the first rule, and remove all leading zeros from each group. This would leave us with this. Once we apply the second rule, which is to replace consecutive sections containing just zeros with two colons, we'll end up with this. This still isn't as readable as an IPv4 address, but it's a good system that helps reduce the length a little bit. We can see this approach taken to the extreme with IPv6 loopback address. You might remember that with IPv4, this address is 127.0.0.1. With IPv6, the loopback address is 31 0s with a 1 at the end, which can be condensed all the way down to just ::1. 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 multicast, 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 unitcast. 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 hosts 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 addresses host ID. 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 9 quintillion hosts. Still, sometimes network engineers might want to split up their network for administrative purposes. IPv6 subnetting uses the same CIDR notation that you're already familiar with. This is used to define a subnet mask against the network ID portion of an IPv6 address.