I mentioned in an earlier post that with IPv6, you could “…give out a gazillion addresses a day every day until the sun becomes a cold dark cinder and not come anywhere near running out“. You might have thought I was kidding, or at least exaggerating for dramatic effect.
I wasn’t.
Let’s do the math.
IPv6 uses 128 bit addresses, which means we have a total address pool of 2128, or 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses. Yes, that’s 340 undecillion addresses. I know that’s a weird sounding number, but I’m not making it up. By comparison, our current addressing scheme, IPv4, uses 32 bit addresses, which gives us a pool of 232, or 4,294,967,296 addresses. (I’ll bet that may be one of the first times a number just north of 4 billion has looked small…)
Those of you who are quicker of mind might be thinking – Gee, we’re running out of addresses. Does that mean there are almost 4 billion people using the Internet already? That’s half the planet!
Actually, no. There aren’t anywhere near 4 billion people on line. Due to various historical quirks and design decisions, 605,422,592 IPv4 addresses cannot be allocated for general use. Yes, 15% of the total IPv4 address space is unusable. Also, because network and broadcast addresses must be reserved for every subnet allocated (and there are a whole lot of subnets on the Internet), about 2% of the remaining addresses are also unusable. That leaves about 3.6 billion usable addresses. Remember, however, that every single piece of Internet equipment out there consumes at least one address — every router, every web server, every mail server. You get the idea. Also remember that many people use the Internet both at home and at work, from two different IP addresses. In actual fact, world wide there are only 1,668,870,408 people using the Internet (as of June 30 2009).
Kinda sucks, eh? We’re just about to exhaust a 4.2 billion IP address pool, and we’ve only got a paltry 1.6 billion people on line. That means that, on average, each person on line is consuming 2.1 IP addresses. This means that, if we’re lucky, by the time we actually run out of version 4 IP addresses we’ll have about 2 billion people on line. That’s 50% efficiency folks.
That sucks.
That also means that we’re not likely to be any more efficient with IPv6, so lets adjust our numbers for that reality. Dividing 2128 by 2 gives us 2127, or about 170 undecillion addresses.
Now, how long until the sun burns out and becomes a cold dark cinder? I looked around on line, and the general consensus is that ol’ Sol has about 5 billion years left before it runs out of hydrogen and expands to a red giant, burning the Earth to a crispy cinder. However, this site goes into a little more detail. The bottom line being that the sun won’t actually achieve anything approaching both cold and dark until about 50 billion years have elapsed. I did say cold dark cinder in my original post, so I’m holding myself to that.
So, if you’ve got 50 billion years to give out 170,141,183,460,469,231,731,687,303,715,884,105,728 addresses, how many can you give out each day? Well, 50 billion years would be 18,250,000,000,000 days. That’s 18.25 trillion. So lets divide 170 undecillion by 18.25 trillion and see what we get.
We get a big number. We get 9,322,804,573,176,396,259,270,537. We could give out just over 9 septillion addresses each day for the next 50 billion years. So, as long as we can agree that a gazillion is somewhere south of 9 septillion, my original statement stands.
Postscript: I have IPv6 service via Hurricane Electric’s tunnel broker service. Current IPv6 allocation policy means I get a whole /64 subnet allocated to me. That’s 264 or 18,446,744,073,709,551,616 addresses. (18.4 quintillion addresses just for me seems a bit excessive, but that’s committees for ya. Maybe some day I’ll actually have a need for each individual cell in my body to have it’s own IP address. Who knows what the future may bring.)
How does this effect my earlier calculations? Are we giving away IPv6 addresses too quickly? I did the math and, surprisingly, we’re probably OK with this policy, as we can afford to give out 505,390 /64 subnets every day for the next 50 billion years.
I think I can live with that.