How to Set Up VLANs in UniFi (2026 Guide)
If every device on your network shares one flat network, a single compromised smart plug or guest laptop can see everything else: your file server, your cameras, your work machines. VLANs (Virtual LANs) fix that by splitting one physical network into separate, isolated segments.
This guide walks through setting up VLANs on any UniFi gateway: Cloud Gateway Ultra, Max or Fiber, Dream Machine Pro, SE or Pro Max, Dream Router, or UniFi Express. It's written for UniFi Network 9 and newer, including Network 11, which retired the old firewall rules in favor of the zone-based firewall.
Rather have a pro handle it? KJJ Tech configures UniFi VLANs and firewalls every day, onsite in Orlando or remotely at a flat price anywhere in the U.S. Book a free 30-minute call →
What Is a VLAN and Why Does It Matter?
A VLAN logically divides one physical network into separate networks, each with its own subnet. Traffic between them has to pass through your gateway, which means your firewall decides what's allowed to cross.
- Security: your smart TV has no business talking to your NAS. If an IoT device gets compromised, a VLAN keeps the damage contained.
- Control: you can give guests internet-only access, keep cameras off the internet, and apply different rules to each group of devices.
- Troubleshooting: when every device type lives in its own subnet, it's obvious at a glance what a misbehaving IP address is.
Plan Your VLANs First
Decide on your segments before you touch any settings. Here's the layout we use for most homes and small offices:
- Default / Management (untagged, VLAN 1): your UniFi gateway, switches and access points. Leave this one alone.
- Trusted (VLAN 10, 192.168.10.0/24): laptops, desktops and phones you own.
- IoT (VLAN 20, 192.168.20.0/24): smart TVs, speakers, thermostats, plugs and other smart-home gear.
- Guest (VLAN 30, 192.168.30.0/24): visitors. Internet only, nothing local.
- Cameras (VLAN 40, 192.168.40.0/24): security cameras and NVRs, ideally with no internet access unless the vendor needs it. Our UniFi Protect guide covers camera setup in detail.
Matching the third octet of the subnet to the VLAN ID (VLAN 20 → 192.168.20.x) makes everything easier to read later. Three to five VLANs covers almost every home and small business; you can always add more.
Step 1: Create the Networks
In the UniFi Network application, go to Settings → Networks and click Create New below the list of networks.
- Name: something clear, like "IoT".
- Zone: new networks default to Internal. If you've created zones such as IoT or Cameras (see Step 4), you can put the network straight into one here.
- Auto-Scale Network: uncheck this to choose the subnet yourself (recommended, so it matches your plan), then set the IPv4 address and netmask, for example
192.168.20.1/24. - VLAN ID: switch from Auto to Manual and enter your ID, for example
20. - Isolate Network: check this for Guest (and optionally Cameras) to block that network from your other networks without writing any firewall policies.
- Allow Internet Access: leave it checked, except for cameras you want kept offline.
- DHCP Mode: leave it on DHCP Server so devices get addresses automatically.
Save, then repeat for each VLAN in your plan.
Step 2: Put a Wi-Fi Network on Each VLAN
Go to Settings → WiFi and click Create New for each VLAN that needs wireless access.
- Give it a clear name (for example "Home", "Home-IoT" and "Guest").
- Under Network, select the VLAN you just created. That's what ties the SSID to the VLAN.
- For the IoT SSID, keep 2.4 GHz enabled and use WPA2. WPA3 requires PMF, which many smart devices can't handle; UniFi itself warns about this and recommends a separate WPA2 network for legacy and IoT clients. The IoT Optimization options on the SSID can also help stubborn devices connect.
- For Guest, also check Client Device Isolation (under the SSID's Security settings) so guests can't see each other.
Keep the number of SSIDs to four or fewer. Every extra SSID adds airtime overhead on every access point.
Step 3: Set Up Switch Ports
Wired devices get their VLAN from the switch port they plug into. Open your switch from UniFi Devices and select a port (or several at once). Two settings under Core Settings control VLANs:
- Native VLAN / Network: the untagged network for whatever plugs into that port. Set a camera port to Cameras, a desk port to Trusted, and so on.
- Tagged VLAN Management: which additional VLANs are carried tagged on the port. Use Allow All on uplinks to other switches and on ports feeding access points, Block All on ports for end devices like PCs and cameras, and Custom when you want to pass only specific VLANs.
Access points need every SSID's VLAN tagged on their port. If an SSID connects but never gets an IP address, this is almost always why.
Step 4: Control Traffic With the Zone-Based Firewall
Here's the part most people miss: new VLANs can talk to each other by default. UniFi places new networks in the Internal zone, and traffic within the Internal zone is allowed. A VLAN on its own doesn't isolate anything; firewall policies do.
Three settings control this:
- Isolate Network (the checkbox from Step 1). The quickest option: that network can't reach your other networks, with no policies to write. It's ideal for Guest, but it's all-or-nothing: an isolated IoT network can't be reached from your phone either.
- Default Security Posture (on the Settings → Networks page, below the network list). Allow All is the default and lets your internal networks reach each other. Block All flips that, so nothing crosses between networks until you allow it. It's the strictest option, but expect to add allow policies for things like casting and printing.
- Zones and policies (under Settings → Policy Engine). In Zones, create zones such as IoT, Cameras and Guest and move those networks into them. Traffic between the Internal zone and your new zones is then blocked, and in the Policy Table you add specific allow policies for what should cross, like Trusted → IoT so your phone can control the TV, with return traffic allowed automatically.
For most homes and small offices, we recommend keeping the posture on Allow All, isolating Guest, and putting IoT and Cameras in their own zones. Trusted devices can still manage everything, while untrusted devices stay contained.
Upgrading from older firmware? Network 11 automatically migrated sites from the legacy LAN In / LAN Out firewall rules to zones. It's worth opening the zone matrix after an upgrade to confirm your inter-VLAN blocks still behave as intended. Our UniFi zone-based firewall guide covers zones, policy order and migration in detail.
Step 5: Make Casting and Printing Work Across VLANs
AirPlay, Chromecast, Sonos and network printers find each other using mDNS, which doesn't cross VLANs on its own. Once your phone is on Trusted and your TV is on IoT, casting stops working until you:
- Set Gateway mDNS Proxy (on the Settings → Networks page) to Auto, or to Custom and add your Trusted and IoT networks to the VLAN Scope.
- Allow Trusted → IoT in the firewall. Discovery alone isn't enough; the actual stream has to be permitted too.
Smart-home gear using Matter over Thread also needs IPv6 enabled on the VLAN where the Thread border router (an Apple TV, HomePod or Nest hub) lives. Many people leave IPv6 off on IoT networks, and it's a common reason Matter devices fail to pair. Network 11 also adds a dedicated Matter page in Settings.
Step 6: Test and Verify
Connect a device to each VLAN and confirm:
- It gets an IP address in the right subnet (for example 192.168.20.x on IoT).
- It can reach the internet (unless it's a camera you've kept offline).
- It cannot reach devices on networks it shouldn't. Try pinging or browsing to a device on Trusted from the IoT network.
- Your intentional exceptions work: casting, printing, the phone app for your thermostat.
UniFi's traffic logs show which policy allowed or blocked a connection, which makes it much faster to track down a rule that isn't doing what you expected.
Common Mistakes to Avoid
- Assuming VLANs isolate by themselves. Without isolation or firewall policies, your VLANs still talk freely.
- AP ports set to Block All. SSIDs on other VLANs connect but never get an address.
- Blocking a network you need to reach. If your phone can't control your smart TV after locking things down, IoT is either isolated (use a zone instead) or missing a Trusted → IoT allow policy.
- IoT on 5 GHz or WPA3 only. Older smart devices simply won't see the network.
- Moving the management network. Changing the VLAN your UniFi devices live on is the fastest way to lose contact with them. Leave it untagged unless you know exactly what you're doing.
- Too many VLANs. Every segment is something to maintain. Start with three or four.
Frequently Asked Questions
Do UniFi VLANs block each other by default?
No. New networks are placed in the Internal zone, and the Default Security Posture is Allow All, so they can reach each other. Check Isolate Network, move networks into their own zones, or set the posture to Block All to separate them.
Do I need a UniFi switch to use VLANs?
You need a managed switch that supports 802.1Q VLAN tagging. A UniFi switch is easiest because you configure ports from the same application, but most managed switches work if you match the VLAN IDs and tagging.
How many VLANs should a small business have?
Most need three to five: Trusted (staff), Guest, IoT and Cameras, plus a separate VLAN for card-payment terminals or servers if you have them.
Does this work on the UniFi Express or Dream Router?
Yes. Every current UniFi gateway supports VLANs and the zone-based firewall. Smaller gateways have lower limits on throughput with security features enabled, but VLAN setup is the same.
When to Call a Professional
VLANs get complicated quickly once you add exceptions between networks, mDNS, Matter devices, multiple switches or more than one site. A mistake can silently leave everything exposed, or knock your cameras and printers offline.
If you'd rather have it done right the first time, that's exactly what we do: onsite in Orlando, or a fixed-price remote configuration review anywhere in the U.S.
Free: UniFi Security Checklist
26 settings to check on any UniFi network, from admin accounts to firewall zones, on one printable PDF.
No spam. Just the PDF, plus an occasional new guide.
Need help setting up VLANs?
We configure UniFi networks every day. Let us handle the setup so you can focus on everything else.
Book a free call Remote review: $340 flat