cheat-sheets

UniFi Networks and VLANs

How networks, VLANs, switch port profiles, DHCP and multicast fit together in UniFi Network. For general VLAN design see VLANs. Menu names change between releases, so look for the setting by name if a path differs.

Documentation: Switch Port VLAN Assignment · Switch Settings · DHCP Options · Managing Broadcast Traffic

Concepts #

TERMMEANING
NetworkA subnet with a VLAN ID, gateway and DHCP settings
Native VLANThe untagged network for devices plugged into a port
Tagged VLANExtra VLANs carried on a port (trunk)
Port profileA saved bundle of native and tagged VLANs, at Settings, Profiles, Switch Ports
Port isolationStops a port talking to other ports on the same switch, even in the same VLAN

Tagged VLAN Management #

Per port:

MODEMEANING
Allow AllTrunk carrying every VLAN (the default)
Block AllAccess port, native network only
CustomPick which tagged VLANs pass

Use Block All on ports for end devices and Custom on uplinks to other switches, so unwanted VLANs do not travel everywhere. Changing the native network on an uplink can cut off the devices below it, so change it from the console on a wired connection.

A Typical Layout #

VLANUSE
Default or managementGateway, switches, access points, controller
TrustedComputers and phones
IoTSmart devices (UniFi WiFi for the SSID)
CamerasUniFi Protect devices
GuestInternet only
ServersHomelab hosts

Pair each VLAN with firewall rules, see UniFi Firewall and VPN. A VLAN on its own gives no isolation.

DHCP #

  • The DHCP server is on per network by default.
  • Predefined options include 43 (UniFi controller), 42 (NTP), 66 and 67 (network boot, see PXE Boot).
  • Set a DHCP range that leaves room for static addresses.
  • DHCP relay is available for networks served elsewhere. A community post says to leave the port field blank, which is unverified.
  • For fixed addresses use a fixed IP on the client in the UI, not a static address set on the device.

Multicast and Discovery #

SETTINGUSE
IGMP snoopingSends multicast only to ports with group members. Helps IPTV and busy switches
mDNSLets Bonjour and Chromecast discovery cross VLANs. Use a dedicated VLAN and relay only where needed
Client isolationStops WiFi clients talking to each other. Ubiquiti calls it a last resort

For Home Assistant and casting across VLANs, enable mDNS across just the networks involved rather than everywhere.

Management VLAN #

A non-default management VLAN reportedly needs a Network Override on the switch. This comes from an old community thread, so check it on your version before relying on it.

802.1X #

UniFi can use a RADIUS server for port-based access control. The setup steps were not verified here.

Jumbo Frames #

Typical MTU is 9216 and every device in the path must support it. See UniFi Routing and WAN.

Not Verified #

DHCP relay detail, management VLAN override, 802.1X setup, and exact menu paths in your release.

See Also #

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.