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:

Prefix Length     Blocks per /8    Usable Addrs per Block     Subnet Mask
     8                 1                16,777,214 
     9                 2                 8,388,606 
    10                 4                 4,194,302 
    11                 8                 2,097,150 
    12                16                 1,048,574 
    13                32                   524,286 
    14                64                   262,142 
    15               128                   131,070 
    16               256                    65,534 
    17               512                    32,766 
    18             1,024                    16,382 
    19             2,048                     8,190 
    20             4,096                     4,094 
    21             8,192                     2,046 
    22            16,384                     1,022 
    23            32,768                       510 
    24            65,536                       254 
    25           131,072                       126 
    26           262,144                        62 
    27           524,288                        30 
    28         1,048,576                        14 
    29         2,097,152                         6 
    30         4,194,304                         2 


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:
      +0    +1    +2    +3    +4    +5    +6    +7    +8    +9
000    R    AP    RN    LP    LP    RN    LG   LAR    LP    LP
010    R    LG    LP    LP    AP    LP    LP    LP    LP    LP
020   LP    LG    LG    AR    AR    LG    LG    AP    LG    LG
030   LG    RN    LP    LG    LP   LAR    AP    RN    LP    AP
040  LAR    AF    AP   LAP    LP   LAR    RN   LAR    LP    AP
050   AR    LG    LP    LP   LAR    LG    LG    LG    AP    AP
060   AP    AP    RN    AR    AR    AR    AR    AR    AR    AR
070   AR    AR    AR    AR    AR    AR    AR    RN    RN    RN
080   RN    RN    RN    RN    RN    RN    RN    RN    RN    RN
090   RN    RN    RN    RN    RN    RN    AR    AR    AR    AR
100   AR    AP    AF    AP    AR    AF    AP    AR    AR    RN
110   AP    AP    AP    AP    AP    AP    AP    AP    AP    AP
120   AP    AP    AP    AP    AP    AP    AP     R   LAR   LAR
130  LAR   LAR   LAR   LAP   LAR   LAR   LAR   LAR   LAR   LAR
140  LAR   LRN   LAR   LAR   LAR   LRN   LAR   LAR   LAR   LAR
150  LAP   LRN   LAR   LAP   LAF   LAR   LAR   LAR   LAR   LAR
160  LAR   LAR   LAR   LAP   LAR   LAR   LAR   LAR   LAR   LAR
170   LA   LAP   LAR    AR    AR    AP    RN    LA    RN    LA
180   AP    LA    AP    AP    AR    RN    LA    LA   LRN    LA
190   LA   LLA   LAR    RN    RN    RN   LAF    AF   LAR    AR
200   LA    LA    AP    AP    AR    AR    AR    AR    AR    AR
210   AP    AP    RN    RN    LG    LG    AR    RN    AP    AP
220   AP    AP    AP    AP   RMC   RMC   RMC   RMC   RMC   RMC
230  RMC   RMC   RMC   RMC   RMC   RMC   RMC   RMC   RMC   RMC
240  RFU   RFU   RFU   RFU   RFU   RFU   RFU   RFU   RFU   RFU
250  RFU   RFU   RFU   RFU   RFU   RFUKey and Analysis
 AR = ARIN        LAR = Legacy, managed by ARIN
 AP = APNIC       LAP = Legacy, managed by ARIN
 RN = RIPE NCC    LRN = Legacy, managed by ARIN
 LA = LACNIC      LLA = Legacy, managed by LACNIC
 AF = AfriNIC     LAF = Legacy, managed by AfriNIC
  R = Reserved
RMC = Reserved for Multicast
RFU = Reserved for Future Use
 LP = Legacy, Private Sector
 LG = Legacy, Government
                                    % total        % alloc
ARIN                       80        31.25    80    36.19
APNIC                      51        19.92    51    23.08
RIPE NCC                   40        15.62    40    18.10
LACNIC                      9         3.52     9     4.07
AfriNIC                     6         2.34     6     2.71Legacy, private sector     19         7.42    19     8.60
Legacy, government         16         6.25    16     7.24Reserved                   35        13.67
—        —–   —    —–
256        99.99   221    99.99

Out of 35 R+LP+LG, 31 of those were US, 4 were non-US or internationalTotal US = 80 + 31 = 111 / 256 = 43.4% of entire address space

Total US = 80 + 31 = 111 / 221 = 50.2% of actual allocated.

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.

