On 14.08.2026 11:15, john doe via Dnsmasq-discuss wrote:
On 8/14/26 7:52 AM, Fabiano Sidler wrote:
Hi folks!

I'm running on Debian 13 with default configuration plus the following files
created in /etc/dnsmasq.d:

,---[ dhcp-range ]
|
|  dhcp-range=192.168.100.200,192.168.100.254
|
`-----------------

,---[myhost.example.org]
|
|  dhcp-host=52:54:00:ff:bc:ed,myhost.example.org,192.168.100.10
|
`-----------------------

This should assign myhost the IP 192.168.100.10 over DHCP. But instead, an address from the dhcp-range is assigned and in /var/lib/misc/ dnsmasq.leases
the following entry is created:

     1786687876 52:54:00:ff:bc:ed 192.168.100.223 myhost ff:00:ff:bc:ed:00:01:00:01:32:11:39:09:52:54:00:e0:6f:4c


In this case, all addresses to be dished out by the DHCP server should be included in the dhcp-range option.


This isn't quite true. Dnsmasq will dish out addresses that aren't in the dhcp-range but they have to be in the same _subnet_ as the dhcp-range.

The OP doesn't specifiy the subnet mask in their config, so it will be picked up from the interface configuration, which we don't have sight of.

If the subnet mask was, for instance 255.255.255.128, then 192.168.100.10 wouldn't be a valid address for the host and would be ignored.


Another issue might be that the host already has the 192.168.100.223 address in a lease, dnsmasq will try and stop the DHCP-client from renewing that lease so that it moves to the static address, but that's a bit of delicate operation which depends on the client also.

Setting --log-dhcp and posting the logs is a good idea.

Simon.

_______________________________________________
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to