October 9, 2026
VLANs at home: what I split up and why
Why segment a home network at all
Most home networks are one flat segment: laptops, phones, light bulbs, self-hosted services and guests’ phones, all talking to each other freely. That’s convenient right up until one cheap IoT device with bad firmware can see everything else on the network. I split things into four VLANs: trusted, IoT, DMZ, and guest.
Trusted
This is the segment for devices I actually manage and trust: my own laptops, desktops, and the core homelab hosts. It has the most access to everything else, because it’s the segment where I’m the one typing.
IoT
Smart bulbs, plugs, and ESP32-based sensors live here, fully separate from anything with real access. The honest reason is that a lot of consumer IoT firmware is not something I’d trust to resist a compromise attempt, and I’d rather a bad bulb be stuck talking to nothing than sitting on the same segment as my NAS. IoT devices get just enough outbound access to do their job and nothing else.
DMZ
Services that need to be reachable from the internet sit in the DMZ, away from my personal devices and IoT gear. If that service gets compromised, the blast radius stops at the DMZ’s firewall rules instead of spreading to the rest of the house.
Guest
Visitors’ phones and laptops get a guest network with internet access and nothing else. No path to IoT, no path to trusted, no path to the DMZ. It’s the same principle as IoT isolation, just for people instead of devices.
The gotcha: mDNS doesn’t cross VLANs
The first thing that broke the moment I turned this on: mDNS-based discovery (the thing that lets you find a device by a friendly .local name, or lets a smart speaker “just find” a bulb) doesn’t cross VLAN boundaries by default. It’s a multicast, link-local protocol that was never designed to hop between segments. Routers only forward it if you turn on an mDNS reflector, and that re-opens discovery across the boundary you just built.
Practically, that means a device on the trusted VLAN can’t discover something sitting on the IoT VLAN by name the way it could on a flat network. The fix isn’t to bridge mDNS across VLANs, which undoes the whole point of segmenting. Instead, give the device a DHCP reservation, add it by IP, and open only the port that integration actually needs:
# Home Assistant (trusted) -> one ESPHome device (IoT), narrowly scoped
allow ha_host -> iot_device tcp/6053 # ESPHome native API only
allow iot_net -> trusted_net established,related # replies only
deny iot_net -> trusted_net any # IoT can never start a connection in
That one rule took me longer to find than I’d like to admit, because “device just isn’t showing up” could mean a dozen different things. Once I understood that mDNS simply doesn’t travel between VLANs, the fix took two minutes: a reserved IP, a narrow firewall rule, done.
Where it landed
Four segments, each with only the access it actually needs, and a short list of explicit firewall rules instead of implicit trust. There’s more setup now because devices can’t automatically find each other across networks. That’s a tradeoff I’m fine with.
Enjoyed this
Here's what I'm building with it.
See projects →