physical ifaces working ok but unable to attach a wlan to a single vlan
Code: Select all
# vlans
/interface bridge
add name=bridge-vlan
/interface bridge port
add bridge=bridge-vlan interface=ether2 hw=yes # trunk
add bridge=bridge-vlan interface=ether3 hw=yes # access
add bridge=bridge-vlan interface=ether4 hw=yes # access
/interface ethernet switch vlan
add independent-learning=yes ports=ether2,ether3,ether4,switch1-cpu switch=switch1 vlan-id=10
add independent-learning=yes ports=ether2,switch1-cpu switch=switch1 vlan-id=20
# ?why do I need to put "switch1-cpu" on every entry?
/interface ethernet switch port
set ether2 vlan-mode=secure vlan-header=add-if-missing
set ether3 vlan-mode=secure vlan-header=always-strip default-vlan-id=10
set ether4 vlan-mode=secure vlan-header=always-strip default-vlan-id=10
/interface vlan
add name=vlan10 vlan-id=10 interface=bridge-vlan
add name=vlan20 vlan-id=20 interface=bridge-vlan
/ip address
add address=10.10.10.1/24 interface=vlan10
add address=10.10.20.1/24 interface=vlan20
# dhcp
/ip pool
add name=vlan10-pool ranges=10.10.10.200-10.10.10.254
add name=vlan20-pool ranges=10.10.20.200-10.10.20.254
/ip dhcp-server
add address-pool=vlan10-pool disabled=no interface=vlan10 name=dhcpd-vlan10
add address-pool=vlan20-pool disabled=no interface=vlan20 name=dhcpd-vlan20
/ip dhcp-server network
add address=10.10.10.0/24 dns-server=8.8.8.8,8.8.4.4 \
gateway=10.10.10.1 netmask=24 ntp-server=10.10.10.1
add address=10.10.20.0/24 dns-server=8.8.8.8,8.8.4.4 \
gateway=10.10.20.1 ntp-server=10.10.20.1
# wireless
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk mode=dynamic-keys \
supplicant-identity=MikroTik wpa2-pre-shared-key=$uperpassw0rd
/interface wireless
set [ find default-name=wlan1 ] name=wlan-2Ghz ssid=wlan-2Ghz frequency=auto mode=ap-bridge disabled=no
set [ find default-name=wlan2 ] name=wlan-5Ghz ssid=wlan-5Ghz frequency=auto mode=ap-bridge disabled=no
# ?do I need the option "vlan-mode=use-tag" on the previous (tried but changing nothing)?
# what from here? ----------------------------------------
/interface bridge port
add bridge=bridge-vlan interface=wlan-2Ghz hw=yes
add bridge=bridge-vlan interface=wlan-5Ghz hw=yes
# wireless interfaces goes up (and stayed on connecting)
# ? how can I associate the wlans to vlan10 ?
# ? how to attach "dhcpd-vlan10" to the wlans ?