I apologize up front because I know this is a very rudimentary question but I have never done VLANs before and I have read everything I can on VLANs, DSA, Tagging, untagged, PVID, etc. and I’m just having a hard time getting the details right.
I have a router (no WiFi) running 25.12 and an access point (not openWRT) that supposedly can handle VLANs. My end goal is to have an isolated guest WiFi on the AP that can’t reach any LAN devices. The setup is as follows:
OpenWRT 25.12 router (plain OpenWRT other than added miniUPnP & attended sysupgrade)
ISP to WAN port (running IP4 & IPv6)
AP connected to LAN4 (regular WiFi and Guest WiFi)
Settings require a VLAN ID of 10 or higher to use VLANs? Not sure why
Unmanaged switch on LAN1
All devices connected to switch are end user devices (untagged traffic)
I have read the mini DSA guide and from what I can figure out I need to send untagged traffic to LAN1 and some tagged traffic to LAN4 but that is about all I am sure about. When I try to implement settings, I lose connectivity and have to reset the router. This is what I’ve tried so far:
Go to Network/interfaces/Devices/Bridge VLAN Filtering
Check “enable VLAN filtering”
Click “add” VLAN button
Set top row to VLAN ID 10, LAN1 set to untagged, LAN4 set to tagged
Save and apply.
At this point I can no longer communicate with the router so clearly something is not right. Can anyone get me pointed in the right direction?
Will that change of moving LAN to br-lan.10 put all LAN traffic on VLAN10?
Thank you.
EDIT: Do I need to have (2) VLANs? One for guest and one for all normal LAN devices? I thought I could just put guest wifi traffic on VLAN 10 and all other traffic not on that VLAN should work like a normal, basic setup but maybe that isn’t possible.
U* = any non-vlan aware device i.e. computer, printer, etc
T = any vlan aware device; managed switch, vlan aware AP, etc
LAN4 would have T for vlan10 and vlan20. For now, just use primary * for untagged.
Just br-lan10 for lan. Any guest wifi will be put into vlan20. Watch those youtube videos as they explain exactly how to set this up what you want to achieve.
Do not attempt vlans across/through your unmanaged switch. Everything U* = everything connected is vlan10. Start saving up for a managed switch.
Thank you. This got me really close. I am able to get VLAN 10 working mostly properly. Devices connected to VLAN 10 can access the router and internet properly but they cannot access my access point. So when it is up and running, I cannot get to my AP and do things like update settings or update firmware. Any guesses?
My guest wifi VLAN 20 doesn’t get any internet traffic through to devices. I created a “guest” firewall zone and assigned device br-lan.20 to it with accept, accept, accept to WAN but still couldn’t get internet. Not sure what I am missing with VLAN 20.
Thank you so much for the help. Nice to finally get some progress that doesn’t break anything.
Let’s take a look at the complete config so we can spot where the trouble might be.
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:
You do not actually have a network interface declared for your guest network (VLAN 20 is unused). That is a primary issue that needs to be resolved. Obviously you also do not have a DHCP server and firewall configuration for said network, either.
Ports lan3 and lan5 are also unused/undeclared, so these will be expected to be 'dead' ports.
Does your device have a lan1 port? If so, why is it missing from br-lan? Since that port (if it exists) is missing, it would also be non-functinoal.
You can follow the guest wifi guide, but instead of setting up wifi on this device, you'll use device br-lan.20 for the guest network.
Beyond the stuff above, the only specific error I see is here:
delete the device line -- it doesn't belong here in this firewall zone.
Your AP is not running OpenWrt, so it'll be harder to figure out what is wrong there. But, it should have an address on the same subnet as your main network (192.168.188.0/24). Make sure that all of the necessary information is entered into the config (or use DHCP) -- specifically you need the subnet mask/size, dns, and gateway address.
The AP actually does run OpenWRT but its a Cudy AP so it is their spin on OpenWRT.
I was able to restore access to the AP by setting VLAN 10 port lan4 to untagged instead of tagged. I guess the AP only puts VLAN tags on wifi data. Then I started having issues where wifi would disconnect after about 1-2 minutes and I would have to enter wifi password again to reconnect. I’m out of time this evening so reverted back to my old settings and will try again when I have the house to myself again.
If your specific device is supported, you may want to consider installing official OpenWrt.
This suggests that the AP was indeed expecting an untagged network.
I don't think that is the way this would work...
Nominally, an AP has just one network with an address. This is the one that is used to manage the device, but it can also be broadcast as a wifi network (for example, if you use your main trusted lan to manage your network devices). The tagged or untagged status of this VLAN simply needs to match that of the upstream (router or managed switch), although there is an opinion that trunk ports should carry only tagged networks. The key is that the two sides match.
AP
Do same br-lan.10 filtering on lan, follow dumb AP guide with br-lan.10, tagged trunk to tagged trunk on gateway will now work
Vlan20 unmanaged
Attach vlan20 to whatever guest wifi networks you create.
Attach vlan10 to whatever main wifi networks you create.
Gateway
vlan20 static e.g. 192.168.20.1/24 with dhcp turned on
do firewall zone edits as shown in youtube video for guest
Watch those youtube videos because all of this is all explained in detail in step by step instructions.
I think you are right but it is odd that VLAN 10 Wifi data and VLAN 20 wifi data was working properly but I could not get data to the AP itself.
I wanted to try and get this project done w/out putting OpenWRT on the AP. I felt this would make it easier for me to understand how to implement this for other people/family. I have put mostly everyone (that I help with their network) on an OpenWRT router but I have a few people with just retail APs that can’t run OpenWRT. But alas, it seems it will just be much easier to put OpenWRT on the AP and move on.
I’m not exactly sure but I had configured the OpenWRT router to set the AP LAN mac to have a static IP on the VLAN 10 network (192.168.88.x). I had this setup done before I ever started trying to deal with VLANs. With VLANs enabled, the AP indicated it had no internet access even though VLAN 10 & 20 Wifi both had internet access.
Can you connect to the WiFi with your device and do an arp-scan -l? See if the AP responds with an address, and verify if the device can only see other devices in the same VLAN. You can also install arp-scan on your OpenWRT router and do a scan from there if you prefer. Something like arp-scan -I br-lan.10 -l from the router to scan the tagged VLAN 10 subnet.
Can you confirm if the firewall settings on your router are correct? The guest subnet should be its own zone, and Input should be set to reject or drop if you're using the web interface. Posting configs would be helpful.