I’m moving soon and planning some overhauls to our home lab and local network.

We have security cameras and I really want them on their own VLAN without internet access. Then I got even more ambitious and decided I want to separate a lot of things into different VLANs without internet access, but can still talk to each other.

My long term goal will be to have an OPNsense box that I can do even more intricate network configs with, however in the short term I don’t think I can afford the hardware to do so. So for now, I’m trying to find the simplest, ideally cheapest way to implement at least one VLAN in my local network.

My ISP’s router will not support it, however should support bridge mode. So I’m thinking the easiest way is to buy a VLAN capable router and pass through to it, however I’m still new to this and learning as I go.

Curious if anyone here has VLAN tips, tricks, or suggestions for a cheap/easy setup.

Cheers!

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 minutes ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    AP WiFi Access Point
    DNS Domain Name Service/System
    ISP Internet Service Provider
    IoT Internet of Things for device controllers
    NVR Network Video Recorder (generally for CCTV)
    Unifi Ubiquiti WiFi hardware brand

    [Thread #187 for this comm, first seen 28th Nov 2026, 14:40] [FAQ] [Full list] [Contact] [Source code]

  • tobz619@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 hours ago

    Co-opting this thread with a question for people:

    If I have wireless devices that I want to put on a separate VLAN, do I need to buy another wireless access point and give it its own SSID and configure that to its own VLAN via the managed switch?

    • CedricWhaley@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      29 minutes ago

      I think that’s too configuration dependent to give a good answer.

      Unifi APs can handle multiple SSIDS but other equipment may not be able to.

    • iamthetot@piefed.caOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      6 hours ago

      I’m not the expert here, as I’m OP, so take with grain of salt lol. But my understanding is you at least need an access point capable of VLAN traffic so it can segment it, and I think it will need its own SSID.

  • neidu4@piefed.social
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    17 hours ago

    Short answer: Don’t buy a VLAN capable router just yet. Buy a VLAN capable switch first, and then you can reevaluate.

    Longer answer: VLANs have been a major part of my career for the past 20 years, and it seems that a very common thing I need to teach people joining me at work is this: Switches don’t provide access between VLANs. Routers do. But that doesn’t necessarily mean that the router needs to know about VLANs.

    Sure, it’s reasonably obvious to many, and there are exceptions, but a very common question I get is how one can set up VLANs so that some hosts can talk to each other across VLANs.

    There are many ways to set up VLANs, but I find it easiest to number a VLAN based on an octet in the IP scope of its clients. For example:
    172.20.32.0/24 gets VLAN 32
    172.20.40.0/24 gets VLAN 40
    …etc

    And then you plug a router into each of those VLANs and set up firewall rules according to your preferences. The router can be connected via a single trunk cable (if it supports VLAN tagging), or if you’re lazy or your router is too dumb, you use a dedicated interface/cable for each VLAN via Access ports instead and segregate them via subnets.

    So back to your question: Put your cameras on an isolated VLAN, provide that VLAN with a gateway, and then you config the gateway to block its internet traffic, but allow access between your camera vlan and some (or all) hosts on your other subnets/vlans.
    A decent VLAN capable switch will let you do this, and on the router side you just treat these VLANs as physically separate networks.

    • iamthetot@piefed.caOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      Thanks for the reply! To make sure I understand your suggestion, I made up this diagram. Do I have the right idea?

      To expand on this, there’s another part I’m not sure about. I already have Ethernet runs in the walls, with wall-plates in various rooms in the house. These all run back to what I will make my server room. I’m a little confused about how the VLANs will work when running through the wall, for example can two different VLANs share the same Ethernet run or do they need to be entirely physically separate runs?

      Here’s the overall, big picture of what I want to achieve eventually.

      • neidu4@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        11 minutes ago

        “this diagram”

        I would use the VLAN capable switch as your first switch after the router. That way, you can assign a VLAN to everything. And your “any dumb switch” can be downstream of one of them, serving whichever VLAN it is connected to.

        How this works:
        VLAN ports have two modes. Terminology might change between vendors, but they all do the same:

        • Untagged (often called Access port). This is a port where you connect anything that doesn’t speak VLAN itself. A PC¹, a Camera, or even a dumb switch. Any traffic coming into an Access port will be assigned any VLAN ID (often called PVID) configured for that port. It is called Untagged, because it doesn’t require any incoming traffic to already have a VLAN tag, and it will strip off the vlan tag from any outgoing traffic.
        • Tagged ports REQUIRE a vlan tag on any traffic passing through it. Ports of this type also often have a list of VLAN IDs that they will allow through. The only thing to keep in mind is that whatever is connected in the other end must also be a tagged port with the same list of VLANs. This is typically used between two switches so that a single cable can carry traffic from multiple VLANs. This kind of connection is often called a Trunk

        ¹: Yes, PCs can also connect to a tagged port, but then you have to set up your network config to also use VLAN tagging. In most cases, it’s easier to just connect the PC to an Untagged port. One benefit of connecting a PC to a tagged port is that you can configure this PC to talk on multiple VLANs with a separate IP for each, so that you can in effect be connected to multiple networks with only one cable.

        Note: Once you use VLAN tagging on a switch, all ports will need to be set up with a VLAN. I noticed that you only specified VLAN 1 in your second diagram. If you want the other stuff to be isolated, sign that to a different VLAN ID.

        Another note: I am ineffiently typing this on my phone, so if any details are unclear or I need to elaborate more on something, let me know, and I’ll do so when I’m back on my PC.

    • remotelove@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      14 hours ago

      Yes to all of this. Learning the switch bit is probably harder than setting up opnsense. With opnsense, it’s just building the VLANs on your interfaces and the routing is automagic.

      With switches, there are nuances like PIVDs, tagging and untagging along with trunks. It’s not that hard, but it can be difficult to visualize at first.

      I still love not having to constantly move cables around though. Even though it’s literally just across my office, I plugged in 8 cables from my servers today into 8 empty switch ports and that was that. Everything weird and crazy I might do is going to be all handled by VLANs, routing and firewall rules and the cables still get to look nice while that happens.

      I just started segmenting my wifi network and isolating all the IoT trash off into its own little corner letting all those thingies just broadcast at each other instead of the rest of my network…

  • bagsy@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    21 hours ago

    Opnsense is a good option. You should be able to find a cheap, dual nic, mini computer on black friday for around $200. Opnnsense is WAAAYYYY easier that mikrotik that others are recommending.

    • motruck@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      14 hours ago

      Mikrotik requires you to sacrifice sanity to the command line gods to get anything done.

      • bagsy@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 hours ago

        That cloud be true, I wouldn’t know. I only owned one for a few months. The UI was horrendous and it bricked itself after an update.

  • Great Blue@infosec.pub
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 day ago

    You can look into OpenWRT. Maybe your router model is supported.

    OpenWRT is capable of VLANs and if you get an OPNsense box later, you can use the router as an access point. You can also set up different SSID for your WLAN and tie each one to a different VLAN

    • iamthetot@piefed.caOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      Hmm I had heart of this before but forgot about it. Darn, I have an old ASUS router sitting around but it’s not on the list of supported hardware.

    • Guiorgy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 hours ago

      I use OpenWRT with separate VLANS for internal, guest, IoT, and a few other networks, and it’s sufficient for my use.

    • lemmyvore@feddit.nl
      link
      fedilink
      English
      arrow-up
      8
      ·
      22 hours ago

      I second OpenWRT.

      You might not even have to do actual VLANs. OpenWRT has very useful abstractions already set up: devices, interfaces, wireless AP, and firewall zones. You can tell it how to connect physical devices and wireless AP into networks, associate networks into firewall zones, and configure how the zones can talk to each other. It takes a moment to wrap your head around it but then it’s quite nice.

      It’s very simple to create a separate wifi AP that’s only for cameras and/or reserve a switch port for them, connect that AP/port to a separate network, assign it a firewall zone, and configure it to be accessible from other zones but to not be able to connect outside to other zones or WAN.

      The only time I’ve had to do an actual tagged VLAN was when I wanted to put a wired machine with a single Ethernet cable in multiple networks.

      • 🄯 CarlOS@lile.cl
        link
        fedilink
        arrow-up
        2
        ·
        16 hours ago

        OpenWRT. That is. Get an openWRT router, you can configure isolated LAN in different VLAN and use firewall rules to control communication between networks and internet.
        If you need a switch, just buy a cheap 20USD 5 or 8 port gigabit one. They all can forward packets with vlan tags (not to manage and read tags, but it should be enough)

        @selfhosted
        @lemmyvore @GreatBlue @iamthetot

    • jonzobot@lemmy.ca
      link
      fedilink
      English
      arrow-up
      6
      ·
      23 hours ago

      Can confirm. But the learning curve is steep. I did eventually get VLANs set up with RouterOS, but it wasn’t at all easy, part of it is that RouterOS has different ways of setting up a VLAN, depending on bridge filtering, and it’s not super obvious which way is which.

      • non_burglar@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        19 hours ago

        That’s because mikrotik builds in IEEE and ISO standards, not what MS and Apple have deemed to be “DNS”, VLAN, etc.

        VLANs are a layer 2 feature, but most people cannot fathom decoupling subnets and routing from them.

        And don’t get me started on making old HP Procurve and Cisco switching play nice with vlans.

  • CompactFlax@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    You need a router. Opnsense is a router. You could buy a different one but if you want to go the route of opnsense, why would you get a different one? It doesn’t need much power, unless you’re trying to route gigabits - and then any router will cost you.

    You also need a vlan aware switch or a second switch (and the router needs more than one local port). Just a switch won’t work; you need the firewall rules between vlans and internet to make it worthwhile.

    My opnsense has ports to WAN, LAN, and IOT (cameras). LAN connects to a switch. IOT connects to a different (poe) switch that runs the cameras. I have a firewall rule on IOT blocking all outbound traffic, and allowing inbound from LAN.

    • iamthetot@piefed.caOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      1 day ago

      I have lots of stitches already, but what’s a specific “VLAN aware” switch?

      As for the opensense, the hardware I have seen recommended to run it is quite expensive right now due to AI shit. I’ve seen N100 or N150 devices recommended a lot. Add in ram and storage and building a whole device gets more expensive than a brand name router for now. For example, I can find Ubiquiti routers for a few hundred dollars.

      • CompactFlax@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        Commonly a “Smart switch” or “layer 2”. Layer3 adds inter vlan routing in the switch which chances are more complexity than you want. Chances are your cameras won’t tag their own traffic and I would trust them to do that. So the switch needs to apply the tag to the port, or it needs to be a separate physical network (hence “virtual LAN”). I probably butchered that explanation.

        If you can find a UI router for less than opnsense, I’d go that route. Their switches aren’t the cheapest but they’re pretty affordable, and the integration is convenient. I run opnsense because I got a device for $50 - used. It’s an Atom processor circa 2012 and has 4GB RAM. I think it should handle a couple hundred mbps and that’s fine for me. Gigabit speed needs more processing horsepower as the speeds increase.

        “Someday” I’ll buy some UI access points, a switch, and a router.

      • Great Blue@infosec.pub
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        A VLAN aware switch is probably a switch which can handle VLANs. If the switch does not, the behavior can vary from ignoring the VLAN-tag, stripping the tag or discarding the packet altogether.

        If your are looking for a switch, look for support for “802.1Q”, “dot1q” or similar. It’s the IEEE standard for VLANs.

      • kieron115@startrek.website
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        use an old laptop to start, routing doesn’t take much until you start doing fancy flow control/quality of service like CAKE or FQ-CODEL. connect a dot1q-aware “smart” switch to it and you have what you need.

        • iamthetot@piefed.caOP
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          1 day ago

          I probably should have mentioned that I would like to achieve 1 gig speeds, which is why I believe building an opnsense machine would be more expensive at the moment.

          However, looking again, I’m finding some Topton machines on Aliexpress that might work for much less than last time I looked. Maybe black Friday sales.

          • los0220@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 hours ago

            You can still buy used office PCs for increasably cheap. The one in this video - Fujitsu S920 is a bit old and slow, but if you don’t care about the power usage, you could buy something with a real CPU (not embedded) and it would be even faster.

            That one is capable of routing over 6Gb/s of iperf traffic. It obviously depends on your firewall rules, but if you currently have the one provided by the ISP, I’m sure it has slower CPU

          • kieron115@startrek.website
            link
            fedilink
            English
            arrow-up
            5
            ·
            1 day ago

            Most routers come with simple ARM SOCs so any relatively modern laptop CPU should be more than capable of handling gigabit routing. I used an i7-6700HQ laptop as a router for a while and it was incredibly overkill.

  • LemmyFeed@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    18 hours ago

    I have a full tplink omada network with an er605 router/gateway and self hosted omada controller which gives me a pretty broad SDN capabilities and makes vlan and other management pretty simple especially when trying to manage vlans across various waps and switches. I’d recommend it for sure.

    and for vlan and firewall acl planning I used AI for a lot of it and it was super helpful. I’m not a networking person but know enough to have an idea of what I wanted so AI was able to tell me how to configure everything I wanted in my omada controller to get the proper cross vlan communications.

    my default vlan is infra and management, so all the hypervisors and network gear. then I have vlan40 for servers, 20 for my end user devices with dedicated ssid, 30 for my son’s segregated network with dedicated ssid, and 69 for iot with it’s own ssid too.

    edit: I also have 8 poe cameras but they all run to a dedicated NVR and don’t use my network for any transmission so they’re already kinda in their own network already.