[Dnsmasq-discuss] How can I get dnsmasq to ignore a client's request for an IP it received on an earlier lease?

bad.cow5843 at fastmail.com bad.cow5843 at fastmail.com
Sun Apr 20 11:05:16 UTC 2025


Hello dnsmasq people!

I have this in /etc/dnsmaq.d/99-DNSDHCP

# Always allocate the host with Ethernet address 00:e0:4c:36:07:25
# The IP address 192.168.2.4
dhcp-host=00:e0:4c:36:07:25,192.168.2.4

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
dhcp-range=192.168.2.50,192.168.2.150,12h

The problem is that before I knew this host's MAC address, it got a lease (192.168.2.58) from the range, now it always requests that IP address, and dnsmasq always accedes to that request, despite my explicit allocation of a low address (192.168.2.4), not from the pool 50-150 of random clients. This is what I see when I watch the logs on the server with "journalctl -u dnsmasq -f"

Apr 20 11:43:46 pizero dnsmasq-dhcp[4134]: DHCPDISCOVER(eth0) 00:e0:4c:36:07:25
Apr 20 11:43:46 pizero dnsmasq-dhcp[4134]: DHCPOFFER(eth0) 192.168.2.58 00:e0:4c:36:07:25
Apr 20 11:43:46 pizero dnsmasq-dhcp[4134]: DHCPREQUEST(eth0) 192.168.2.58 00:e0:4c:36:07:25
Apr 20 11:43:46 pizero dnsmasq-dhcp[4134]: DHCPACK(eth0) 192.168.2.58 00:e0:4c:36:07:25 pizero1

Note that previously I had the config lines dhcp-host and dhcp-discover reversed, but I changed it, thinking that maybe it was doing this because I listed the range before the host, but it doesn't seem to make any difference. I have tried to get that client to forget it's previous leases but to no effect that I can see.

Thanks in anticipation for anything anyone can suggest.

Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20250420/8e36408a/attachment.htm>


More information about the Dnsmasq-discuss mailing list