[Dnsmasq-discuss] How can I get dnsmasq to ignore a client's request for an IP it received on an earlier lease?
Geert Stappers
stappers at stappers.nl
Sun Apr 20 11:57:04 UTC 2025
On Sun, Apr 20, 2025 at 12:05:16PM +0100, bad.cow5843 at fastmail.com wrote:
> 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.
I suggest to provide further information, as:
- pcap file, to see what happens on the wire
- what the client is, how "forget lease" is tried/done
- The whole dnsmasq configuration, not just /etc/dnsmaq.d/99-DNSDHCP
- Content of the /var/lib/misc/dnsmasq.leases 8^)
Regards
Geert Stappers
Too blunt to ignore the sincere post
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list