DHCP Not Assigning IP for WiFi on VLAN 40 - RouterOS 7.16.2 on MikroTik hAP ax3

Hello,
I’m using a MikroTik hAP ax3 running RouterOS version 7.16.2. I’m attempting to configure VLAN 40 to include Ethernet ports (ether3, ether4) and a WiFi network. The Ethernet ports work as expected, and devices connected to them receive IP addresses via DHCP. However, devices connecting to the WiFi network on the same VLAN do not receive IP addresses.

Here is my configuration:

  1. VLAN 40 with ether3 and ether4 - Works Fine
    Devices connected to ether3 and ether4 correctly receive IP addresses.
/interface bridge add name=bridge_vlan40
/interface/bridge/port/set bridge=bridge_vlan40 [find interface=ether3]
/interface/bridge/port/set bridge=bridge_vlan40 [find interface=ether4]
/interface vlan add name=vlan40 vlan-id=40 interface=bridge_vlan40
/ip address add address=192.168.40.1/24 interface=bridge_vlan40
/ip pool add name=vlan40_pool ranges=192.168.40.10-192.168.40.254
/ip dhcp-server add name=vlan40_dhcp address-pool=vlan40_pool interface=bridge_vlan40
/ip dhcp-server network add address=192.168.40.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=192.168.40.1
/ip firewall nat add chain=srcnat action=masquerade out-interface=ether1 src-address=192.168.40.0/24
  1. WiFi Configuration for VLAN 40
    I configured a WiFi network for VLAN 40 and added it to the same bridge:
/interface/wifi add name=wifi_vlan40 mtu=1500 l2mtu=1560 master-interface=wifi1 security.authentication-types=wpa2-psk,wpa3-psk security.passphrase="XXXX" datapath.vlan-id=40 configuration.ssid="XXXX" disabled=no
/interface/bridge/port/add bridge=bridge_vlan40 interface=wifi_vlan40
  1. Problem
    While the Ethernet configuration works fine, devices connecting to the WiFi network (wifi_vlan40) do not receive an IP address from the VLAN 40 DHCP server (vlan40_dhcp).

  2. Reference
    For comparison, here is the configuration for VLAN 10 (different WiFi network), which works perfectly:

/interface/wifi add name=wifi_vlan10 mtu=1500 l2mtu=1560 master-interface=wifi1 security.authentication-types=wpa2-psk,wpa3-psk security.passphrase="XXX" datapath.vlan-id=10 configuration.ssid="XXX" configuration.mode=ap disabled=no
/interface vlan add name=vlan10 vlan-id=10 interface=wifi_vlan10
/ip address add address=192.168.10.1/24 interface=vlan10
/ip pool add name=vlan10 ranges=192.168.10.10-192.168.10.254
/ip dhcp-server add address-pool=vlan10 interface=vlan10 name=vlan10
/ip dhcp-server network add address=192.168.10.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=192.168.10.1
/ip firewall nat add chain=srcnat action=masquerade out-interface=ether1 src-address=192.168.10.0/24

I would appreciate any guidance on what might be missing or misconfigured in my setup for VLAN 40.
Thank you!

It’s complex thing, you must post whole config. From snippets you posted it looks like you have multiple bridges and who know what else.

Do not rearrange rows, it’s harder to read this way…