Set up VLANs on UniFi, step by step

A careful walk-through of putting smart-home devices on their own UniFi network: back up, create the virtual network, give it a Wi-Fi name, set switch ports, isolate it, test it and know how to undo it.

One home network drawn as color-coded lanes, small smart gadgets in one lane and laptops in another.

This guide takes one common job and does it end to end on a UniFi network: putting smart-home gadgets, such as plugs, cameras and speakers, on a separate network of their own, walled off from the laptops and phones that hold your accounts.

It follows on from what a VLAN is, and whether your home network needs one and plan a UniFi home network. It assumes your console is set up, your switches and access points are adopted, and everything works on one plain network. If not, start with those guides.

Every step below comes from Ubiquiti’s own Help Center, read on November 23, 2026. Only the firewall page gives version numbers (menu paths for UniFi Network 9.3 and 9.4). Menus move between versions, so if a name doesn’t match your screen, follow the linked help page as it reads now. We use UniFi because Ubiquiti documents these steps publicly, not as a recommendation or ranking.

Before you start

Pick a quiet time, because a VLAN mistake can knock devices offline, and write down a short plan. An invented example: a network called “Smart Home” with VLAN ID 20 and the address range 192.168.20.0/24, broadcast as a Wi-Fi name such as “Home-Devices.” The numbers are yours to choose; what matters is that you record them. Household Hero’s where-everything-is note is a sensible home for that record.

Make sure you can sign in to your UI Account and the UniFi app, and that the account is protected with two-step verification. Our guide to two-step verification and passkeys covers the habits.

Step 1: Back up the UniFi configuration

Ubiquiti’s System Config Backups include “all OS, application, and device configurations,” and it calls them the most common form of backup for Cloud Gateways and CloudKeys. To turn on automatic cloud backups, go to Settings > Control Plane > Backups and check System Backups; Ubiquiti says a cloud backup is then made each week and before each major update. If you can’t use cloud backups, you can download a local offline backup file from the same place (Ubiquiti Help Center, checked November 23, 2026).

Make a fresh backup just before you start rather than relying on last week’s automatic copy. Ubiquiti notes that only the Cloud Gateway Owner can manage these backups, because they’re saved to that person’s UI Account. (One line on that page names Settings > Control Plane > Console instead; the rest of the page uses Backups, so look in both if your menu differs.)

Step 2: Create a virtual network for smart devices

In UniFi Network, go to Settings > Networks and create a new virtual network. Ubiquiti’s steps are: name the network, optionally configure settings “such as VLAN ID, subnet range, DHCP, isolation, content filtering, and DNS,” then click Apply Changes (Ubiquiti Help Center, checked November 23, 2026).

Enter the VLAN ID and address range from your plan, and leave DHCP on so the gateway hands out addresses on the new network. Leave isolation for Step 5.

Nothing moves yet. Ubiquiti says VLANs created on UniFi Gateways “do not automatically assign devices”; you assign them by Wi-Fi name or by switch port, as in the next two steps. If your gateway isn’t a UniFi one, the order is different: Ubiquiti says the VLAN must be created on the third-party gateway first, then added in UniFi with Third-party Gateway selected under Router and the same VLAN ID (Ubiquiti Help Center, checked November 23, 2026).

Step 3: Give the new network its own Wi-Fi name

Most smart gadgets use Wi-Fi, so this is the step that moves them. Go to Settings > WiFi and create a new WiFi (or edit one). Click the Network dropdown and select the network you just made, then choose which access points broadcast it: all of them, specific ones or AP groups (Ubiquiti Help Center, checked November 23, 2026).

Ubiquiti’s main warning comes here: every port between those access points and the gateway must allow the network’s VLAN ID, and “failure to do so will result in clients being unable to join the WiFi.” UniFi switches allow all traffic by default; a third-party switch has to be set up by hand. Ubiquiti recommends leaving access point uplink ports “trunked” to carry all relevant VLANs.

Security mode matters for smart devices. Ubiquiti’s default is WPA2/3 Personal, but it says some IoT devices don’t tolerate it. You can switch Advanced from Auto to Manual and choose WPA2 Personal, though that turns off 6 GHz for that Wi-Fi name. Ubiquiti suggests a dedicated IoT Wi-Fi name for exactly this reason, so your main network keeps the newer settings (Ubiquiti Help Center, checked November 23, 2026).

Then move one gadget across, using its own app to change its Wi-Fi network. Device-by-device advice is in setting up smart-home devices safely.

Step 4: Assign switch ports for wired devices

Skip this step if all your smart devices use Wi-Fi.

Ubiquiti’s switch port guide uses two terms. The Native VLAN is the network a directly connected device is placed on. Tagged VLAN Management decides which other networks the port carries: Allow All (a trunk port, the default), Block All (an access port carrying only the native network) or Custom (a chosen set) (Ubiquiti Help Center, checked November 23, 2026).

