Networks and VLANs on the Cloud Gateway Ultra
One cable, many networks: separate VLANs for the admin, the family, guests, servers, smart devices and the TV, a Wi-Fi name for each, switch ports that put every device in the right network – and an order of steps that doesn't lock you out.
Back to the network map and all chapters
| What You Need |
|---|
| A router that can do VLANs – here a UniFi Cloud Gateway Ultra (one 2.5 GbE WAN port, four 1 GbE LAN ports), already set up with the UniFi Network app |
| A small managed switch and a Wi-Fi access point that understand VLANs (for example a UniFi Flex Mini and a UniFi U7 Lite) |
| The provider's modem in bridge mode, so that the gateway is the only router |
| A laptop with a cable, and about an evening |
Most homes have one network: everything – laptops, phones, the TV, the printer, smart plugs, a server – sits together, and each device can talk to every other. That's convenient until one of them misbehaves: a cheap camera with old firmware, a TV that phones home, a server that is reachable from the Internet. This chapter splits the home into separate networks on the same cables, using VLANs. The rules for who may talk to whom come in chapter 7; here the networks are built.
The menu names below are from the UniFi Network app; other routers that can do VLANs have the same ideas under different names. As before, every step is Do (here mostly clicks instead of commands) – What it does – Check.
How VLANs Work
A VLAN is a network that exists only as a number on each packet – a tag from 1 to 4094. One cable can carry many VLANs at once, and the switch and access point keep them apart by that number. Two kinds of switch ports, in UniFi's words:
- Access port – carries one network, without tags. A device plugged in (a server, a TV) doesn't know anything about VLANs; it simply ends up in the network set as the port's Native VLAN. In UniFi: Tagged VLAN Management: Block All.
- Trunk port – carries several networks with tags, between devices that understand them: gateway, switch, access point. In UniFi: Allow All (every network) or Custom (a chosen few).
Each VLAN gets its own address range, and the gateway is the "door" (router) of each one. That's the important part: traffic from one network to another has to go through the gateway, and there the firewall can stop it.
6.1 The Plan
Decide on paper first. One example plan for a household with a server and smart devices:
| Network | VLAN | Addresses | Who | Wi-Fi |
|---|---|---|---|---|
| Admin (the default network) | 1, untagged | 192.168.20.0/24 | only the admin's own devices, and the UniFi devices themselves | Home-Admin |
| Family | 30 | 192.168.30.0/24 | everybody else at home, the printer | Home |
| Guests | 10 | 192.168.10.0/24 | visitors – Internet only | Home-Guest |
| Servers | 40 | 192.168.40.0/24 | the server (.20) | – |
| IoT | 50 | 192.168.50.0/24 | Home Assistant (.10), plugs, sensors | Home-IoT |
| Multimedia | 60 | 192.168.60.0/24 | the TV | – |
| VPN | – | 192.168.70.0/24 | from outside, chapter 8 | – |
A few habits that make life easier: the VLAN number equals the third number of the address (VLAN 40 → 192.168.40.x); the gateway is always .1; DHCP hands out .100–.250, and .2–.99 stay free for devices with a fixed address.
Why exactly these networks? Admin is the only one from which the router, switches and servers can be managed. Family devices get the Internet and the services meant for them, but no management pages. Guests get only the Internet. The server is reachable from the Internet (mail, websites), so it must not sit next to the laptops. IoT devices and the TV run software nobody at home controls – they get their own corners.
6.2 Back Up the Configuration
Do: Settings → Control Plane → Backups → download a backup (or turn on automatic cloud backups there).
What it does: saves all network settings in one file. Ubiquiti keeps manual and automatic backups in the same place.
Check: the file is on your computer. Do this before every bigger change in this chapter and the next.
6.3 Create the Networks
Do: Settings → Networks → New Virtual Network, once for each VLAN from the plan (the default network becomes Admin – just set its range to 192.168.20.1/24). For each, switch the settings to manual and fill in:
- Name –
Family,Guests,Servers,IoT,Multimedia - VLAN ID – 30, 10, 40, 50, 60
- Gateway IP / Subnet –
192.168.30.1/24and so on - DHCP range –
.100to.250 - Zone – for Guests choose Hotspot; the zones for the others come in chapter 7
What it does: the gateway gets a new address in each network and starts handing out addresses there (Creating Virtual Networks). Nothing is connected to the new networks yet, so nothing changes for existing devices.
Check: the Networks list shows every network with its VLAN ID and address range.
6.4 A Wi-Fi Name for Each Network
Do: Settings → WiFi → Create New; give it a name and a password and choose the Network it belongs to. Settings per network:
| Wi-Fi | Network | Settings |
|---|---|---|
Home-Admin | Admin | a new name; WPA3, PMF required – only modern devices, and only yours |
Home-Guest | Guests | Client Device Isolation on – guests can't see each other either |
Home-IoT | IoT | 2.4 GHz only, WPA2, PMF off – many smart devices know nothing else (Ubiquiti recommends a separate IoT network for exactly this) |
Home | (for now unchanged) | the existing family Wi-Fi – moved in step 6.6 |
What it does: the access point broadcasts every name and puts each device into the network of the name it joined.
Check: connect a phone to Home-Guest; it gets an address like 192.168.10.123 with the gateway 192.168.10.1. Then move all your own devices to Home-Admin – before step 6.6, otherwise you may cut yourself off.
6.5 Switch Ports
Do: first take a screenshot of the Ports page of the gateway and of the switch, so you know which port is the uplink and where the access point is. Then Devices → (gateway or switch) → Ports, select a port, set the Native VLAN / Network and Tagged VLAN Management:
| Port to … | Native VLAN | Tagged VLAN Management |
|---|---|---|
| the switch (uplink), the UniFi access point | Admin (default) | Allow All – trunk, carries the VLANs for all Wi-Fi names |
| the server | Servers | Block All |
| Home Assistant | IoT | Block All |
| the TV (also through a powerline adapter) | Multimedia | Block All |
| a second access point of another make (one Wi-Fi name), and all free ports | Family | Block All |
one spare port, hidden in the cabinet, labelled ADMIN | Admin | Block All |
What it does: whatever is plugged into a port ends up in the right network, without knowing anything about VLANs. A free port in the hall gives a stranger the family network, not the admin one. The spare ADMIN port is your way back in if a Wi-Fi setting ever goes wrong.
One warning from Ubiquiti's guide: on a port with a UniFi access point, the native VLAN must not be the same as a network that access point broadcasts (unless it's VLAN 1). Keeping access points on Admin with Allow All, as above, avoids that.
Check: after each change the device on that port gets an address from its new network – on Linux ip a, on Windows ipconfig, or in UniFi under Client Devices, column Network. A server with a fixed address needs that address changed at the same moment (or, simpler, a DHCP reservation – step 6.8).
6.6 Move the Family Wi-Fi
Do: edit the existing family Wi-Fi name and change its Network to Family. The name and password stay the same.
What it does: every family device reconnects within seconds and now gets an address from 192.168.30.x. Nobody has to type a new password.
Check: on a family phone, the Wi-Fi details show an address 192.168.30.x, and the Internet works.
6.7 Device Discovery Across Networks (mDNS)
Phones find TVs, printers and smart speakers with multicast DNS ("Bonjour", AirPlay, Chromecast). It works only inside one network – so after the split, the family phone no longer finds the TV. The gateway can pass these announcements between chosen networks (mDNS proxy), and on new networks it is on by default.
Do: in Settings → Networks, under Multicast DNS, leave it on only for the networks that need discovery: Admin, Family, IoT and Multimedia. Turn it off for Guests and Servers.
Check: after chapter 7 has allowed the traffic, a family phone can cast to the TV again.
6.8 Fixed Addresses for the Important Devices
Do: in Client Devices, open the server and set a Fixed IP of 192.168.40.20; Home Assistant gets 192.168.50.10.
What it does: the device keeps getting its address over DHCP, but always the same one. Firewall rules, DNS names and bookmarks can rely on it. (On the server this matches chapter 1.11.)
Check: after a restart of the device, Client Devices shows the fixed address.
The Order, Once More
- back up (6.2)
- create the networks (6.3)
- create the Wi-Fi names, move your own devices to the admin Wi-Fi (6.4)
- ports, with a screenshot first and a spare
ADMINport (6.5) - move the family Wi-Fi (6.6)
- the firewall that really separates the networks (chapter 7)
Important: until chapter 7, the networks are separate but not yet isolated – the gateway still routes between them. Don't stop here.
Summary
| What | State |
|---|---|
| Networks | Admin (default), Family 30, Guests 10, Servers 40, IoT 50, Multimedia 60; VPN 70 later |
| Addresses | 192.168.<VLAN>.0/24, gateway .1, DHCP .100–.250 |
| Wi-Fi | admin (WPA3), family (unchanged name), guests (isolated), IoT (2.4 GHz, WPA2) |
| Ports | trunks only to the switch and the UniFi access point; every other port one network, Block All; one spare admin port |
| Discovery | mDNS only where needed |
| Fixed addresses | server 192.168.40.20, Home Assistant 192.168.50.10 |
Next: Chapter 7 – Zone-based firewall: block everything, then allow only what's needed. The basics of networks, addresses and routers are in Computer Networks.