Creating Virtual Networks (VLANs)

UniFi makes it easy to create and implement virtual networks (VLANs).

If you are looking to troubleshoot your VLAN, visit this article.

Creating a VLAN

UniFi Gateway or Cloud Gateway

Third-Party Gateway

  1. Navigate to Settings > Networks to create a new virtual network.
  2. Name the network.
  3. Advanced users can optionally configure their preferred VLAN ID, subnet range, DNS, DHCP server, and DHCP options.
  4. By default, UniFi Gateways allow communication between different VLANs. See Traffic Rules to learn about implementing restrictions.

Although a UniFi Gateway or UniFi Cloud Gateway is recommended for the most integrated experience, it is possible to bridge networks/VLANs from a third-party gateway so that they can be assigned to UniFi Access Points (APs) and switch ports.

  1. Configure your network’s subnet, VLAN ID, DNS, and DHCP server on your third-party gateway.
  2. In UniFi, navigate to Settings > Networks to create a new virtual network.
  3. Although not required, we recommend giving it the same name used in your third-party gateway, for consistency.
  4. Enter the same VLAN ID that is configured on your third-party gateway.
  5. By default, most third-party gateways block routing between separate VLANs. Make any desired changes on the gateway, not within UniFi.

Applying a VLAN to a WiFi Instance

Client devices that join a particular WiFi will be assigned to the corresponding VLAN associated with that WiFi instance. To configure this VLAN:

  1. Navigate to Settings > WiFi to create a new WiFi.
  2. When creating or modifying a WiFi, click the Network dropdown.
  3. Select the desired network. 
  4. Ensure all ports between your AP and gateway are configured to allow the specified network’s VLAN ID (see below). Failure to do so will result in clients being unable to join the WiFi.
    1. UniFi Switches enable all traffic by default, but any third-party switch will need to be manually configured. See VLAN Connectivity to learn more.

Applying a VLAN to a Switch Port

Native VLAN

The Native VLAN is the VLAN assigned to "untagged" traffic passing through a switch port. Devices physically connected to a switch port will be placed on this Native VLAN.

Tagged Networks and Trunk Ports

Ports can be configured to allow traffic from other networks. Allowing specific networks/VLANs is referred to as “tagging” them on the switch port. You can see all ports’ VLAN tags in the VLAN Viewer, found in the Ports tab.

Ports that have been tagged to allow traffic from multiple VLANs are referred to as “trunk” ports. By default, all ports on UniFi Switches are trunked to allow all VLANs. 

Configuring UniFi Switch Ports

To configure the VLANs associated with a switch port:

  1. Navigate to the Ports tab.
  2. Select the desired port.
  3. Set a Native VLAN, if desired.
    Note: If an AP is connected to a switch port, the Native VLAN should never be the same as the network being broadcast by that AP (except when VLAN 1 is used). This will break connectivity and clients will not be able to join.
  4. By default, UniFi Switches tag all VLANs. To modify this, enable Tagged VLAN Management. The port will be tagged with all “Allowed” networks, or all networks that are not explicitly “Blocked.”
  5. If you set any restrictions, ensure that they will not break connectivity for devices elsewhere. See here to learn more.
  6. Apply the changes.

Your UniFi Device’s Management Network

The Management Network is the network that your UniFi device uses to communicate with your Network Application (i.e., to download an update). By default, a UniFi device’s Management Network will be assigned according to the Native VLAN configured on the switch port it is connected to. To change a device's Management Network, follow these steps:

  1. Determine what network (VLAN) you would like to assign as the device's Management Network.
  2. Ensure that the desired VLAN is tagged (see above) on all relevant switch ports between the UniFi device and your network’s gateway. 
    1. Note: Do not assign this VLAN as the Native VLAN for the switch port the UniFi device is directly connected to. This will break connectivity.
  3. Navigate to the UniFi Devices tab and select the target UniFi device.
  4. Enable Network Override in its settings.
  5. Select the desired network/VLAN.
  6. Apply the changes.
  7. Confirm that the changes take effect. 
    1. If your device went "Offline," then you likely made a mistake during step (2). See here to learn more.
Was this article helpful?
390 out of 784 found this helpful