Ubiquiti’s steps: go to the Ports tab, select the port, set the Native VLAN / Network to your smart-device network, set Tagged VLAN Management if you want to restrict it, and apply the changes. For a port with a single gadget plugged into it, such as a wired hub, an access port on the new network is the simple choice.

Two cautions from the same page. When an access point is plugged into a port, that port’s native network “should never be the same as the network being broadcast by that AP” (except VLAN 1), or clients can’t join. And don’t restrict a port that feeds an access point or another switch, or everything downstream can lose its connection. Change one port at a time.

Step 5: Isolate the new network

So far the new network is separate in name only. Ubiquiti’s isolation guide lists several tools; for a home, the simplest is Network Isolation, which it calls a one-click option that “automatically configures the necessary firewall rules to block inter-VLAN traffic.” Go to Settings > Networks, select the network and enable Network Isolation (Ubiquiti Help Center, checked November 23, 2026).

The same page describes Client Device Isolation for a Wi-Fi name (under Settings > WiFi), which stops devices on the same access point from reaching each other.

Finer control goes through Ubiquiti’s Zone-Based Firewall, which needs a UniFi Gateway or Cloud Gateway, UniFi Network 9.0 or newer and UniFi (Cloud) Gateway version 4.1 or newer. Its policy path is Settings > Zones > Create Policy or Settings > Policy Table > Create New Policy in Network 9.4, and Settings > Policy Engine > Zones > Create Policy in 9.3. Ubiquiti warns that blocking traffic to the Gateway zone “may disrupt critical network functions like DHCP and DNS,” and says to create any allow policy before the block policy that denies everything else (Ubiquiti Help Center, checked November 23, 2026). If Network Isolation does what you want, you don’t need custom policies.

One trade-off to expect: Ubiquiti notes that services such as AirPlay or screen mirroring may need separate connections and won’t work when one side can only reply. If you cast to a TV on the isolated network, plan for that.

Two glowing device clusters with a translucent wall between them.

Step 6: Test that everything still works

Test in this order, one device at a time:

  1. A gadget on the new Wi-Fi name connects and gets an address in the new range, which shows DHCP is working. Check it reaches the internet through its app.
  2. Your main network is unchanged. Phones and laptops on the main Wi-Fi still browse, and you can still open the UniFi app and web interface.
  3. Isolation does what you expect. A device on the smart network shouldn’t reach devices on the main one. If a gadget’s app now can’t control it from your phone, that’s the isolation working; decide whether to allow that one connection through a firewall policy or leave it.
  4. Wired ports you changed still connect their devices.

If clients can’t join the new Wi-Fi, Ubiquiti’s troubleshooting page names the two usual mistakes: the network is set as the native network on the access point’s own uplink port, or it isn’t allowed on a switch port further upstream. Its VLAN Viewer, in the Ports tab, shows the tags along the path back to the gateway (Ubiquiti Help Center, checked November 23, 2026). A slow device rather than a missing one is a different problem; our slow Wi-Fi checklist covers that.

Step 7: Know how to undo it

Undo small mistakes in reverse order: turn off isolation, move a port back to its old native network, and switch the Wi-Fi name’s Network dropdown back to your main network.

For a full rollback, restore the backup from Step 1. Ubiquiti’s steps are Settings > Control Plane > Backups, click Restore, then choose the most recent cloud backup or upload a file. Restore All Applications and Settings is on by default; unchecking it allows a partial restore (Ubiquiti Help Center, checked November 23, 2026). A restore takes everything back to the moment of the backup, so any other changes made since are lost too.

This guide is general information, not professional IT or security advice. Back up before every change and see our disclaimer.

Common questions

Should my access points’ own network be the new VLAN?

No. Ubiquiti says access points generally use VLAN 1 to talk to UniFi Network unless you change it, and recommends keeping their uplink ports trunked. The new VLAN is for the devices that join the new Wi-Fi name.

Why did my old gadget refuse the new Wi-Fi?

Often it’s the security mode. Ubiquiti suggests a WPA2 Personal setting on a dedicated IoT Wi-Fi name, which turns off 6 GHz for that name only.

Can I do this with a non-UniFi router?

Ubiquiti documents third-party gateways: create the VLAN on that gateway first, then match the VLAN ID in UniFi. Ubiquiti adds that most third-party gateways block traffic between VLANs by default, so routing and firewall rules are set on that gateway.

Sources checked November 23, 2026: Ubiquiti Help Center, “Backups and Migration in UniFi,” “Creating Virtual Networks (VLANs),” “Creating UniFi WiFi SSIDs,” “Switch Port VLAN Assignment (Trunk & Access Ports),” “Implementing Network and Client Isolation in UniFi,” “Zone-Based Firewalls in UniFi” and “Virtual Network (VLAN) Troubleshooting.”