Looking for some pointers on how to setup my openwrt router to work with my Wifi that has VLAN tagging. I’m a but confused/lost about the terminology and where I should be managing the settings. Or what I should be searching for a guide on how to setup.
I’m looking to create a couple of networks, 1. Trusted, 2. IoT, 3. Guests. And then I can use firewalls to control what clients can do and who they can talk to on the network.
I’ve got a couple of Unifi APs that are able to run multiple Wifi SSIDs and add VLAN tags to each.
I have a BT HH5a running LuCI openwrt-21.02 branch (git-21.295.67054-13df80d)] / OpenWrt 21.02.1 r16325-88151b8303
The router acts as the main gateway / firewall / DHCP for my network.
The router has an ADSL2+ modem which provides the WAN connection. I’ve connected one of the Unifi APs to a switch port via cable. The other AP is on the other side of the property and communicates via Wifi/Mesh.
I prefer to use LUCI over SSH, but happy with both. Here's a copy of my network config.
So if I have a Wi-Fi AP that is tagged with VLAN 20, how should I setup the config so that it’s assisgns those devices with in the 192.168.20.0/24 range?
config device
option type 'bridge'
option name 'br-vlan20'
list ports 'eth0.20'
config interface 'vlan20'
option proto 'none'
option device 'br-vlan20'
On the back of my router, the Unifi AP is plugged into switch port 3.
There are 4x LAN switch ports on the BTHH5a, 1xWAN port and 1x Phone Cable / ADSL connector (this is where the internet WAN is coming in).
The BTHH5a router / gateway / firewall provides no Wifi SSIDs, so is /etc/config/wireless needed in this case? All the Wifi SSIDs are provided by the UniFi AP.
No, you'd only need to configure the WiFi on the HH5a if it was involved in providing any of the wireless networks. If the WifI is all being done by a UniFi AP then you just need to set up the network ports on the HH5a correctly.
So is this still correct? Considering the Wifi AP is connected to port 3 on the 5HHa router? And the Guest Wifi, for example, is tagged with VLAN 20?
/etc/config/network
config device
option type 'bridge'
option name 'br-vlan20'
list ports 'eth0.20'
config interface 'vlan20'
option proto 'none'
option device 'br-vlan20'
The OP is wanting to create some additional networks on their router (the HH5a), then create a VLAN trunk between the router and a UniFi AP so they can use the AP to allow wireless devices to connect to those networks.
@sentur Unfortunately I've moved all my HH5a devices to a more recent version of OpenWRT which uses a different method for VLAN tagging (it's called DSA) and it's been a long time since I've used the old style so I'm not 100% certain on the exact config changes you need to make.
The OP is wanting to create some additional networks on their router (the HH5a), then create a VLAN trunk between the router and a UniFi AP so they can use the AP to allow wireless devices to connect to those networks.
Even this is helpful, I'm unclear on what the terminology is e.g. brigding / trunking, etc to be able to start searching.
Because of the change to DSA you can't keep configuration when upgrading, so will have to set up from scratch. But unless you've made extensive changes it shouldn't be too bad.