New Unlimited 5G data with a public IP, from $120/mo
Back to Blog Guide

How to Set Up VLANs in UniFi (2026 Guide)

By , founder · Updated · 10 min read

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.

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:

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.

UniFi VLAN layout: Management VLAN 1, Trusted VLAN 10, IoT VLAN 20, Guest VLAN 30, Cameras VLAN 40
A typical UniFi VLAN plan: Management, Trusted, IoT, Guest and Cameras, each on its own subnet.

Step 1: Create the Networks

In the UniFi Network application, go to Settings → Networks and click Create New below the list of networks.

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.

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:

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:

  1. 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.
  2. 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.
  3. 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:

  1. 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.
  2. 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:

  1. It gets an IP address in the right subnet (for example 192.168.20.x on IoT).
  2. It can reach the internet (unless it's a camera you've kept offline).
  3. It cannot reach devices on networks it shouldn't. Try pinging or browsing to a device on Trusted from the IoT network.
  4. 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

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

Related reading

Guide

UniFi AP Placement Guide: How Many APs & Where to Mount

Stop guessing where to put your access points. Plan placement based on building layout, materials, and real-world performance.

April 2026 Read →
Security

12 Network Security Tips Every Small Business Should Follow

From default credentials to VLAN segmentation: practical, no-nonsense network security tips that actually move the needle.

September 2026 Read →