APNIC and RIPE both had a policy that when their supply went below one /8 (about 16.7 million addresses), the would cease normal allocation, and give out only /22 blocks (1022 usable addresses), and then only one block to a given customer. They are supposed to be used only for migration to IPv6 (DS-Lite, etc). APNIC reached that point on April 15, 2011. RIPE reached that point on Sept 14, 2012.

ARIN has a similar policy, but it is triggered when they reach their final /10 (about 4.2 million addresses). It is currently expected to reach end of normal allocation on Dec 28, 2014.

LACNIC is currently expected to reach end of normal allocation on Aug 17, 2014.

AfriNIC is currently expected to reach end of normal allocation on Sept 18, 2020.

New public IPv4 addresses have been unavailable at the IANA level since February 2011.

APNIC (RIR for Asia/Pac) ceased normal allocation of IPv4 on 15 April 2011.

RIPE NCC (RIR for EU/ME) ceased normal allocation of IPv4 on 14 Sep 2012.

LACNIC (RIR for Latin America) ceased normal allocation of IPv4 on 10 Jun 2014.

ARIN (RIR for North America) ceased normal allocation of IPv4 on 24 Sep 2015.

AfriNIC (RIR for Africa) is expected to cease normal allocation of Ipv4 on 22 Nov, 2019.

If you just can’t give up IPv4, you may want to consider moving to Africa. Or after most of the world has moved on to IPv6, there will be plenty of slightly used IPv4 addresses available! The only problem will be finding someone to talk to using it. You will only be able to communicate with other nodes via translators.

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:

IPv6 Prefix           Allocation              Reference      Note
———–           ———-              ———      —-
0000::/8              Reserved by IETF        [RFC4291]      [1] [5]
0100::/8              Reserved by IETF        [RFC4291]
0200::/7              Reserved by IETF        [RFC4048]      [2]
0400::/6              Reserved by IETF        [RFC4291]
0800::/5              Reserved by IETF        [RFC4291]
1000::/4              Reserved by IETF        [RFC4291]
2000::/3              Global Unicast          [RFC4291]      [3]
4000::/3              Reserved by IETF        [RFC4291]
6000::/3              Reserved by IETF        [RFC4291]
8000::/3              Reserved by IETF        [RFC4291]
A000::/3              Reserved by IETF        [RFC4291]
C000::/3              Reserved by IETF        [RFC4291]
E000::/4              Reserved by IETF        [RFC4291]
F000::/5              Reserved by IETF        [RFC4291]
F800::/6              Reserved by IETF        [RFC4291]
FC00::/7              Unique Local Unicast    [RFC4193]
FE00::/9              Reserved by IETF        [RFC4291]
FE80::/10             Link Local Unicast      [RFC4291]
FEC0::/10             Reserved by IETF        [RFC3879]      [4]
FF00::/8              Multicast               [RFC4291]
[0]  The IPv6 address management function was formally delegated to
IANA in December 1995 [RFC1881].
[1]  The “unspecified address”, the “loopback address”, and the IPv6
Addresses with Embedded IPv4 Addresses are assigned out of the
0000::/8 address block.
[2]  0200::/7 was previously defined as an OSI NSAP-mapped prefix set
[RFC4548]. This definition has been deprecated as of December
2004 [RFC4048].
[3]  The IPv6 Unicast space encompasses the entire IPv6 address range
with the exception of FF00::/8. [RFC4291] IANA unicast address
assignments are currently limited to the IPv6 unicast address
range of 2000::/3. IANA assignments from this block are registered
in the IANA registry: iana-IPv6-unicast-address-assignments.
[4]  FEC0::/10 was previously defined as a Site-Local scoped address
prefix. This definition has been deprecated as of September 2004
[5]  0000::/96 was previously defined as the “IPv4-compatible IPv6
address” prefix.  This definition has been deprecated by [RFC4291].
The referenced RFCs are:
RFC 1881 – “IPv6 Address Allocation Management”, December 1995 (obsoleted by 4048)
RFC 3879 – “Deprecating Site Local Addresses”, September 2004 (affects FEC0::/10)
RFC 4048 – “RFC 1888 is Obsolete”, April 2005 (dropping mapping of OSI addresses)
RFC 4193 – “Unique Local IPv6 Unicast Addresses”, October 2005
RFC 4291 – “IP Version 6 Addressing Architecture”, February 2006


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.

If the IPv4 address space was the size of a basketball, the IPv6 address space would be a sphere centered in our solar system, going almost all the way out to the orbit of Venus. That’s a big ball.

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:ed3d::/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).