Trouble setting two SSIDs on 5GHz radio (Archer C7 v5, ath79)

I have just built a custom image from the snapshot of the dev branch for Archer C7 v5 (ath79). I am trying to configure each radio with two SSIDs (the two are same on both radios) to expose two logical wlans (one private, one for guests), on both 2.4 and 5 GHz bands.

While the setup runs fine on 2.4 GHz band (two interfaces are created and correctly set up), on 5 GHz band only one (the first) interface is created first then after 65 seconds the second interface is created too, but it is not assigned an IP address. So when a client associates (successfully) with the AP, it does not get an IP over DHCP, because the interface is not addressable.

I have tried to disable 2.4 GHz band radio and interfaces, but it does not seem to have an impact. Only the first 5GHz interface is created (once wifi is restarted) and then after 65 seconds the second one appears but with no IP address.

I have tried both creating the wireless interfaces with the the default names (i.e. wlan0, wlan0-1) or with custom names, it does not seem to have an effect on the issue.

I am running a different 192.168.x.0 subnet on each wireless interface with its own DHCP range.

I wonder if anyone would have any idea what might be wrong, or what can I check.

/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '52'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'VHT80'
	option country 'CZ'
	option country_ie 1

config wifi-iface
	option device 'radio0'
	option network 'wlan0n'
	option mode 'ap'
	option ssid '<private_SSID>'
	option encryption 'psk2'
	option hidden '1'
	option isolate '0'
	option key '<private_password>'

config wifi-iface
	option device 'radio0'
	option network 'wlan0pn'
	option mode 'ap'
	option ssid '<guest_SSID>'
	option encryption 'psk2'
	option hidden '1'
	option isolate '0'
	option key '<guest_password>'

config wifi-device 'radio1'
	option disabled 1
	option type 'mac80211'
	option channel '13'
	option hwmode '11g'
	option path 'platform/ahb/18100000.wmac'
	option htmode 'HT20'
	option country 'CZ'
	option country_ie 1

config wifi-iface
	option disabled 1
	option device 'radio1'
	option network 'wlan1n'
	option mode 'ap'
	option ssid '<private_SSID>'
	option encryption 'psk2'
	option hidden '1'
	option isolate '0'
	option key '<private_password>'

config wifi-iface
	option disabled 1
	option device 'radio1'
	option network 'wlan1pn'
	option mode 'ap'
	option ssid '<guest_SSID>'
	option encryption 'psk2'
	option hidden '1'
	option isolate '0'
	option key '<guest_password>'

/etc/config/network

config switch
	option name switch0
	option reset 1
	option enable_vlan 1

config switch_vlan
	option device switch0
	option vlan 1
	option ports '2 3 4 5 0t'

config switch_vlan
	option device switch0
	option vlan 2
	option ports '1 0t'

config interface        loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface        lan
        option ifname   eth0.1
        option type     bridge
        option proto    static
        option ipaddr   192.168.6.10
        option netmask  255.255.255.0

config interface        wlan0n
        option ifname   wlan0
        option proto    static
        option ipaddr   192.168.7.10
        option netmask  255.255.255.0

config interface        wlan0pn
        option ifname   wlan0-1
        option proto    static
        option ipaddr   192.168.8.10
        option netmask  255.255.255.0

config interface        wlan1n
        option ifname   wlan1
        option proto    static
        option ipaddr   192.168.17.10
        option netmask  255.255.255.0

config interface        wlan1pn
        option ifname   wlan1-1
        option proto    static
        option ipaddr   192.168.18.10
        option netmask  255.255.255.0

config interface        wan
        option ifname   eth0.2
        option proto    dhcp

config interface	wg0
	option proto	wireguard
	option private_key <...>
	option listen_port 55001
	list addresses 	192.168.110.1/24

config wireguard_wg0
	option public_key <...>
	option route_allowed_ips 1
	list allowed_ips 192.168.110.2/32
	list allowed_ips 192.168.4.0/24
	list allowed_ips 192.168.5.0/24
	option persistent_keepalive 25

config interface	wg1
	option proto	wireguard
	option private_key <...>
	option listen_port 55002
	list addresses 	192.168.111.1/24

config wireguard_wg1
	option public_key <...>
	option route_allowed_ips 1
	list allowed_ips 192.168.111.2/32
	list allowed_ips 192.168.20.0/24
	option persistent_keepalive 25

The typical initialization sequence for 5GHz radio looks like this (note the timestamp):

[83337.808462] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[83402.258962] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[83402.285101] IPv6: ADDRCONF(NETDEV_UP): wlan0-1: link is not ready
[83402.694673] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready

but wlan0-1 does not get an IP address afterwards.

Try a non-DFS channel, DFS requires the router to scan for at least 60 seconds for DFS events, before it may use the channel.

2 Likes

Good point! I changed the radio0 channel to 48 and now it works as expected. So is it a bug in multi-SSID handling or is it an expected behavior?

The other thing I noticed, I had to reboot the router after I changed the channel in /etc/config/wireless. Only restarting wifi did not change the "waiting behavior" (and failing the second interface IP assignment) even when I changed the channel to 36. This seems like another potential bug to me.

I think I might have observed some unexpected behaviour with changing the 5 GHz channel frequency and width in LuCI; it appeared to me that changing them doesn't always refelect on what LuCI shows (like I change the frequency in LuCI and I can see via the command line that the change is applied, but It might take two updates on LuCI for the first one to show up. That was on Archer C7 v2. It wasn't consistent and I wasn't sure what's happening or if it was something worth my browser, so I didn't wish to create a big report for that at the time.

This is an expected behaviour, but at the radio level, not the SSID. So, all SSIDs on the 5GHz band should go up and down at the same time.

1 Like

I do not use LuCI, but I have run command line version and it showed the channel was indeed set to 36 (unfortunately running iw list does not show selected channels on my device). From the behavior of the radio during the interface setup I however concluded that the change had not been applied to the radio interface and rebooted to see if the reboot would help. (I did not verified it by wifi scanner).

This looks like another bug.