• gnuplusmatt@reddthat.com
    link
    fedilink
    arrow-up
    16
    ·
    edit-2
    1 day ago

    you could assign every square meter of the planet an ip and use it for location, and still have addresses left over

    • Zink@programming.dev
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      18 hours ago

      Oh it’s way more than that!

      After looking up some numbers, I note we could give every single square MILLIMETER on the planet its own entire IPv4 address space.

      …And then every one of those IPv4 addresses could have its own entire copy of the IPv4 address space!

      …And that would just be a drop in the bucket compared with IPv6! One good comparison I’ve seen is that you could assign an address to every atom on the surface of the earth (but not inside it) and have enough left over for 100+ more earths.

      Rough math for the square millimeters:

      The surface area of the earth is roughly 510 trillion square millimeters. Let’s round that up to a quadrillion or 1015.

      The number of IPv6 addresses is 2128 or 3.4x1038. To be conservative again, let’s just round that down to 1038.

      1038 / 1015 = 1023 IPv6 addresses per square mm of earth.

      IPv4 address space is 232 or around 4 billion. let’s round up to 10 billion or 1010.

      So then 1023 / 1010 = 1013 IPv6 addresses per IPv4 address per square mm of earth.

      1013 / 1010 =

      1,000 IPv6 addresses

      per IPv4 address

      per IPv4 address

      per square mm of earth.

      And that was with the conservative estimates along the way. I think it would actually be tens of thousands.