IPv4 and IPv6 Address Spaces

IPv4 Address Space

IPv4 addresses are 32 bits long. This means there are a total of 232 (about 4.3 billion) possible addresses.

When discussing the IPv4 address space, we talk about “/8” (pronounced “slash 8”) blocks. There are 256 such blocks, called 0/8 to 255/8. Each /8 block has 224 (about 16.7 million) addresses.

Originally, the IPv4 address space was split up into 5 “classes”, named A through E.

Class A was the first 50% of the total address space: 128 /8 blocks, from 0/8 to 127/8. These blocks were allocated in /8 chunks (224 or 16.7 million addresses each) to large organizations, such as the U.S. government and AT&T. These allocations were mostly done by Jon Postel, before allocation was handed over to IANA.

Class B was the next 25% of the total address space: 64 /8 blocks from 128/8 to 191/8. These addresses were allocated in /16 chunks of 216 or 65,536 addresses each. There were 16,384 such chunks in Class B. Some of these were allocated by Jon Postel as well.

Class C was the next 12.5% of the total address space: 32 /8 blocks from 192/8 to 223/8. These addresses were allocated in /24 chunks of 28 or 256 addresses each. There were 2,097,152 of these blocks. Again, some of these were allocated by Jon Postel before IANA took over.

Class D was the next 6.25% of the address space: 16 /8 blocks from 224/8 to 239/8. This was reserved for multicast.Those addresses are widely used – there is no way they could be allocated for unicast addresses.

Class E was the final 6.25% of the address space: 16 /8 blocks from 240/8 to 255/8. These were “Reserved for Future Use” (experimental). Many people expected these to be used for normal allocation as IPv4 ran out. In practice, millions of routers would have to be reconfigured to be able to use these address ranges, and most of the blocks were not “clean” (people were using them for all kind of experimental work). So, they decided to leave them reserved. Toward the end, they were going through 2 /8 blocks per month, so it might have delayed the end by 6 months or so, but that is all.

In the early 1990s, to try to make the IPv4 address space last longer, the IETF changed the rules with RFC 1518, “An Architecture for IP Address Allocation with CIDR”, September 1993. With Classful allocation, there were only 3 possible allocation chunk sizes (/8, /16 and /24). The split between network number and interface identifier could only come at bit positions 8, 16 or 32. With CIDR, that split could come at any position from 8 to 30, for a total of 23 different allocation block sizes:

This allowed a better fit between the customer’s need and the allocation size. Also some of the big chunks in in the old class ranges were broken up into smaller chunks. You could no longer determine the correct subnet mask based only on the first few bits of the address (like you could with classful allocation). This also greatly increased the size of the IPv4 core routing tables.Using CIDR notation, the original classful allocation blocks could be written thus:

   0/1 – Class A
128/2 – Class B
192/3 – Class C
224/4 – Class D
240/4 – Class E
Here is the record of who all of the IPv4 /8 blocks bad been allocated to, as of them time that IANA ended normal allocation on February 3, 2011 by allocating the final five /8 blocks of IPv4 addresses, one to each of the RIRs. The blocks marked “LEGACY” were allocated before this process was handed over to IANA. The allocation of addresses within blocks designated with the name of an RIR (APNIC, ARIN, RIPE NCC, LACNIC or AfriNIC) was managed by the named RIR.
Here is a summary of who got what by /8 block, and a breakdown analysis:
 

The US population is about 300M. Out of 7 billion that is about 4.28%

91 of the 221 blocks allocated (41.2%) were done before IANA took over.

When IANA still had unallocated blocks of IPv4 addresses (prior to Feb 3, 2011), they would allocate /8 blocks to RIRs as the RIRs could justify them. When they reached the final five blocks (after giving two to APNIC), their policy required giving one to each of the five RIRs. Since then, there are no more to allocate to the RIRs. The IANA pool is empty.

For the state of IPv4 unallocated addresses, see IPv4 Exhaustion.

 

 IPv6 Address Space

IPv6 addresses are 128 bits long. This means there are a total of 2128 (about 340 trillion, trillion, trillion) possible addresses.

Here are the official allocations of the IPv6 address space as of 13 May 2008
from IANA), along with the RFCs that allocated the blocks listed:

How Much IPv6 Do We Have?

So how big is the 2000::/3 block, from which allocations are made? That is 1/8 of the total IPv6 address space, or 2125 (about 4.25E+37) addresses. Unless you are a mathematician that is pretty much a meaningless number. So let’s try to understand it in more meaningful terms.

IANA gave one /12 block of IPv6 to each of the the five RIRs. The RIRs are all still working on their first allocation, and will be for quite a while. A normal ISP allocation is a /32. Each /12 has 1,048,576 /32 blocks. So each RIR can supply over a million normal ISP allocations before having to ask IANA for another /12. In 2000 there were an estimated 10,000 or so ISPs in the entire world. Say there are 20,000 now. A single RIR could supply every ISP in the world 50 normal /32 allocations out of their /12 block. The actual rules for APNIC’s allocations of IPv6 addresses to ISPs can be found here.

How many /12 blocks do we have to supply RIRs?

There are 512 /12 blocks in the 2000::/3 block. At this time, 507 of them are still in stock at IANA. I will be amazed if any RIR asks for a second allocation anytime this century – well maybe APNIC. If somehow we did manage to go through all 512 /12s in 2000::/3 (maybe deploying TCP/IP on trillions of nano-machines?), there are another five /3 blocks in the address space, with 512 more /12 blocks each, reserved for future use.

So how long does it take an ISP to go through a /32 block?

A normal organization gets a /48 block of IPv6. A typical /32 ISP allocation contains 65,536 /48 blocks, so an ISP can provision over 65,000 organizations before having to ask their RIR for another /32. Not many ISPs have that many organizational customers.

How many /48 blocks are there in the 2000::/3 block?

There are 248 /48 blocks in the entire IPv6 address space, so there are 1/8 that number, or 245 /48 blocks in 2000::/3. That is 35,184,372,088,832 /48 blocks. If you use the figure 7 billion for the current world population, that works out to 5,026 /48 blocks for each man, woman and child alive. And every one of those is large enough for the largest organization on Earth. The other five /3 blocks we have in reserve brings that to over 30,000 /48 blocks per person alive.

We are not about to run out of IPv6 addresses. Please don’t deploy NAT66.

IANA IPv6 Allocations to Date

The official IANA allocation history for IPv6 similar to the one above for IPv4 /8 blocks is here.

There have been a number of small allocations in 2001::/16. The allocation that my /48 (2001:470:3d::/48) came from was granted to ARIN on July 1, 1999 (Hurricane Electric was a very early adopter).

The initial /12 blocks were allocated to the five RIRs on Oct 3, 2006. They were as follows:

2400::/12 – APNIC
2600::/12 – ARIN
2800::/12 – LACNIC
2a00::/12 – RIPE NCC
2c00::/12 – AfriNIC

If you see an IPv6 unicast address starting with 26xx, now you know it likely came from the U.S. or Canada (Mexico is in LACNIC).