Dumb AP cannot get IP addresses (DHCP Issue)

I'm new to OpenWRT and I have 1 GL iNet Flint 2 as my main router and a TP Link Omada EAP 245 as a dumb AP, both running openwrt 23. I've set up 2 networks (main and IOT) using VLANs on the main router and it seems to be working fine on the main router, but I'm having issues trying to set up a dumb AP.

I've set up the VLANs on both devices and set up the same WIFI SSIDs on both devices, but whenever I connect to the AP BSSID I cannot get an IP address (if I manually set an IP address I can connect so I suspect I have configured something wrong so that it can't get IP addresses from the main router's DHCP server).

The AP is connected on port 3 to the main router via an ethernet cable.

What am I doing wrong?

Main Router

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdde:0fa0:08d9::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'lan5'

config device
        option name 'lan1'
        option macaddr

config device
        option name 'lan2'
        option macaddr

config device
        option name 'lan3'
        option macaddr

config device
        option name 'lan4'
        option macaddr

config device
        option name 'lan5'
        option macaddr

config interface 'lan'
        option device 'br-lan.100'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'eth1'
        option macaddr

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth1'
        option proto 'dhcpv6'

config bridge-vlan
        option device 'br-lan'
        option vlan '100'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:t'
        list ports 'lan4:u*'
        list ports 'lan5:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '3'
        list ports 'lan3:t'

config interface 'IOT'
        option proto 'static'
        option device 'br-lan.3'
        option ipaddr '10.0.0.1'
        option netmask '255.255.255.0'
root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/18000000.wifi'
        option channel '11'
        option band '2g'
        option htmode 'HE20'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'CZNet'
        option encryption 'sae-mixed'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/18000000.wifi+1'
        option channel '36'
        option band '5g'
        option htmode 'HE80'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'CZNet'
        option encryption 'sae-mixed'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'ap'
        option ssid 'CZNet-IOT'
        option encryption 'sae-mixed'
        option network 'IOT'

AP

root@tplinkeap:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd6f:ec51:59c7::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'eth0.100'
        option proto 'static'
        option ipaddr '192.168.1.5'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '192.168.1.1'
        list dns '192.168.1.1'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 2 5'
        option vid '1'
        option description 'LAN'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 2t'
        option vid '3'
        option description 'IOT'

config interface 'IOT'
        option proto 'none'
        option device 'eth0.3'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option ports '0t 2t 5t'
        option vid '100'
root@tplinkeap:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:00.0'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'CZNet'
        option encryption 'sae-mixed'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option channel '11'
        option band '2g'
        option htmode 'HT20'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'CZNet'
        option encryption 'sae-mixed'

config wifi-iface 'wifinet2'
        option device 'radio1'
        option mode 'ap'
        option ssid 'CZNet-IOT'
        option encryption 'psk2'
        option network 'IOT'

Te vlan ids on the wire do not match

Have you verified that both networks are functioning properly on the main router? (easy to do via wifi)

On the AP, you need to make bridges for the two VLANs like this:

edit the existing br-lan to use eth0.100:

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.100'

And create an iot bridge:

config device
        option name 'br-iot'
        option type 'bridge'
        list ports 'eth0.3'

Now edit the networks to use to use br-lan and br-iot respectively:

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.5'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '192.168.1.1'
        list dns '192.168.1.1'

config interface 'IOT'
        option proto 'none'
        option device 'br-iot'

Then restart and try again. If that doesn't work...

for the ports, add 5t to it:

        option ports '0t 2t 5t'

Actually, they do -- the OP is using VLAN 100 (lan) and 3 (iot) which is consistent on the AP and the router.

I think this was it, been banging my head on this for days!! I created the bridge interfaces and now I can connect to the AP wifis and get IPs. Thanks for your help!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.