• Illecors@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      43
      arrow-down
      1
      ·
      22 hours ago

      It’s a Class A address, reserved for loopback devices. While not any sort of default - yes, it could be used as home :)

        • rtxn@lemmy.worldM
          link
          fedilink
          arrow-up
          6
          ·
          17 hours ago

          Technically it fits inside the highest class-A subnet… but I’ve seen so many people (especially teachers) who think that class-A and /8 subnets are equivalent that I firmly believe that the idea of classful networking should be removed from technical literature altogether.

          • azertyfun@sh.itjust.works
            link
            fedilink
            arrow-up
            13
            arrow-down
            1
            ·
            16 hours ago

            Classful IPv4 was obsoleted 32 years ago. Only 8 years left before it’s literally older than a standard career.

            It’s fascinating the sheer inertia that leads formally-trained IT professionals to use and perpetuate such profoundly useless and obsolete nomenclature. You’d think that having an incorrect use of the term “class A” and not having any use for classes B and C would tip off academia that they should cordon off classful networking to the “History of Computing” course next to ARPANET.

            Maybe next time someone refers to 10.0.0.0/8 as a Class A network I’ll refer to it as the ARPANET Network. That’s only very slightly more anachronistic (3 years).

    • Gyroplast@pawb.social
      link
      fedilink
      English
      arrow-up
      24
      ·
      22 hours ago

      Yes. 127.0.0.0/8 is reserved IPv4 address space for Loopback. It is perfectly valid, and occasionally useful, to use other loopback addresses that are functionally identical, like 127.0.1.1 or 127.0.0.53, which carry semantic information for the initiated, like “53? Must be DNS-related, obviously!”

      • kn33@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        17 hours ago

        At the place I work, we use 10.127.0.0/16 for loopback addresses on networking equipment because it has that little familiarity from 127.0.0.0/8

  • Gyroplast@pawb.social
    link
    fedilink
    English
    arrow-up
    17
    ·
    21 hours ago

    This reminds me of the tale of the coder tasked to write an input validator for IPv4 addresses. Poor bastard.

    Another fun one: 0177.042.017.066

    PSA: Don’t zero-pad your IPv4 octets. Decimal is for simpletons.

    • toynbee@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      19 hours ago

      These are all network addresses that refer to localhost - how a computer addresses itself.

          • Incogni@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            9 hours ago

            To my limited knowledge: If it ends in .0 it’s the network identifier. If it ends in .255 it’s the broadcast address.

          • ohshit604@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            11 hours ago

            Why is 255 off limits? What is 127.0.0.0 used for?

            Hypothetically you’re working on an application but you don’t want that application exposed to the internet, you would use localhost to either expose it to 1 machine on your network or network wide by opening a port and telling the application to listen on the private IP assigned by your router.

            Advanced setup would include a reverse proxy to forward the requests from the applications port to the internet, the reverse proxy would use port 80:80 (http) & 443:433 (https), so the flow would look a little like this -

            Internet > Reverse Proxy listening on 80:80 & 443:443 > Application listening on 8080:8080

            —-

            Why does it span to .254? Well this is another advanced setup but if you wanted to segregate two application on different subnets you can. I’m not sure if there is a security benefit by adding the extra hop but the option is there.

            • hedgehog@ttrpg.network
              link
              fedilink
              arrow-up
              1
              ·
              9 hours ago

              Why is 255 off limits? What is 127.0.0.0 used for?

              To clarify, I meant that specific address - if the range starts at 127.0.0.1 for local, then surely 127.0.0.0 does something (or is reserved to sometimes do something, even if it never actually does in practice), too.

              Advanced setup would include a reverse proxy to forward the requests from the applications port to the internet

              I use Traefik as my reverse proxy, but I have everything on subdomains for simplicity’s sake (no path mapping except when necessary, which it generally isn’t). I know 127.0.0.53 has special meaning when it comes to how the machine directs particular requests, but I never thought to look into whether Traefik or any other reverse proxy supported routing rules based on the IP address. But unless there’s some way to specify that IP and the IP of the machine, it would be limited to same device communications. Makes me wonder if that’s used for any container system (vs the use of the 10, 172.16-31, and 192.168 blocks that I’ve seen used by Docker).

              Well this is another advanced setup but if you wanted to segregate two application on different subnets you can. I’m not sure if there is a security benefit by adding the extra hop

              Is there an extra hop when you’re still on the same machine? Like an extra resolution step?

              I still don’t understand why .255 specifically is prohibited. 8 bits can go up to 255, so it seems weird to prohibit one specific value. I’ve seen router subnet configurations that explicitly cap the top of the range at .254, though - I feel like I’ve also seen some that capped at .255 but I don’t have that hardware available to check. So my assumption is that it’s implementation specific, but I can’t think of an implementation that would need to reserve all the .255 values. If it was just the last one, that would make sense - e.g., as a convention for where the DHCP server lives on each network.

              • azuth@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                1
                ·
                49 minutes ago

                The highest (all 1s in binary) host address in a network (last octet in /24) is the broadcast address, it is send to all host in the network.

          • _g_be@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            15 hours ago

            It was designed that way. This span of addresses should not be used for anything other than localhost-ery.

            May seem like a wide span, but at the time that it was designed they didn’t anticipate needing every single address