As of January 1, 2011, the number of unused IPv4 addresses stands at 495.66 million. Exactly a year earlier, the number of available addresses was 721.06 million. So we collectively used up 225.4 million addresses in 2010. 242 million, really, if we ignore the unusual circumstance that Interop gave back nearly 17 million addresses.

At first glance, this suggests that we have two more years of IPv4 addresses left. But it's not that simple: Asia is almost certainly going to run out before year end. And that means really running out, as in: sorry, no addresses for you. This is different from the depletion of the IANA global pool, which will very likely happen later this month. That event is more like an office running out of those big water bottles in the storage room: every water cooler gets its last bottle and everyone can still drink—for a little longer.

A few days ago, I heard an interviewer on the radio say that the current population of the planet is 6.9 billion, and we'll be reaching 7 billion later this year. The expert he was speaking to immediately corrected him, explaining that the current population of the world is 6,934.196 million people—plus or minus a margin of many millions. So you'd think we have a better handle on the number of IP addresses out there—it's not like new ones are getting born in rural Africa, outside the purview of those who care about such things. And to a large degree, you'd be right: the five RIRs (Regional Internet Registries) publish a snapshot of what they've given out each day on their FTP servers. Despite that, there is still a lot that remains unclear.

What we do know is that the 32-bit IPv4 address space allows for 4,294,967,296 unique combinations. IANA, the Internet Assigned Numbers Authority, maintains a master list of the status of each of the 256 "/8" blocks of 16,777,216 addresses that are identified by a common first number in the dotted quad IPv4 address notation. Thirty-five of those /8s have the status "reserved." 0 and 127 have special meaning and can't be used for normal purposes. 224-239 are used for multicast, where a single packet is delivered to multiple interested parties, while 240-255 are "reserved for future use."

With only about two years worth of IPv4 addresses remaining on the shelves, it would seem that that future is here now, but unfortunately, pretty much all operating systems balk at using a "reserved" address. So unreserving those addresses means upgrading every system connected to the Internet. If we're going to do that, we may as well skip those reserved IPv4 addresses and upgrade to IPv6.

There's also the matter of block 10, which is the largest of the three address blocks set aside for private use. The others, 172.16.0.0/12 (meaning 12 bits are given, the other 20 may be filled in by the user) and 192.168.0.0/16, don't show up as reserved, but are obviously not available for regular use.

This makes the total number of usable IPv4 addresses (256 - 35) x 224 - 220 - 216, or 3706.65 million addresses. The IANA list shows that seven /8s (117.44 million) are still unused (unallocated). This is the "IANA global pool." But there's also a lot of unused space hiding in the "allocated" and "legacy" categories.

Each /8 that isn't unallocated or reserved is administered by one of the five RIRs: AfriNIC (Africa), ARIN (North America), APNIC (Asia-Pacific), LACNIC (Latin America and Caribbean), and the RIPE NCC (Europe, Middle East, and the former USSR). As mentioned before, each RIR publishes a list of address blocks further delegated to ISPs or end users every day. If we add up all those blocks, this comes out to 3210.99 million addresses. So the total number of usable-but-unused IPv4 addresses is 3706.65 million minus 3210.99 million, 495.66 million.

Going back to the IANA global pool, you can see above what the changes have been over the past year and how we expect things to shake out. There is an agreement between IANA and the RIRs that each RIR will get one of the last five /8s. APNIC got two /8s every three months like clockwork in 2010. If this continues, they'll be getting numbers 7 and 6 later this month.

Delegated to/status Blocks 2010 change Expected 2011 tally AfriNIC 3 +1 4 APNIC 42 +8 45 ARIN 35 +4 36 LACNIC 8 +2 9 RIPE NCC 34 +4 35 RIRs subtotal 103 +8 103 Legacy 92 — 92 Unallocated 7 -19 —

At this point, the status of the legacy space becomes very interesting. The legacy blocks are each "administered" by one of the RIRs, but does that mean that RIR is free to further delegate that space to ISPs and end users? There are 146.92 million unused addresses in legacy space, including 16.65 million returned by Interop a few months ago. This is the used versus unused address space administered by each RIR:

Delegated to Legacy total (millions) Legacy unused (millions) Allocated total (millions) Allocated unused (millions) AfriNIC 33.55 24.85 50.33 27.06 APNIC 100.66 22.32 704.64 44.38 ARIN 654.31 60.55 587.20 56.21 LACNIC — — 134.22 37.39 RIPE NCC 67.11 5.77 570.43 67.38 IANA 671.09 16.65 — —

AfriNIC used up 8.95 million addresses last year. So their current unused allocated space is good for three more years of operation (if nothing changes) and their final /8 is worth an additional two years. If they get to use their legacy space, that buys them another 2.5 years. So unless IPv4 address use really takes off in Africa, AfriNIC will be handing out addresses for at least another three or four years.

APNIC is at the opposite end of the spectrum, using up no less than 126.22 million new IPv4 addresses last year. This should occur even if they get to use the legacy space they administer on top of three of the last seven /8s—and it's hard to see how APNIC can avoid having to tell people "no"—before the year is out.

One caveat: in the 2010 APNIC records, there are 6.65 million addresses worth of space that are not in the 2011 records. Part of this is address space returned to APNIC. In other cases, an address block delegated in a previous year expands or shrinks retroactively. Depending on what the underlying reason for these changes is, the actual rate at which APNIC and the other RIRs are giving out address space may be different from what it seems to be. But I'll be very surprised if APNIC doesn't end up in the situation where it has to refuse an otherwise legitimate request for IPv4 addresses because it simply doesn't have enough addresses left at some point in the second half of this year.

ARIN, LACNIC, and the RIPE NCC used up 54.55 million, 17.29 million, and 75.45 million addresses, respectively, in 2010. However, ARIN saw 27.24 million addresses returned, including the 16.65 million from Interop, which is administered in the ARIN records even though the IANA list doesn't reflect this. For AfriNIC, LACNIC, and the RIPE NCC, the numbers of addresses that came back were 0.31 million, 0.22 million, and 22.62 million, respectively. So ARIN and the RIPE NCC should be fine this year, and will probably have to refuse requests in 2012 or possibly 2013. LACNIC should be OK until about 2015.

With respect to running out of addresses, it's important to realize that the Pareto principle (the 80/20 rule) applies: out of the 7,686 address blocks given out last year, only 392 (5 percent) were blocks larger than 100,000 addresses, but those were responsible for 82 percent of the address space given out. Twenty blocks of two million addresses were given out, four of four million, and one of eight million addresses. Even when the RIRs are no longer able to give out those large blocks, they may still be able to fulfill the requests for address blocks smaller than 10,000 addresses. Last year, 6,425 such blocks were given out, totaling 14.03 million addresses.

It really only takes a single address to be in the content business; it's the ISPs that need a continuous supply of new addresses to connect new customers. So the address shortages looming beyond the summer will hit ISPs and their broadband/mobile customers first and foremost, and the content industry to a much lesser degree.

For those who pay attention to such things: last year's story reported 722.17 million IPv4 addresses left, while above the figure is given 721.06 million. This is because of a slightly different way of counting the addresses necessitated by the return of Interop's legacy space.