116

I was once watching a slideshow about the new IPv6, and it mentioned that it is large enough for every grain of sand on earth to be IP addressable.

Is there any grain of truth behind this? (no pun intended)

Sklivvz
  • 78,578
  • 29
  • 321
  • 428
Sal Rahman
  • 3,117
  • 3
  • 22
  • 21
  • 11
    and if it's not addressable, just use NAT for ipv6 – jokoon Jun 12 '11 at 09:14
  • 37
    Well, no. Grains of sand don't have any suitable networking hardware. :-) – matt_black Dec 19 '12 at 21:29
  • 340 billions ... It is not absolute sure that all of our (so far mostly unknown) Milky Way exoplanets are covered with this ... But heck - we might go for 256 bits address space in IPv7 ... –  Dec 30 '12 at 23:55
  • @matt_black, yet ;) – galdikas Jul 28 '14 at 09:08
  • @KjellArneRekaa Actually [IPv7](http://tools.ietf.org/html/rfc1475) addresses are only 64 bits. – kasperd Jul 31 '15 at 17:47
  • I'd say *probably*. My network professor said that IPv6 allowed for very _fine-grained_ networks... – xDaizu Mar 13 '17 at 13:09
  • If each IPv4 address were one grain of sand, you would have enough addresses to fill approx one dump truck with Sand. If each IPv6 address were one grain of sand, you would have enough sand to equal the approx size of the sun. Today most devices & networks still communicate using IPv4 but migration to IPv6 is proceeding gradually over time. – user128364 Sep 28 '18 at 10:51

1 Answers1

149

Estimating the number of grains of sand on Earth is difficult. This source suggests 7.5x1018 grains (7.5 quintillion), but only includes beaches (deserts, under-sea sand and other sources not included.) This source suggests 1020 to 1024 grains (up to septillion grains of sand).

The number of addresses IPv6 could possibly address is 2128 (excluding reserved addresses), or about 3.4x1038 (340 decillion). Even if you remove the reserved addresses you're still left with far more IPs than grains.

In fact, assuming the most number of grains of sand - around 1024 - 294 femtopercent (yes, femto, 10^-15) would be used if every grain were allocated an IP. You could allocate 340 billion planets with the same number of grains of sand before you even came close to filling up the address space. After all that, you'd still have 2.8x10^35 (280 decillion) addresses free.

Thomas O
  • 11,908
  • 7
  • 53
  • 72
  • 1
    Looks like there will be no more of this fear of "running out of internet" issue. – Sal Rahman Jun 12 '11 at 00:14
  • 9
    Not until everyone on Earth registers their 5x10^28 addresses each. – Thomas O Jun 12 '11 at 00:26
  • 61
    Or until the nanobots run amok (http://xkcd.com/865/) – dan04 Jun 12 '11 at 00:48
  • 6
    @Thomas give spammers a big enough botnet, and they will find a way. Gotta get those 'enlargement' e-mails to the masses! – corsiKa Jun 12 '11 at 02:30
  • @glowcoder; See `blah`'s answer; Personally I'm skeptical that we will ever be able to get enough network-capable devices close enough to earth (Because as we move out into space latency would be too large for the internet to span planets, so there's no need for a single addressable space there), simply because there are **so many** IPv6 addresses and relatively little space to put them in. Not ignoring, of course, that the devices require resources to be built - resources we don't have. – Phoshi Jun 12 '11 at 11:11
  • 12
    Too late: I'm already cybersquatting on 145A:8A72:331A:2807::E822. – Robusto Jun 12 '11 at 13:40
  • 5
    I'm thinking one IPv6 network per planet, with interplanetary/interstellar communication having its own wrapper protocol. – Shadur Jun 12 '11 at 14:35
  • 9
    I'm reminded of a quotation that was attributed to Bill Gates in the 1980s (or 1990s): "640k ought to be enough for anybody." – Randolf Richardson Jun 13 '11 at 02:27
  • 7
    @Randolf, see here: http://skeptics.stackexchange.com/questions/2863/did-bill-gates-say-640k-ought-to-be-enough-for-everyone/2865#2865 – Thomas O Jun 13 '11 at 06:33
  • 2
    @Thomas O: I'm sure glad I wrote "attributed to" in my comment. – Randolf Richardson Jun 13 '11 at 07:39
  • 4
    3.4x10^38? That's nowhere near enough for the homeopaths' liking! – Andrew Grimm Jun 14 '11 at 13:17
  • 3.4x10^38, that's it? Dang, it will be all gone a year after Apple release their next product ;) – AviD Jun 19 '11 at 09:16
  • 2
    I would have gone with the fact that there is enough address space in IPv6 to give an entire IPv4 internet to each grain of sand. Or that if you broke the entire Earth into sand-grain sized grains each could have thousands of addresses. – DampeS8N Jun 19 '14 at 17:44
  • 2
    "You could allocate 340 billion planets with the same number of grains of sand before you even came close to filling up the address space" Anyone thinking what I'm thinking? Stargate? – Michael Hoffmann Jul 25 '14 at 19:01
  • 1
    @MichaelHoffmann *dons tinfoil hat* IPV6 was reverse-engineered from alien technology! – called2voyage Oct 27 '15 at 19:13
  • 1
    But the smallest allocation size for a single customer is a /64 net, which leaves 2^64 possible customer grains. – allo Apr 25 '16 at 20:48