HOMELAB / DOCUMENTATION

VLAN Segmentation

Why I separate trusted devices, servers, IoT, cameras, and guests on my home network.

Why I started using VLANs

I wanted to get away from having computers, smart-home equipment, cameras, and visitors all on the same unrestricted network. VLANs let me organize that traffic without needing a separate physical switch for every group.

In my setup, the managed switch handles VLAN tagging while OPNsense handles routing and firewall rules between networks. A VLAN by itself isn’t a security policy; the rules between VLANs are what determine which connections are allowed.

Network groups

Group What belongs there General approach
Trusted Personal computers and administration Broader access to services I manage
Servers Self-hosted applications Allow only the necessary cross-network connections
IoT Smart-home and connected devices Internet and specific internal services where needed
Cameras Camera equipment Keep camera traffic separate from everyday devices
Guest Visitor devices Internet access without internal network access

I keep exact subnet assignments and the current port/rule map in private documentation. The public version focuses on the design rather than exposing the entire configuration.

How traffic gets between VLANs

Devices in different VLANs don’t communicate directly at Layer 2. When a connection needs to cross networks, it goes through the router, where OPNsense can allow or block it.

For example, Home Assistant needs to connect to IoT devices, like a smart thermostat. That requires specific rules, and could require some automatic discovery configuration as some protocols do not automatically cross the VLAN boundary. Different devices use different protocols.

What I check when something stops working

  1. Is the device on the expected switch port or wireless network?
  2. Did it receive an address and gateway for the right network?
  3. Can it reach its gateway?
  4. Is an OPNsense firewall rule blocking the connection?
  5. Is the application using a discovery protocol that doesn’t cross networks by default?

What I learned

Segmentation hardens the network makes it easier to structure, but it also creates more areas where a configuration mistake can break connectivity. I’ve learned to test one connection at a time and document why an exception exists instead of opening broad access just to make something work.