I’m setting up DHCP reservations on my home network and came up with a simple schema to identify devices: .100 is for desktops, .200 for mobiles, .010 for my devices, .020 for my wife’s, and so on. Does anyone else use schemas like this? I’ve also got .local DNS names for each device, but having a consistent schema feels nice to be able to quickly identify devices by their IPs.

  • dream_weasel@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    1 year ago

    I like your funny words magic man.

    As a total novice for networking (setting up 4 hat rules for my pihole was… tough), how bad are vlans to set up?

    • farcaller@fstab.sh
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      Look at them like this: VLANs are like running several cables between two spots that you can configure independently. In the very end it comes down to this: what virtual LAN number you have on the cable.

      Your backbone devices (router and switches) can be configured to accept tagged traffic―your switch will send a packet prefixed with a VLAN index and your router will trust that the packet actually came from that VLAN on the switch port, or to tag traffic―like when you have some port on your switch where your PC is plugged in and the switch will tag those packets with some VLAN when it forwards them (to the router).

      Once you grasp that, everything else pretty much boils down to managing several isolated networkd and how they cross-talk. You run a dhcp server over each network, its own set of other services and whatnot.

      Oftentimes the “home” hardware will expect a single network and use some means of packets broadcast to reach each other. That’s how your phone can find all google homes on the network and apple homekit knows where your smart lights are. For that traffic to cross VLANs you’ll have to use some special software like mdns repeaters, but you can still isolate them.

      Wrapping up, VLANs basically allow you the physical level isolation over a single cable. Mind that there are, of course, some bugs, e.g. I once found an issue with Unifi access points that allowed a well crafted packet to escape into VLAN 1 no matter what it was supposed to be tagged with. So don’t treat them as physically separate links.

    • Toaster@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Not bad. Hugely depends on what software, hardware, and firmware you use though.

      I used a guide by HomeNetworkingGuy to fully set my network up in OPNSense, my software, running on a Protecli Vault, my hardware, using FreeBSD, my firmware/bios. It took me a full day start to finish. VLANs were maybe 30-60mins of that time tops.

    • Oisteink@feddit.nl
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      They are not hard once you grasp the idea. They are like separate networks on layer 2(link) - layer 1 (physical) can be shared.
      So you get several separate networks for the price (and equipment) of one. If you want to reach a device on one vlan from another it needs to be forwarded by something.

      It gets a bit complicated here - as your idea of the network is on layer 4 where tcp and udp and other protocols live. As you don’t want to connect one vlan to the other - you want something that has access to both vlans to forward your layer 3 data (IP) between the links. This is your router. It will have a virtual network card on each vlan. You can tell your router to send data from one network card to the other to forward the data.

      I suck at explaining- so you probably better off doing an Udemy network primer or read up a little bit. Good things to understand are the first 4 layers of osi model and routing.

      It’s not hard and you can learn how to use it by poking stuff and googling a bit. Just imagine each vlan as a “copy” of your equipment (layer 1) cables and all. Your switch will have to support it, and if you want to trunk (run several vlans though one link) you need support on the other end as well.

      /endwalloftext