I have a working example for your critique showing a LAN with guest Wifi access. The Wifi AP allows standard Wifi and VLAN Wifi guests to access the internet, but not each other. It works the way I like, but I wanted to get your thoughts about the correctness of this.
Notes:
- The RB4011’s ether10 is PoE powering the hAP AC via it’s ether1.
- The RB4011 is acting like a router/switch combo. So, it has an IP of 192.168.0.1 on it’s Bridge-LAN and other standard settings (DHCP for LAN, etc.)
- The hAP AC is only a AP for corporate and guest Wifi access.
Questions:
- The RB4011 router does not have hardware switching when enabling Bridge VLAN Filtering! Is there still a way to hardware switch ports 2-9 via a special setting? Use Two bridges?
- The hAP AC is not using Bridge VLAN Filtering, only vlan-mode, yet it correctly sends untagged and VLAN ID 20 packets into the router. Is this correct or should I turn on Bridge VLAN Filtering on the AP and make ether1 a Hybrid port (which it naturally is somehow right now).
The Configuration (brevity, showing important facts only):
# RouterOS 6.43
# Router with Guest AP VLAN example
# https://forum.mikrotik.com/viewtopic.php?t=141279
# https://forum.mikrotik.com/viewtopic.php?t=143524
# https://wiki.mikrotik.com/wiki/Manual:Interface/VLAN
# https://wiki.mikrotik.com/wiki/Manual:Interface/Bridge#Bridge_VLAN_Filtering
# https://wiki.mikrotik.com/wiki/Manual:Bridge_VLAN_Table
#
# Configure the Router hardware
#
# Create one bridge to manage all VLANs and ports.
/interface bridge
add name=bridge_LAN protocol-mode=none vlan-filtering=no
# Setup ingress. Configure ether10 as a Trunk port (pvid set to default of 1) which will allow
# untagged LAN as well as tagged traffic coming from an AP. A reminder about pvid: traffic
# without a VLAN tag will be tagged with the pvid value at ingress. At egress, traffic
# matching pvid will get untagged. A pvid value other than 1 defaults to an Access port.
/interface bridge port
add bridge=bridge_LAN interface=ether2
# add for ether3, ether4, etc.
add bridge=bridge_LAN interface=ether10 pvid=1
# Setup egress. Configure ether10 as a Trunk port (tagged with a "vlan-ids" set). Port
# will send back packets with the same vlan tag they came in on. Setting "untagged"
# would remove the vlan tag if pvid matched.
/interface bridge vlan
add bridge=bridge_LAN tagged=bridge_LAN,ether10 vlan-ids=20
# Create a VLAN interface to interact with the VLAN ID (Layer 3)
/interface vlan add interface=bridge_LAN name=vLAN20 vlan-id=20
# Assign IP Address to VLAN interface
/ip address add interface=vLAN20 address=10.0.0.1/24
# Setup DHCP on VLAN interface
/ip pool add name=pool_vLAN20 ranges=10.0.0.2-10.0.0.254
/ip dhcp-server add address-pool=pool_vLAN20 interface=vLAN20 name=dhcp_vLAN20 disabled=no
/ip dhcp-server network add address=10.0.0.0/24 dns-server=9.9.9.9 domain=guest.lan gateway=10.0.0.1
# Allow VLAN Internet access
/ip firewall filter
add chain=forward action=accept connection-state=new in-interface=vLAN20 out-interface=ether1 comment="Allow VLAN"
# Enable VLAN
/interface bridge set bridge_LAN vlan-filtering=yes
#
# Configure the WiFi AP hardware
#
# Create a bridge to manage all ports.
/interface bridge
add name=bridge_LAN protocol-mode=none vlan-filtering=no
# add necessary ports to bridge
/interface bridge port
add bridge=bridge_LAN interface=ether1
add bridge=bridge_LAN interface=ether2
add bridge=bridge_LAN interface=ether3
add bridge=bridge_LAN interface=ether4
add bridge=bridge_LAN interface=ether5
add bridge=bridge_LAN interface=wlan2
add bridge=bridge_LAN interface=wlan1
# Assign IP Address to the bridge
/ip address add interface=bridge_LAN address=192.168.0.10/24
/ip route add distance=1 gateway=192.168.0.1
# Turn on VLAN mode on the desired wlan interface
/interface wireless
set [ find default-name=wlan1 ] ssid=Public vlan-id=20 vlan-mode=use-tag
set [ find default-name=wlan2 ] ssid=Private