Migration support included in the MSP plan.

Using VLANs with UniFi

Published onApril 29, 2024

Virtual Local Area Networks (VLANs), are a network segmentation tool that help improve the efficiency and security of a network. It allows network admins to separate network traffic, enhance security, and optimize the performance (in the UniFi network).

In this article, I'll touch upon how to use VLANs with UniFi, some benefits and providing a guide on setting them up.

Let's do it!

Table of Contents

Understanding VLANs

VLANs isolates network traffic at the data link layer (OSI layer 2). It basically is a subgroup of a network. It works by tagging network traffic, which can then be segregated according to rules defined for each VLAN. This separation enhances security and performance by reducing broadcast traffic, segmenting network components, and applying policies on a per-VLAN basis. (Pretty cool!)

Benefits of using VLANs with UniFi

  1. Improved security: VLANs isolate sensitive data and devices within their segment, protecting them from access by unauthorized users or compromised devices in other parts of the network.
  2. Traffic management: VLANs reduce the size of broadcast domains, decreasing unnecessary network traffic and improving overall network performance.
  3. Improved organization: VLANs allow network resources and services to be organized logically by function, department, or usage type, rather than by physical location or equipment.
  4. Scalability: VLANs make it easier to scale the network without additional hardware, as you can add new virtual networks by configuration instead of physical setup (looking at you MSPs).

How to Set Up VLANs with UniFi

Setting up VLANs in a UniFi environment involves several steps. Here we go:

Step 1: Plan your network segmentation

Before diving into configurations, plan how to segment your network. Decide which devices or services need to be isolated into different VLANs based on security requirements, traffic type, or organizational needs. Common VLANs include:

  • Management VLAN: For administrative access to network devices.
  • User VLAN: For regular user devices.
  • Guest VLAN: For guest access, isolated from internal resources.
  • IoT VLAN: For smart devices, often with stricter access controls.

Step 2: Configure VLANs in UniFi Controller

Once you have planned your VLANs, use the UniFi Controller software to configure them:

  1. Access the UniFi Controller: Open the UniFi Controller and go to the Settings.
  2. Create Networks for Each VLAN:
    • Navigate to Networks and click Create New Network.
    • Name your VLAN (e.g., "Guest VLAN") and specify the VLAN ID (make sure this matches your network design).
    • Configure the subnet and gateway settings for each VLAN.
    • Set up DHCP settings if the UniFi Security Gateway (USG) or UDM is handling DHCP for the VLAN.

Step 3: Assign VLANs to ports on UniFi switches

To use VLANs effectively, assign them to specific ports on your UniFi switches:

  1. Open UniFi Controller and go to Devices.
  2. Select a switch and go to the Ports configuration.
  3. Configure Each Port:
    • Set the Switch Port Profile to the appropriate VLAN or leave it as All if the port needs to carry multiple VLANs (trunk).
    • For ports connecting to end devices (not switches), set the port to use the specific VLAN Only.

Step 4: Implement wireless networks for VLANs

To extend VLANs over Wi-Fi, create separate SSIDs for each VLAN:

  1. Navigate to Wi-Fi and create a new wireless network for each VLAN.
  2. Assign the corresponding VLAN under the Advanced Options of each SSID.

Step 5: Test and monitor VLAN configuration

Test connectivity and functionality if you have configured VLAN correctly. You need to make sure each VLAN is correctly isolated and devices are communicating as expected. Monitor network traffic using the UniFi Controller's built-in tools to ensure traffic is flowing correctly and performance benchmarks are met.

Final thoughts

Using VLANs with UniFi devices can improve the security, efficiency, and manageability of your network. By following these steps, network admins can segment networks in a manner that aligns with your organization.

If you want to benefits of VLAN, but without the hassle of setting it up, consider a managed service like UniHosted. Especially, if you are an MSP or IT-service business looking for efficient, secure and scalable network deployments, this is something for you.

Feel free to give us a spin! Additionally, I'm happy to walk you through personally. You can schedule a call with me (Founder of UniHosted) here.

We host UniFi Controllers in the Cloud

Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.

Deploy Now

Free tier available

Get the best support

Join 1276+ customers

No credit card required