Trunk, access, PVID: the only VLAN words that matter
Stop guessing about switch ports. Learn how to configure tagged trunks and untagged access ports correctly to isolate IoT, trusted, and guest networks from day one.

Most new home lab builders size their VLAN strategy for the devices they have today. That is the trap. A single desktop computer looks fine on a generic network, so a flat setup feels generous on day one, and nothing about it looks wrong until a smart plug or a guest device quietly compromises the entire segment.
The book Lock Down Your Home Network opens its networking chapter with exactly this, under a heading that sums it up: VLANs from the Wire Up. This post covers the three words that fix it—trunk, access, and PVID—and why leaving VLAN 1 active is a critical failure. It explains how to map physical cables to logical networks so that separation is real, not cosmetic.
One caveat, straight from the book: this guidance assumes you are using a managed switch and a firewall capable of routing multiple interfaces. If your hardware does not support tagging, these steps will not apply. Always check your switch manual for specific menu names, as the logic remains the same even if the clicks differ.
The trap: assuming ports just work
VLANs fail in one of two ways. Either the tag never makes it from the firewall to the device, because a switch port or hypervisor bridge strips it, leaving the device on the wrong network. Or the tag is optional where it should not be, allowing a port that should only carry IoT traffic to also accept the trusted network. Both failures come from not knowing which port is tagged, which is untagged, and why.
The IEEE 802.1Q standard adds a 4-byte tag to each Ethernet frame. Inside that tag is a 12-bit VLAN ID, meaning IDs run from 1 to 4094. A switch uses these tags to keep traffic separate. When a frame leaves through a port belonging to one VLAN only, the switch removes the tag so the end device sees plain Ethernet. Understanding this mechanism is the difference between isolation and chaos.
The fix: trunk, access, and PVID
Every switch port falls into one of two categories. An access port belongs to exactly one VLAN. Frames leave without a tag and arrive without one. The switch assigns incoming frames to the port's VLAN, often called the PVID or native VLAN. You use these for ordinary devices like TVs, printers, and desktops that do not understand tagging.
A trunk port carries several VLANs. Each frame is tagged with its ID as it travels between network devices that understand tags. You use trunks between the firewall and switch, switch to switch, switch to access point, or switch to a virtualization host like Proxmox.
The critical rule for trunks is that they can carry one VLAN untagged. Keep that untagged VLAN to the management VLAN or nothing at all. Never leave VLAN 1, the default on almost every switch, carrying anything you care about. If a port is an access port, it must be removed from VLAN 1 entirely to prevent accidental leakage.
The setup: firewall, switch, and guests
Start with an address plan. Write down your VLANs, names, subnets, and DHCP ranges in a table. For example, VLAN 10 for TRUSTED at 192.168.10.0/24, VLAN 30 for IOT at 192.168.30.0/24, and VLAN 99 for MGMT at 192.168.99.0/24. Keep this table next to your switch while you configure it.
On the firewall, create a VLAN device for each network. Set the parent interface to the physical port connecting to the switch, set the tag to the VLAN ID, and assign an IP address. Enable the interface and configure DHCP ranges where needed. By default, OPNsense blocks all traffic on new interfaces until you add rules, which is the correct secure starting point.
On the managed switch, configure the ports based on their role. The port to the firewall must be a member of all five VLANs, tagged. The port to an access point should carry the wireless VLANs (like 10, 30, and 40) tagged, plus VLAN 99 untagged if the access point uses it for management. Ports to ordinary wired devices must be untagged members of exactly one VLAN and removed from VLAN 1.
For virtualization, if you use Proxmox, ensure the bridge is VLAN-aware. In /etc/network/interfaces, set bridge-vlan-aware yes and define the VLAN IDs. Connect the firewall VM with no VLAN tag on its network card so it receives all tagged frames, while ordinary guests receive a specific tag on their virtual NICs.
The wireless layer: SSIDs and isolation
Wireless networks require one SSID per zone. Map each Wi-Fi name to its corresponding VLAN ID. For instance, "Home" maps to VLAN 10, and "Home-IoT" maps to VLAN 30. On the guest network, enable client isolation, sometimes called AP isolation or guest mode. This prevents guest devices from reaching each other on the same access point, a restriction the firewall cannot enforce because that traffic never leaves the access point.
Be aware that many IoT devices only speak 2.4 GHz and may dislike WPA3 or band steering. If a device fails to join, configure the IoT network for 2.4 GHz with WPA2 rather than weakening the security of your trusted network. This keeps the secure zone robust while accommodating older hardware.
Checklist: VLANs
- Address plan table written, third octet matching the VLAN ID
- VLAN devices created on the right parent, assigned, enabled, addressed
- DHCP running on each network that needs it
- Switch: trunk to firewall, access point and hosts; access ports for devices
- VLAN 1 removed from every port that does not need it
- One SSID per wireless zone, tagged; client isolation on guest
- Proxmox bridge VLAN-aware; firewall NIC untagged, guests tagged
- A test device on each VLAN gets the right address from the right range

