Switch wifi access point unable to get IP address from client

Model TP-Link Archer C7 v5
Architecture Qualcomm Atheros QCA956X ver 1 rev 0
Target Platform ath79/generic
Firmware Version OpenWrt 24.10.2 r28739-d9340319c6 / LuCI openwrt-24.10 branch 25.168.50434~d6b13f6
Kernel Version 6.6.93

I have a main router which is set up to provide DHCP, DNS and firewall services. Another router is set up as a managed switch with WIFI access point. There are three VLANs of 99 (main), 5 (guest) and 10 (IOT) on both routers. The switch is connected to a trunk VLAN port on the main router. The switch AP has a WIFI network corresponding to each VLAN. All DHCP, DNS and firewall services on the switch are disabled. The switch also has two IOT access ports. When I plug my computer into an IOT port, it works flawlessly. The main WIFI network also works as expected. I setup the IOT network exactly the same as the main network. But when a WIFI client connects to the IOT or guest network, an error message of “unable to get an IP address” will be issued. The lan interface is a dhcp client so that I can manage the switch.

Here is the contents of network configuration:

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 'fdc6:8e17:5441::/48'
        option packet_steering '1'

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

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'

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 1'
        option vid '99'
        option description 'lan'

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

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option ports '0t 3 4 5 1t'
        option vid '10'
        option description 'iot'

config interface 'guest'
        option proto 'none'
        option device 'eth0.5'
        option type 'bridge'

config interface 'iot'
        option proto 'none'
        option device 'br-iot'
        option type 'bridge'

config device
        option type 'bridge'
        option name 'br-iot'
        option bridge_empty '1'
        list ports 'eth0.10'

Unlike the IOT, the guess interface is configured to the guest VLAN directly without a bridge to show that the both methods do not work.

And wireless

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

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt-5g'
        option encryption 'sae-mixed'
        option key 'testkey123'
        option ocv '0'

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

config wifi-iface 'wifinet3'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrtIOT'
        option encryption 'sae-mixed'
        option network 'iot'
        option key 'testkey123'
        option ocv '0'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrtGuest'
        option encryption 'sae-mixed'
        option key 'testkey123'
        option ocv '0'
        option network 'guest'

And switch VLAN screenshot:

The WAN port is used to connect to the router.

It seems although the iot and lan are configured exactly the same except that the lan is assumed if untagged on the trunk, yet the lan has a bridge for both VLAN and WIFI, whereas iot bridge has the WIFI only. Here is the info:

brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.6032b1b70657       no              eth0.99
                                                        phy0-ap0
br-iot          7fff.6232b1b70656       no              phy0-ap1

Trying to add the VLAN to the iot bridge will result in an error message:

brctl addif eth0.10 br-iot
brctl: bridge eth0.10: No such device

And the device is there in the device screen:

Though I don’t know why the MAC address and MTU are not shown here.

I watched all the videos I can find. Yet none of them apply to my case as the menus were different because of version differences.

I am pretty new to OpenWrt. Can someone point out what is wrong in the configuration or pointing me to the right direction?

Remove the bridge lines in each of the interfaces.

Then restart and test again.

Thank you for the prompt response. Once I remove these two interfaces, there is only the lan interface left. The OpenWrtIOT/Guest wifi will have no network to select other than lan. But I don’t want IOT/guest wifi to access my lan network.

I said to remove the bridge line, not the entire interface.

1 Like

It works. Thank you so much.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

I marked the topic as Solved.

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