published: 9th of December 2022
Have you ever wanted to add multiple VLANs to your Ubiquiti WiFi network? Me too! I did this recently and in this blog I will explain the process to make it work when you have Juniper switches.
The following Hardware and Software was used in this post.
The target state configration is as follows.
The change manager has approved, let's go!!!
On the Unifi controller, there is a default network. I set this up some time ago and it might be called LAN. I have forgotten if that is the default name, or I changed it to that. You can tell it's the default network because it cannot be deleted. Furthermore, you cannot set a VLAN ID on the default network.
First, let's update the default network. Browse to:
The following table lists the AP Mangement networks configuration parameters.
Parameter | Value |
---|---|
Enable Network | On |
Network Name | AP-MANAGEMENT |
Advanced v | |
VLAN ID | <blank> |
DHCP Mode | None |
I am also disabling the default WiFi Network. Browse to:
Turn the Enable switch to off and click Apply Changes.
Now let's configure the IOT network. Browse to:
The following table lists the IOT networks configuration parameters.
Parameter | Value |
---|---|
Enable Network | On |
Network Name | INTERNET-OF-THINGS |
Advanced v | |
VLAN ID | 20 |
DHCP Mode | None |
Now configure the WiFi network, browse to:
The following table lists the IOT WLAN configuration parameters.
Parameter | Value |
---|---|
Enable Network | On |
Name | iot |
Password | <super-secret-password> |
Network | INTERNET-OF-THINGS |
Ok, now for the Juniper configs, first let's create the VLANS.
VLAN10 {
description AP-MANAGEMENT;
vlan-id 10;
}
VLAN20 {
description INTERNET-OF-THINGS;
vlan-id 20;
}
Now, for each interface connected to an AP, configure the following to make the interface a trunk port.
ge-0/0/10 {
description "to AP01";
unit 0 {
family ethernet-switching {
port-mode trunk;
vlan {
members VLAN20;
}
native-vlan-id 10;
}
}
}
The above config creates a trunk port and permits frames tagged with VLAN 20. Any untagged frames will be placed in VLAN 10, which we defined as the native VLAN.
Confirm that the VLANs can be seen on the trunk port. VLAN 10 should be untagged and VLAN 20 should be tagged.
show ethernet-switching interfaces ge-0/0/10
Interface State VLAN members Tag Tagging Blocking
ge-0/0/10.0 up VLAN10 10 untagged unblocked
VLAN20 20 tagged unblocked
Now, confirm that you are learning MAC addresses on each VLAN.
show ethernet-switching table interface ge-0/0/10
Ethernet-switching table: 26 unicast entries
VLAN MAC address Type Age Interfaces
VLAN10 0e:92:a0:69:ec:c7 Learn 0 ge-0/0/10.0
VLAN20 34:7e:5c:3e:6a:c8 Learn 0 ge-0/0/10.0
On the Unifi controller, Browse to Client Devices and confirm that the devices have an IP address in the correct subnet.
That's it! Adrian!!!! We did it!!!!
In this post, I showed you how to configure your Ubiquiti AP's and Juniper swithces to carry multiple VLANs for your WiFi networks. Thanks for tuning in ✌️