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

I don't have a clue why I keep getting this warning:

daemon.warn dnsmasq-dhcp[1]: no address range available for DHCP request via phy0-sta0

Everything seems to be working fine but this pops up over and over in the log.

Any troubleshooting steps I should try to fix it? Other messages in the forum don't seem to apply exactly to me.

1 Like

Configs?

cat /etc/config/network
cat /etc/config/dhcp
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 'fd29:e259:15c0::/48'
        option packet_steering '1'

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

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '10.0.86.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option force_link '1'

config interface 'wwan'
        option proto 'dhcp'
        option peerdns '0'
        option dns '9.9.9.9 149.112.112.112'


config interface 'vpnclient'
        option proto 'none'
        option device 'tun0'
        option auto '0'

cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        option rapidcommit '1'
        list server '127.0.0.53'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '200'
        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 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

Option limit is too high. Use 150

1 Like

Oh, I forgot:

cat /etc/config/wireless

It was 150 to start when I first got the error. The AI said it needed to be set higher so I set it to 200. I'll change it back, but still getting the error.

Are you saying you asked an AI and it gave you that incorrect answer.

Wow.

x.x.x.254 is the last usable IP in a /24 network. So setting the leases to start at 150 with a limit of 200 would put you over.

We need to see the wireless config.

also, please post the following:

ubus call system board
1 Like
 ubus call system board
{
        "kernel": "5.15.137",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 3",
        "model": "Raspberry Pi 4 Model B Rev 1.5",
        "board_name": "raspberrypi,4-model-b",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.2",
                "revision": "r23630-842932a63d",
                "target": "bcm27xx/bcm2711",
                "description": "OpenWrt 23.05.2 r23630-842932a63d"
        }
}
1 Like
cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option channel 'auto'
        option band '5g'
        option htmode 'VHT80'
        option cell_density '0'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option network 'wwan'
        option ssid 'YourSSIDhere'
        option encryption 'psk2'
        option key 'yourpasswordhere'
1 Like

OK, it seems your device is connected to an upstream AP. A device on that network is making a DHCP request and the OpenWrt "heard" the broadcasted request.

  • Did you add wwan to the WAN firewall zone?
  • Did you alter the WAN firewall zone in any way (as DHCP request is blocked by default on WAN)?

cat /etc/config/firewall

What this whole setup is, is a wireless bridge. The built-in radio gets internet from my home wifi and then through OpenVPN client and then to the eth0 connection which is hooked up to my computer.

I was trying to make a travel router, but I have yet to find a dongle that works to transmit on radio1. The built-in radio is ideal for scanning for and getting connected to any wifi, but so far I can only make it work by connecting to the ethernet connection.

Everything works - it just keeps throwing the error over and over.

Yes, I altered the wan in advanced settings to add tun0 to covered devices and changed the wan option input from reject to accept.

The vpnclient and wwan are in the WAN firewall zone.

What is the upstream subnet and what is the subnet of the VPN?

This is why you see the error, you allow some unneeded traffic on WAN WWAN. Your WWAN is a DHCP client, so it gives an error when it hears a DHCP request broadcast.

Mystery solved.

You can try adding to your DHCP config:

config dhcp 'wwan'
        option interface 'wwan'
        option ignore '1'

The AI is good at explaining what all the options do, but you're right this is an error for sure. Just trying to learn OpenWrt's complicated system to configure a simple process. Someone needs to make a configuration wrapper package to do all this crap.

Not touching the defaults usually works too. Altering the WAN input firewall setting seems advanced to me and like you know what you're doing.

Do you need links to the WIkis or something?

I beg to differ after it told you to make an incorrect setting.

I'm trying that now. There is such an entry for 'wan' but not 'wwan' and there is no current 'wan' interface setup yet.

Then we need to see your firewall config and how you added wwan. The general rules may apply if you did not assign wwan to a zone.

This all started with a Network Chuck tutorial where he did all this from the command line and that was an early step where he edited the firewall config manually to do it. The setup does not work if you don't do it I found out. However, much has changed since OpenWrt 21.x.x and I started from scratch using the luci gui and reading wikis about making OpenVPN work. The wikis are dated and inaccurate too so I'm just trying stuff and seeing if I can get it to work as simply as this kind of configuration can be done. Seems like it should be simple, but it's tricky having to setup interfaces, devices, wan, lan, firewall where the smallest error results in a complete non-working setup.

My "knowing what I'm doing" is just trial and error and remembering what works and asking the AI or here to explain things a bit. Even my VPN provider .ovpn files have errors and mistakes I was only able to fix with some AI help. Network Chuck's tutorial and his text file of scripts have several typos and these were just mind boggling to find and debug since he complicated things at the command level the luci gui does with a few clicks.

Lots to learn here, but eventually I'll write it all up and share. I can make a regular router, a wireless bridge, a wired bridge, a VPN client and a VPN server now. My next project is to learn everything about using Wireguard on OpenWrt instead of OpenVPN. Problem is I can't open a port to my home modem for Wireguard but I can for OpenVPN. I'll figure it out someday.