Out of the box configuration as a router where ether1 is the uplink with DCHP address and ether2-5 & wi-fi ports form a switch on the bridge with a dhcp server in 192.168.81.x
Virtual guest Wi-Fi added as a slave of the master 2G Wi-Fi interface
Second guest bridge added with IP 10.10.10.1/24, guest dhcp-server added in same subnet and guest Wi-Fi port added to guest bridge
This works fine - devices connecting to the guest network are on their own network (10.10.10.x) and routing to the internet is okay.
But in this particular instance, the hAP lite is not running as a router with firewall and NAT. Instead it’s configured as an access point with switched ports. To achieve this, this is the basic config I do:
System/Reset Configuration: Reset router with no default configuration
Add new bridge and add port for each ethernet & wireless interface
Configure Wi-Fi as required
So there is no firewall or DHCP server. It’s a switch with Wi-Fi access point. DHCP is handled by an upstream server elsewhere.
If I go through the same process of adding a second bridge with virtual Wi-Fi guest network, own subnet and DHCP server as described above, devices can connect to the guest network but it reports “No internet”, i.e. it’s not able to route to the internet.
This is beyond my understanding of networking. I suspect it’s something to do with routing…
You first need to decide what should handle guest network:
a) Upstream router. In that case just set vlan-mode=use-tag vlan-id= for virtual AP interface, add it to common bridge, and it’s all you need to do on this router. The rest will be handled by upstream router, which will need interface to access VLAN , add DHCP server to it, handle routing and everything.
b) This router. If guests should have only one virtual AP, bridge is not needed and you can work with virtual wifi interface directly. But if you keep the bridge, it’s ok too. Config seems ok, but you need correct routing. Either upstream router must have route to 10.10.10.0/24, where gateway is this router (whatever IP address it gets from DHCP on ether1). Or you need to hide this subnet using srcnat/masquerade. You’ll also need to configure firewall to prevent guest from accessing private network.
I like a), because it allows to keep AP as simple transparent device. But it depends on upstream router, if it can be configured for it.
Thanks Sob - very useful. Your first comment rings true as whilst my detailed knowledge of all things routing and switching is certainly full of holes, I get the general idea and as a programmer, I can just about grasp how it all works. So yes, it dawned on me too that the upstream router has no idea what to do with the 10.10.10.x packets. At the moment, the upstream router is a ISP supplied device which probably can’t handle this requirement. However, we’re about to replace it with a RouterOS device so option (a) will become available.
But (b) is also an option as there is only one AP. I knew it would be something to do with routing and yes, I get what you’re saying about srcnat/masquerade. Need routing functionality between the guest network 10.10.10.0 and the internet.
The phrase “all the gear, no idea” is very true here but I’ll get there