Hi,
on my D-Link DIR-860L, running:
# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='19.07.4'
DISTRIB_REVISION='r11208-ce6496d796'
DISTRIB_TARGET='ramips/mt7621'
DISTRIB_ARCH='mipsel_24kc'
DISTRIB_DESCRIPTION='OpenWrt 19.07.4 r11208-ce6496d796'
DISTRIB_TAINTS=''
I get DHCP errors on WiFi 5 Ghz in a Routed AP configuration.
Inspiration for the Routed AP:
I've been using the Routed AP scenario for a long time on OpenWrt 15.x & 18.x because I always considered WiFi as public network (protected only by the WPA/WPA2) and disabled the forward to my LAN. Actually I allow some access to the LAN with some particular iptables FORWARD rules.
On OpenWrt 19.07.4 during the initial setup I was using LuCI to define the WiFi2 and WiFi5 interfaces together with the associated Firewall zones. I must admit it was a little shocking that I had to define two WiFi interfaces & networks & zones.
While defining the interfaces, the WiFi devices (Wireless section) were not yet enabled and configured and I only could choose some radio0 and radio1 for the interfaces (Physical Settings).
After this step I went on and configured the wireless devices in the Wireless section and learned that the previously defined WiFi2 and WiFi5 interfaces were attached to wlan1 & wlan0 instead of radio1 & radio0.
After rebooting the router I always needed to stop and start the WiFi5 interface because I get an error in LuCI telling that the device is not present and I'm not able to receive DHCP addresses through it - I suppose the WiFi5 device (driver) needs a little more time to load.
Today, after having the router on for more than 24 hours and able to connect and use the WiFi5 for several times during this period (yesterday), I stumbled again upon the DHCP issue when trying to reconnect. By inspecting LuCI - Interfaces section I haven't seen any "device not present" error.
Here is the relevant snippet from logread:
Thu Oct 29 17:04:57 2020 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED xx:xx:xx:xx:xx:xx
Thu Oct 29 17:04:57 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: authenticated
Thu Oct 29 17:04:57 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Oct 29 17:04:58 2020 daemon.notice hostapd: wlan0: AP-STA-CONNECTED xx:xx:xx:xx:xx:xx
Thu Oct 29 17:04:58 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Oct 29 17:04:58 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:02 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:07 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:15 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:30 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:34 2020 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED xx:xx:xx:xx:xx:xx
Thu Oct 29 17:05:37 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: authenticated
Thu Oct 29 17:05:37 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Oct 29 17:05:37 2020 daemon.notice hostapd: wlan0: AP-STA-CONNECTED xx:xx:xx:xx:xx:xx
Thu Oct 29 17:05:37 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Oct 29 17:05:38 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:44 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:47 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:05:56 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:06:11 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:06:13 2020 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED xx:xx:xx:xx:xx:xx
Thu Oct 29 17:06:17 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: authenticated
Thu Oct 29 17:06:17 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: associated (aid 1)
Thu Oct 29 17:06:18 2020 daemon.notice hostapd: wlan0: AP-STA-CONNECTED xx:xx:xx:xx:xx:xx
Thu Oct 29 17:06:18 2020 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Thu Oct 29 17:06:18 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:06:23 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:06:27 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:06:36 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
Thu Oct 29 17:06:53 2020 daemon.warn dnsmasq-dhcp[2640]: no address range available for DHCP request via br-WIFI5
I got rid of this issue after manually stopping and restarting the WiFi5 interface.
And here are some relevant sections from the config:
- /etc/config/network
config interface 'WIFI2'
option ifname 'wlan1'
option proto 'static'
option netmask '255.255.255.0'
option delegate '0'
option ipaddr '192.168.100.1'
option type 'bridge'
config interface 'WIFI5'
option proto 'static'
option netmask '255.255.255.0'
option delegate '0'
option ipaddr '192.168.200.1'
option type 'bridge'
- /etc/config/dhcp
config dhcp 'WIFI2'
option start '100'
option leasetime '12h'
option interface 'WIFI2'
option limit '10'
config dhcp 'WIFI5'
option start '100'
option leasetime '12h'
option interface 'WIFI5'
option limit '10'
- uci show wireless | grep device
wireless.radio0=wifi-device
wireless.default_radio0.device='radio0'
wireless.radio1=wifi-device
wireless.default_radio1.device='radio1'
I noticed that in /etc/config/network I don't have a "option ifname" for the WIFI5 interface and I believe that I should. Should I add it manually in /etc/config/network ?
At least in LuCi I can see the wlan0 device in the Interface details for WiFi5 and I don't know from where does LuCi take it.
I'm a little confused over this radio/wlan naming and not sure what caused the issues I'm experiencing now. Is LuCI faulty? Or was I supposed to define and configure the WiFi first and only after that define the Wifi2 & Wifi5 interfaces?
Thanks in advance for any useful inputs / clarifications.