Daemon.warn dnsmasq-dhcp[1]: no address range available for DHCP request via wlan0

Hey All,

Device: ASUS RT-AX53U
Version: OpenWrt 22.03.5 r20134-5f15225c1e / LuCI openwrt-22.03 branch git-23.093.57104-ce20b4a

I am trying to create separated SSIDs for wifi main users (UPC4208047-MAIN), guest (UPC4208047-GUEST) and iot devices (UPC4208047), based on this article.
MAIN works well however dhcp server can not offer addresses in GUEST and IOT.
Networks are working as expected with static addresses.

/etc/config/wireless

config wifi-iface 'default_radio0'
option device 'radio0'
option mode 'ap'
option ssid 'UPC4208047'
option encryption 'psk2'
option key 'XXX'
option network 'IoT'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'UPC4208047-MAIN'
option encryption 'psk2'
option key 'XXX'

config wifi-iface 'wifinet2'
option device 'radio1'
option mode 'ap'
option ssid 'UPC4208047-GUEST'
option network 'guest'
option encryption 'psk2'
option key 'XXX'

/etc/config/network

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

config interface 'guest'
option proto 'static'
option ipaddr '10.0.0.1'
option netmask '255.255.255.0'

config interface 'IoT'
option proto 'static'
option ipaddr '10.0.1.1'
option netmask '255.255.255.0'

Firewall rules:

config rule
option name 'Guest DNS'
option src 'guest'
option dest_port '53'
option target 'ACCEPT'

config rule
option name 'Guest DHCP'
list proto 'udp'
option dest_port '67'
option target 'ACCEPT'
option src 'guest'

/etc/config/dhcp

config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'

config dhcp 'guest'
option interface 'guest'
option start '10'
option limit '200'
option leasetime '1h'

config dhcp 'IoT'
option interface 'IoT'
option start '10'
option limit '200'
option leasetime '12h'
option force '1'
option dynamicdhcp '0'

You cannot mix uppercase and lowercase letters for the interface names in different configuration files.
Better always use lowercase to avoid confusion.

Well, it's a mystery considering that (according to the snippets you posted) the name used in the configuration files varies between MAIN and lan.

1 Like

Original names of networks / interfaces replaced in the pasted configs, please ignore the inconsistency.

update your post, perhaps ?

1 Like

Post updated with the original names.
Again, this is not the root cause, DHCP assignment not working only.

After the reboot, there is not active lease in 10.0.0.1/24 nor 10.0.1.1/24
however still not able to offer addresses.

Tue Nov 21 13:24:59 2023 daemon.warn dnsmasq-dhcp[1]: no address range available for DHCP request via wlan0

cat /tmp/dhcp.leases
1700610738 e2:1f:53:f7:95:87 192.168.1.225 * 01:e2:1f:53:f7:95:87
1700610735 3e:6e:36:e0:09:ff 192.168.1.100 * 01:3e:6e:36:e0:09:ff
1700610798 14:5a:fc:8c:e0:23 192.168.1.173 01:14:5a:fc:8c:e0:23
1700610672 f0:86:20:a1:f5:3b 192.168.1.201 01:f0:86:20:a1:f5:3b
1700610657 30:de:4b:57:a7:31 192.168.1.192 01:30:de:4b:57:a7:31

Try using dummy bridge devices for the additional interfaces.

config device
        option type 'bridge'
        option name 'br-guest'
        option bridge_empty '1'

config interface 'guest'
        option device 'br-guest'
	    ...

Verify that the dhcp ranges exist in the active dnsmasq configuration file.

cat /tmp/etc/dnsmasq.conf* | grep range
1 Like

Not, both wrong are missing but the working range is available:

cat /tmp/etc/dnsmasq.conf* | grep range
dhcp-range=set:lan,192.168.1.100,192.168.1.249,255.255.255.0,12h

Did you create the additional bridges as suggested?

brctl show

Anything useful in the logs?

/etc/init.d/log restart; /etc/init.d/dnsmasq restart; sleep 3; logread -e dnsmasq

Please use the pre-formatted text button </> when posting configuration snippets or command results.
Thanks.

Looks like the issue resolved with the dummy bridges.
Thanks a lot for your support!

Regards,
Gabor

1 Like

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