• Taleya@aussie.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 小时前

    I’m the cat

    1 is my pc. 254 is the managed micro switch i use to isolate work stuff. Most things are neatly atra ged -70 is the testbed proxmox, 79 is the idrac, 71-78 are the vms, same with 80 on my production proxmox.

    Modem is 11

  • notabot@piefed.social
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 小时前

    Nah, put your gateway in a different subnet, but on the same network segment, and add a static /32 route to it on every client.

  • kamen@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    5 小时前

    It’s good to be reminded that some things are just conventions rather than hard rules. I forget things like that (if I ever knew them to begin with).

    On topic, I usually do 192.168.0.1 or 192.168.1.1 depending on the situation.

  • signalsayge@infosec.pub
    link
    fedilink
    English
    arrow-up
    15
    ·
    9 小时前

    I love that people forget about 127.0.0.0/8 being the loopback network. Everyone just uses .1 when there are so many to choose from.

    • Aceticon@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 小时前

      People also commonly do not know that the reserved for intranet ip address range of 192.168.0.0 is actually /16 so you can pick any number between 0 and 255 for that 3rd byte and have their whole network in a range other that 192.168.0.0/8 like pretty much everybody else.

    • lawks@aussie.zone
      link
      fedilink
      arrow-up
      4
      ·
      8 小时前

      IPv6: Fuck you, you’re only allowed one, now. Yeah, yeah, I know there are about 340 undecillion addresses in the space, but I know better than you, no one in history has ever needed to bind different services to the same port on the loopback interface, and if they did they were doing it wrong. Oh you made an RFC draft? Well I let the one from 2015 expire, so good luck with your current proposal, pleb.

        • lawks@aussie.zone
          link
          fedilink
          arrow-up
          1
          ·
          3 小时前

          So the onus is on every individual user, to pick a random ULA prefix, bind specific addresses from it to the loopback interface, which is a different procedure for different OSes, probably requires root or elevated privileges, can have hard limits on, document it, etc. Greeeeaaaaaaat design. IPv6 gives out /64 like they’re about to turn bad, but can’t spare a /104? Gimme a break.

          I can dig a hole with a spoon, too, but if someone made it so that no one was allowed to dig holes with shovels unless they build their own (and have permission to build the shovel), when previously everyone was allowed to dig with shovels, I would not think highly of that person’s wisdom.

          Maybe you think G. Huston of APNIC and W. Kumari of Google don’t really know what they’re talking about?

  • sem@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    6
    ·
    9 小时前

    IP addresses are one thing, but wtf is a subnet mask??

    Wtf is 255.255.255.255 and why does it keep showing up???

    • Aceticon@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 小时前

      If a bit in those 4 bytes is 1 that means that the same bit in the IP address is part of what defines the network whilst the bits that are 0 are bits that can change in the IP address and that machine will still be part of that sub-network.

      So a mask of 255.255.252.0 (notice the 3rd byte) on a network with a prefix 192.168.0.0 means that 192.168.0.20 is in that sub-network AND 192.168.2.20 is part of that sub-network too, because the two lowest bits of the 3rd byte in that mask are 0, meaning that IP address where those bits vary are still in the same sub-network (i.e. the ranges 192.168.0.XXX, 192.168.1.XXX, 192.168.2.XXX and 192.168.3.XXX are all in the same sub-network).

      If instead the sub-network prefix was the same 192.168.0.0 but with a mask of 255.255.255.0 (the most common case you find in home internal networks) then 192.168.2.20 would NOT be part of the same sub-network as 192.168.0.20

      You probably also see now why a network mask is needed alongside the network prefix - in both examples above 192.168.0.0 is the network prefix, but without the network mask you don’t know which 0 bits in that network code can be changed to make an IP address still in the same sub-network.

      Note that you can change the mask to make the sub-network smaller as well as to make them bigger: for example 192.168.0.0/255.255.255.223 is a perfectly valid subnetwork that fits 30 machines.

      See chronicledmonocle@lemmy.world 's post for a full explanation.

    • chronicledmonocle@lemmy.world
      link
      fedilink
      arrow-up
      19
      ·
      edit-2
      6 小时前

      Subnet Masks are how you get networks. It’s simple binary ANDing math.

      For example, if you have a 192.168.1.1 IP address and a subnet mask of 255.255.255.0, that means the first 3 octets (each block of numbers between the dots representing an 8 bit value) of 255 are the network part of the IP (192.168.1.0/24) and the fourth octet is the host addresses space of the address. It’s saying 192.168.1 is the network and the last number is the host on that network.

      If you take 1 from 192.168.1.X and convert it to binary, you get 00000001. If you convert 255 to binary, you get 11111111.

      If you line them up and “AND” them together sort of like you’re adding them together in a “both must be true” comparison, you get

      00000001

      11111111

      00000001

      A 1 and a 1 makes 1. Anything else makes a 0. Basically the 192 gets ANDed to 255 and comes out as itself. Same for 168 and 1.

      For a 255.0.0.0 (or /8) 255.255.0.0 (or /16), and 255.255.255.0 (or /24) it’s easy, because it’s all 1s or 0s for each block of 8 bits of the 32 bits that make up an IPv4 address. Each block just plops out as itself because it’s all 1s or all 0s for each of the 4 blocks.

      Now try that with 23 bits instead of 24.

      00000001 for the third octet “1” part of 192.168.1.1

      11111110 for “254” part of 255.255.254.0 (aka a /23)

      00000000 or 0 for the third octet.

      This means that the network ID is 192.168.0.0/23 and the usable IP addresses are 192.168.0.1 through 192.168.1.254.

      With a /23 network, you get 512 addresses instead of 256 with a /24 (192.168.0.0-192.168.1.256 versus 1.0 through 1.256). The first IP is the network ID and the last is the broadcast address, both of which are unusable, so you have 510 IP addresses in a /23 to use for devices instead of 254 with a /24.

      This is how basic IPv4 subnetting works and it’s how you size various networks for things like Enterprise that needs more than a small home network of less than 254 devices.

      Congrats. If you understood that, you now have enough knowledge to probably pass some network exams.

      • hirihit640@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 小时前

        Why can’t you have ip addresses without subnet masks? Couldn’t the whole internet be on a single network? Would be horrible for a number of reasons, but everything could still work.

        • Honytawk@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          45 分钟前

          It is about security.

          So you can differentiate between the outside network and the local network. And even divide 2 local networks as well.

          Would it be possible? Sure. Just like it would be possible to have no speed limits for cars.

    • muusemuuse@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      1
      ·
      8 小时前

      It tells you how to read the IP address. It’s a really cool trick that’s an enormous pain in the ass.

  • Cort@lemmy.world
    link
    fedilink
    arrow-up
    48
    ·
    16 小时前

    Gateway is .69

    Dhcp is .70 - .254

    Static routes are .68 and below

    I will not be taking any questions

  • TheGingerNut@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    111
    ·
    21 小时前

    10.0.0.0/8 address space with a gateway address that gets randomized every 24 hours. Tomorrow’s address is advertised on a HTTP server local to the network that cannot be externally accessed. For security reasons.

    • BluescreenOfDeath@lemmy.world
      link
      fedilink
      English
      arrow-up
      38
      ·
      20 小时前

      Nothing advertises hostnames, and the DHCP table is dumped and every client gets new address at the same time, too.

      Just make sure the MAC addresses randomize, too, and then you’ve got yourself a proper fucking mess for a hacker to sort out.

    • chronicledmonocle@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      5 小时前

      There are reasons to put it at the end. For example, 192.168.1.254/24 can be expanded to /23 and have the same gateway address while you migrate clients that are statically assigned or while waiting on DHCP leases to expire, since /23 is a supernet of /24.

      • pepeSilvia@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 小时前

        What am I missing here?

        192.168.1.1/24 would also be a valid gateway for a /23, with the benefit of not having a gateway in the middle of your /23 network?

        I feel like this example is a greater justification for putting the gateway on the network/CIDR + 1, like a civilized person.

      • cynar@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 小时前

        My guess is that enough people were buying routers and using them as access points. They all tend to be on 192.168.0.1 .254 means you don’t get as bad collisions when that happens. It would cut down on technical support calls.

      • shalafi@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        17 小时前

        My new fibre modem is .254. It was a bitch to get into (whatever the mode’s called that makes it a simple gateway).

    • xylogx@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 小时前

      A typical ip address scheme is to assign lower blocks to dhcp pools and reserve high ip addresses to servers and network gear. Anything over 250 is typically a switch or a router in this case.

    • moodoovoodoo@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      16 小时前

      I work for a French company that does this, I don’t know if all French companies do this, but it threw me for a loop for sure.

  • hansolo@lemmy.today
    link
    fedilink
    arrow-up
    18
    ·
    17 小时前

    My home server is at 192.168.1.230 because that’s what IP was assigned to the machine at the moment I set it up.

    Yep. Love that chaos, ya know?

  • Opisek@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    2
    ·
    18 小时前

    First address? As in, the network address? Last address? As in, the broadcast address? Suspicious.

  • shalafi@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    17 小时前

    10.10.10.70 here. There was a reason in the distant past that I did this and now it’s stuck that way forever.