OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: jp1010102a on May 30, 2025, 03:50:46 AM

Title: DNSMASQ DHCP issue allocating IPv4 Addresses
Post by: jp1010102a on May 30, 2025, 03:50:46 AM
Hi all,

1st I would like to thank the dev team for bringing DHCP to DNSMASQ an option for us. It is much appreciated.

I have run into an issue where Dnsmasq DHCPv4 is not always handing out IPv4 addresses when receiving a request. It is replying with:
DHCPREPLY(em0) 00:01:00:01:2f:3e:8e:b3:xx:xx:xx:xx:xx:xx no addresses available

Note that most devices are receiving an IPv4 address, just a few hosts are getting the no address available message.
DHCPv6 is handing out IPv6 addresses to the same hosts, creating the issue that these hosts only have access to part of the internet :)

My setup is pretty simple, one /24 subnet, range from .100 to .250, about 20-30 IPv4s assigned, so plenty of available addresses.

I checked the ARP table, and it was in line with the lease info from dnsmasq. I tried a flush to test, but no change for those devices.

I switched back to ISC, and no issues. Anybody else have run into this?

thanks
Title: Re: DNSMASQ DHCP issue allocating IPv4 Addresses
Post by: meyergru on May 30, 2025, 09:37:10 AM
I have not run into this, but it sounds like either:

a. you have switched on the "static" mode flag für your range(s). In that case, no dynamic addresses will be assigned.
b. the hosts has a static reservation that lies inside its dynamic range. This was considered a misconfiguration with ISC DHCP, but usually worked fine.
Title: Re: DNSMASQ DHCP issue allocating IPv4 Addresses
Post by: jbhorner on May 30, 2025, 07:13:35 PM
** REMOVED by Author **
Title: Re: DNSMASQ DHCP issue allocating IPv4 Addresses
Post by: meyergru on May 30, 2025, 07:18:22 PM
I would use "tcpdump -X -vvv port 67 and port 68" on OpnSense to verify what goes in and out. I just found a misconfiguration with Kea (https://github.com/opnsense/core/issues/8738) that way.
Title: Re: DNSMASQ DHCP issue allocating IPv4 Addresses
Post by: Monviech (Cedrik) on May 30, 2025, 08:15:20 PM
Quote from: meyergru on May 30, 2025, 09:37:10 AMb. the hosts has a static reservation that lies inside its dynamic range. This was considered a misconfiguration with ISC DHCP, but usually worked fine.

Just FYI:

https://github.com/opnsense/core/pull/8725#discussion_r2116227435
Title: Re: DNSMASQ DHCP issue allocating IPv4 Addresses
Post by: jp1010102a on May 30, 2025, 10:52:45 PM
Thanks for the suggestions. I will do some packet capture to see if I find anything. dnsmasq is handing out dynamic addresses but I do have some static assignments in the same range. Some devices that have a static address reservation get IPs, some don't. Most devices asking for a dynamic address get IPs, a few don't. Will update if I find anything.