The questions I am most often asked when I discuss IPv6 with someone for the first time are “what is IPv6” and “why do we need a new version of IP?” Once it is understood that we simply do not have enough IPv4 addresses available for the Internet to continue to grow much beyond its current state, the next question is the one that I explore here: How much IPv6 is there?
The most obvious answer is the one most commonly given; that IPv6 addresses are 128 bits long and since each bit is a binary digit, we get a theoretical total of 2^128 individual IPv6 addresses, which is 3.40282367 × 10^38 or 340,282,366,920,938,463,463,374,607,431,770,000,000!
Now we have this giant number but no real concept of what it means. Some have explained it as 5×10^28 (roughly 50,000,000,000,000,000,000,000,000,000) addresses per human on Earth or as 2^96 (7.92281625 × 10^28) times more unique addresses than are available with IPv4. But this is not a fair comparison because the IPv6 standards are designed in such a way that individual IPv6 addresses are almost meaningless, far less meaningful than individual IPv4 addresses currently are.
Basically, this is due to the fact that almost all IPv4 deployments leverage NAT or at least follow fairly strict efficient utilization requirements and IPv6 deployments do not. Network Address Translation (NAT) allows a single IPv4 address to represent multiple hosts and/or nodes on the Internet at the same time. Efficient utilization policies at the various RIRs require that individual IPv4 addresses assigned to an organization be utilized beyond a set threshold (80% at this time) before more IPv4 addresses will be allocated or assigned to that organization. Combined, this means that almost every single allocated IPv4 address represents (at least) one Internet host. IPv6 on the other hand does not use NAT (this is a very good thing overall but means that the many to one leveraging which is possible with IPv4 addresses is not possible with IPv6 addresses) and is subject to much looser efficient utilization policies in the various regions. All together, this just means that one to one comparisons between the numbers of individual addresses under each protocol are not an apples to apples contrast.
So what is an apples to apples comparison? There may not be one perfect answer to that but there are several possibilities which we can explore. They all include looking at common subnetting practices to find a more accurate basis for such comparisons.
To keep the numbers a tad smaller, let’s start by focusing on the current IPv6 minimum allocation (for the sake of simplicity I will use the ARIN policies as my reference going forward, most of the other registries have quite similar policy in place in most cases) which is a /32 (ipv6/32). There are a total of 4,294,967,296 (2^32) or roughly 4.2 billion ipv6/32s (which is also the number of individual IPv4 addresses). The current IPv4 minimum allocation is a /20 (ipv4/20) of which there are 1,048,576 (2^20). This means that there are only 4,096 times more ipv6/32s than ipv4/20s. I say only, because 4,096 times more is a much, much different number than the 7.9 × 10^28 times more individual IPv6 IPs there are. There are two problems with this approach however, the first is that the IPv4 minimum allocation has changed over time and at this point seems a little bit arbitrary. The second is that the number of addresses within these allocations is so vastly different. So let’s look at the addresses (or more accurately the subnetworks) within the IPv6 minimum allocation.
In a single ipv6/32 there are 65,536 possible ipv6/48s. Since an ipv6/48 is the “normal maximum” assignment we may rationally compare this to an ipv4/24 (I draw this comparison mostly because in the ISP networks I have worked on we typically made our first aggregation at the ipv4/24 line and it appears that the ipv6/48 will similarly be the city or PoP level aggregate of choice). To have 65,536 ipv4/24s at your disposal you would need an ipv4/8 assigned to your organization. There are only 256 unique ipv4/8s possible and (as mentioned above) there are about 4.2 billion ipv6/32s, making the difference a factor of 16,777,216. Quite a bit larger than the 4,096 we get comparing minimum allocations but still a very far cry from 7.9 × 10^28. We face a familiar problem again here though, an ipv6/48 contains roughly a septillion (1.209 x 10^24) individual addresses while an ipv4/24 holds only 256. Before moving on I would like to point out that while an IPv4 allocation that large may sound ridiculous; ipv4/8s were handed out in the early days of IPv4 much more freely than you might assume given today’s problem with scarcity. In fact, 41 out of the 256 total ipv4/8s are designated in full to a non-RIR organization; that adds up to 16% of all IPv4 addresses.
Leaving minimum allocations behind, let’s get down to the smallest subnetworks. An ipv4/30 contains just two usable IP addresses but (because of NAT) can represent an entire customer LAN on an ISP network. The IPv6 prefix which represents a single LAN segment is an ipv6/64. There are a possible total 1,073,741,824 (roughly 1 billion) ipv4/30s and 1.84467441 × 10^19 ipv6/64s. That’s about 17 billion (17,179,869,200 to be more exact) times more IPv6 than IPv4 when measured this way.
Finally there are the RIR utilization definitions. With IPv4, utilization requirements are based on individual IPv4 addresses (ipv4/32s), while IPv6 utilization requirements most commonly refer to /56 networks (ipv6/56). The maximum possible number of ipv4/32s is 4,294,967,296 or roughly 4.2 billion. The maximum possible number of unique ipv6/56s is 7.2057594 × 10^16. Some simple division here tells me that using this method of comparison, the size difference between IPv6 and IPv4 stands at a factor of 16,777,216; the same number we came up with when comparing ipv4/24s to ipv6/48s.
So, while there may be well over an octillion times more individual IPv6 addresses than there are IPv4 addresses; in terms of actually usability, IPv6 is only somewhere in the range of 16 million to 17 billion times larger than IPv4. Much larger, yes; infinite, no.
UPDATE: Check out my related post on IP vs MAC address space if this sort of thing interests you!