I'm trying to set up a separate VLAN for IOT devices.
I am using a WRT1900ACS (OpenWrt 19.07.6 r11278-8055e38794) as router and a Unifi 6 Lite (OpenWrt SNAPSHOT r15806-c68d527991) as the WLAN AP.
Note that I had this setup working on my Unifi AP-AC-LR but I bricked that unit trying to upgrade OpenWRT :S
Here is my switch layout on the router:
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3t 5t'
option vid '1'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.100'
option netmask '255.255.254.0'
config interface 'iot'
option ifname 'eth0.3'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
So tagging packets on port 1 of the ports on the router, and VLAN IDs 1 and 3 for normal traffic and IOT devices respectively.
When I set the AP up as follows, and plug the AP into one of the untagged ports on the router, the AP gets internet (but obviously the VLANs aren't functional):
###########
# WORKING #
###########
config interface 'lan'
option type 'bridge'
option ifname 'lan'
option proto 'dhcp'
However, when I try to enable the VLAN (as it was on the previous Unifi device), and plug the AP into the tagged port on the router, I lose connectivity with it.
###############
# NOT WORKING #
###############
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'dhcp'
config interface 'iot'
option ifname 'eth0.3'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.3.2'
option netmask '255.255.255.0'
Would appreciate some guidance here! My thoughts so far:
- dumb error in the config (sorry)
- VLAN isn't supported on Unifi 6 Lite (?)
- VLAN isn't supported / needs to be enabled on this OpenWRT snapshot.
Thanks for reading.