I’m trying to assign device to particular VLAN just by it’s MAC address on hAP ac3 using
/interface ethernet switch host
add mac-address=00:1C:2B:51:CD:2B ports=ether4 share-vlan-learned=yes switch=switch1 vlan-id=30
However it doesn’t seem to work and still gets assigned IP from the default dhcp address pool. This device is connected directly by cable into the main router. Devices connected through wifi are getting correct addresses, and are assigned the VLANs correctly, so I guess I’m missing something obvious here.
Here is my relevant config. AP setup is done through capsman and the main router is just a client of it
/interface bridge
add admin-mac=DC:2C:1A:EB:DF:E1 auto-mac=no comment=defconf fast-forward=no name=bridge
/interface vlan
add interface=bridge name=guest_network vlan-id=50
add interface=bridge name=iot_network vlan-id=30
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=VPN
add include=LAN,VPN name=LAN+VPN
add name=GUEST_NETWORK
add name=IOT_NETWORK
add include=LAN,GUEST_NETWORK,IOT_NETWORK name=INTERNET_ACCESS
/ip pool
add name=dhcp ranges=192.168.0.50-192.168.0.254
add name=dhcp_guest_network ranges=10.33.33.50-10.33.33.254
add name=iot_pool ranges=192.168.3.50-192.168.3.254
/ip dhcp-server
add address-pool=dhcp interface=bridge lease-time=10m name=defconf
add address-pool=dhcp_guest_network interface=guest_network lease-time=10m name=guest_network_dhcp
add address-pool=iot_pool interface=iot_network lease-time=10m name=dhcp_iot
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=none
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface ethernet switch host
add mac-address=00:1C:2B:51:CD:2B ports=ether4 share-vlan-learned=yes switch=switch1 vlan-id=30
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=guest_network list=GUEST_NETWORK
add interface=iot_network list=IOT_NETWORK
/interface wireless cap
#
set bridge=bridge discovery-interfaces=ether2 enabled=yes interfaces=wlan1,wlan2
/ip address
add address=192.168.0.1/24 comment=defconf interface=bridge network=192.168.0.0
add address=10.33.33.1/24 comment=GuestIPs interface=guest_network network=10.33.33.0
add address=192.168.3.1/24 comment=IOT interface=iot_network network=192.168.3.0
/ip dhcp-client
add comment=defconf interface=ether1 use-peer-dns=no
/ip dhcp-server network
add address=10.33.33.0/24 comment=guest_network dns-server=1.1.1.1,1.0.0.1 gateway=10.33.33.1
add address=192.168.0.0/24 comment=defconf dns-server=192.168.0.1 gateway=192.168.0.1
add address=192.168.3.0/24 comment=iot dns-server=1.1.1.1,1.0.0.1 gateway=192.168.3.1
/routing bfd configuration
add disabled=no
capsman config
/caps-man configuration
add datapath.bridge=bridge installation=indoor mode=ap name=HomeNetwork security=home_lan_security ssid=XXXXXX
add datapath.bridge=bridge .client-to-client-forwarding=no .local-forwarding=no .vlan-id=50 .vlan-mode=use-tag installation=indoor mode=ap name=GuestNetwork security=guest_lan_security ssid=XXXXXXX
add datapath.bridge=bridge .client-to-client-forwarding=no .local-forwarding=no .vlan-id=30 .vlan-mode=use-tag installation=indoor mode=ap name=IoTNetwork security=iot_lan_security ssid=XXXXXXXX
Any help would be appreciated. I guess my setup is missing some basics.