Seriously, my knowledge ends with:

  • It offers a shitload of IP addresses
  • They look really complicated
  • Something about every device in your local network being visible from everywhere?
  • Some claim it obsoletes NAT?

I get that it’s probably too complicated a subject for an ELI5, so if there are good videos or resources explaining it in less than half an hour, feel free to share.

  • dfyx@lemmy.helios42.de
    link
    fedilink
    English
    arrow-up
    29
    ·
    14 days ago

    I’ll give it a shot. Not quite ELI5 but “Explain like I know what a phone number is”. For the most important answer, see the last paragraph.

    IP addresses are a bit like phone numbers. To send data to some computer, your computer attaches that number and sends the data packet on its way. With IPv4, an address is four bytes long, usually represented as four numbers from 0-255 separated with dots. That gives us a bit under 4.3 billion possible addresses which seemed enough when the system was invented and larger organizations could even reserve entire address ranges and some ranges got reserved for special purposes (for example, all 127.x.x.x addresses mean “send this to myself” while 192.168.x.x and 10.x.x.x are meant for local, non-public networks). Reserving these ranges is convinient when you need multiple machines connected to the internet but is very inefficient as these ranges need to be a power of two in size (256 is common), so you may get more addresses than you need and the rest stays unused.

    The first solution was “Network Address Translation” (NAT). Basically, every household or organization gets a single public IPv4 address and every device on your network has a private address. On outgoing connections, your router replaces the (private) sender address with its public address and remembers which private address belongs to that connection so it can correctly forward any replies. For incoming connections, the router needs a list of rules to tell it what to do. For example something like “Everything on port 80 goes to 192.168.0.42”. This worked for a while as most people make only outgoing connections and even many organizations can simply decide locally what to do with an incoming connection based on the received data so they wouldn’t need multiple addresses.

    After a while, it was clear that even with this workaround we would run out of addresses sooner or later. Providers tried giving their customers a different address every time they connected to the internet so they could reuse the address for someone else when the customer disconnected. This worked well when people only connected when they needed it but these days we’re usually online 24/7.

    So in the end, the only solution was to add more addresses. For our current needs, doubling the length would be more than enough but to be on the safe side, it was decided to quadruple the address length to a total of 16 bytes. This gives us about 340 undecillion unique addresses. Still not enough to give a unique address to every atom in the universe, not even enough for every atom on earth but still a lot. We can give every human an address range many times larger than the total address space of IPv4.

    Does this mean that NAT is dead or that all your devices are visible from outside your network? Absolutely not. It means you can do that if you want. If your provider gives you a large address range, you can give each of your devices a different one and tell your router to forward everything. But you can also still use a single public address and/or tell your router to apply certain rules for what to do with incoming connections. There are also still address ranges that are meant purely for local use, equivalent to what 192.168.x.x and 10.x.x.x were in IPv4.

    • shortwavesurfer
      link
      fedilink
      English
      arrow-up
      1
      ·
      14 days ago

      Honestly, the biggest concern I have with IPv6 is how do I get to my router? Because I know if I purchase a new router to go to 192.168.1.1 or 0.1 or 2.1 etc. to get to it to configure it. With IPv6, this seems like it would be much harder.

      • dfyx@lemmy.helios42.de
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        14 days ago

        Just because you have IPv6 enabled doesn’t mean you don’t have IPv4. Both can coexist on the same network and the same device so your router can be 192.168.0.1 and some IPv6 address at the same time.

        On top of that, many routers can be reached by a well-known hostname or domain, depending on their manufacturer. For example, AVM Fritz!Box routers (extremely popular in Germany) automatically resolve http://fritz.box/ to their own IP address no matter what that IP address is.

        In the end, read the manual or the sticker on the device, same as you would have to do with IPv4 to figure out which subnet it is configured with.

        • shortwavesurfer
          link
          fedilink
          English
          arrow-up
          4
          ·
          14 days ago

          Fair enough, I guess I’m thinking quite far into the future when IPv6 is just the absolute dominant form of connection and most people are turning off IPv4 or operating systems aren’t really shipping with IPv4 support.

          • Mîm
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            14 days ago

            Assuming you only have one router you’d probably be fine with ff02::2 (that’s the well-known-multicast for every IPv6 router on the link).
            Otherwise your ISP or vendor should have the default value in some kind of setup instructions I’d guess.

            Edit: Oh, and then there is the Neighbour Discovery Protocol, a router advertises itself on the link. It can even give you a valid configuration through it. If not, you can at least look up the advertised address via a simple command line command.

            • shortwavesurfer
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              14 days ago

              I wonder if default gateway might work. Because at least in an IPv4 network, if you go to like your settings and look at the network information, the default gateway is your router’s IP address. I’m thinking like the Wi-Fi settings in the Android system, for example.

              Edit: Also, thanks for the multicast address. I’m at least somewhat new to IPv6 networking myself, and so I was not aware of that address. About the most I’ve been able to do with IPv6 so far is set my own DNS server and Configure a static IP address for one of my Systems to act as a server By doing like ISPPrefix::1

              • Mîm
                link
                fedilink
                English
                arrow-up
                1
                ·
                14 days ago

                Yes, if you get a standard gateway defined, either through a DHCP server (pretty much all consumer router should have one running by default too) or SLAAC, you should be able to look it up through the settings in the GUI, too.

                You’re welcome. I’m no big expert myself, but I’d say that most things aren’t so different from v4, once you understand how v6 addresses work and are configured (and that there is no broadcast address anymore).