How to Set Up a VLAN on a Home Network (Without Losing Your Mind)

Some links in this article are affiliate links. We earn a small commission if you buy through them, at no cost to you. We only link to hardware we have personally used or verified.

Most home networks are a flat layer-2 mess. Your work laptop, your smart TV, your kids' tablets, that sketchy IoT thermostat, and your NAS all share the same broadcast domain. If any one of those devices is compromised, it has a clear path to everything else.

VLANs fix this. They are not complicated, but the documentation online is usually written for enterprise network engineers. This guide is written for someone who knows what a router is and wants to actually get this done at home without a CCNA.

What You Need

To use VLANs you need hardware that supports them. Most consumer routers do not. Here is what the minimum setup looks like:

Plan Your VLANs First

Before touching any hardware, decide what you want to separate. A sensible home setup:

Write this down. You will refer to it constantly during setup.

Router Configuration

The process varies by router firmware, but the concepts are the same everywhere. Using OPNsense as the example:

Go to Interfaces, then Assignments. Create a new VLAN interface for each VLAN you planned. Assign a VLAN ID (10, 20, 30, etc.) and a parent interface (your LAN port). Give each VLAN interface a static IP and enable the DHCP server for that subnet.

Example subnets: VLAN 10 (Main): 192.168.10.1/24 DHCP: .100-.200 VLAN 20 (IoT): 192.168.20.1/24 DHCP: .100-.200 VLAN 30 (Guest): 192.168.30.1/24 DHCP: .100-.200

Then go to Firewall and create rules. The critical ones:

Managed Switch Configuration

Using the TP-Link TL-SG108E web interface as the example. Log in and go to VLAN, then 802.1Q VLAN.

For each port, decide whether it is an access port (belongs to one VLAN, used for end devices) or a trunk port (carries multiple VLANs, used for uplinks to your router or other switches).

Port 1 (uplink to router): Trunk. Tagged: 10, 20, 30. Port 2 (desktop PC): Access. Untagged: 10. Port 3 (smart TV): Access. Untagged: 20. Port 4 (spare): Access. Untagged: 30 (or leave unassigned).

Set the PVID (Port VLAN ID) for each access port to match its untagged VLAN. This tells the switch which VLAN to assign untagged traffic coming in on that port.

Wireless VLAN Separation

If you are using UniFi or Omada access points, create separate SSIDs for each VLAN. Assign each SSID to its corresponding VLAN ID. The AP handles the tagging before traffic hits your switch trunk port.

This means your IoT devices connect to a different Wi-Fi network name and are automatically placed on VLAN 20, completely isolated from your main machines even though they are on the same physical access point.

Verifying It Works

Connect a device to each VLAN and verify:

Use ping and traceroute to verify. If something is routing when it should not be, go back to your firewall rules. Missing a block rule is the most common mistake.

Want the Full Network Security Guide?

This article covers VLANs. Our Home Network Security Setup Guide covers the full picture: router hardening, DNS filtering with Pi-hole or NextDNS, device monitoring, WireGuard VPN setup, and a complete firewall rule template for OPNsense and pfSense. $19, instant download.

Get the Network Security Guide

Related Posts

More networking guides in your inbox

Practical posts every week. No spam.