[Dnsmasq-discuss] How can I get dnsmasq to ignore a client's request for an IP it received on an earlier lease?
Simon Kelley
simon at thekelleys.org.uk
Wed Apr 23 19:38:32 UTC 2025
On 23/04/2025 09:49, bad.cow5843 at fastmail.com wrote:
> On Sun, Apr 20, 2025, at 1:27 PM, Geert Stappers wrote:
>> On Sun, Apr 20, 2025 at 12:30:21PM +0100, bad.cow5843 at fastmail.com
>> <mailto:bad.cow5843 at fastmail.com> wrote:
>> > I don't know why this happened, sorry!
>>
>> Yeah, I also would the like to know how it happened.
>>
> The thing that confused me was that the client machine was running
> NetworkManager but it also had dhclient installed, and the first time I
> tried to drop the lease I used dhclient -r and there was no message, but
> in fact the DHCP requests were being sent by NetworkManager. So I
> deleted a file like /var/lib/NetworkManager/internal-
> cb16f4d9-1bdd-3d64-9259-597efaac2e42-eth0.lease on the client and
> restarted NetworkManager and that's where things got better, but by then
> I had also changed the dnsmasq configuration so the dhcp-host= lines
> preceded the dhcp-range= and then dnsmasq ignores them AFAICT. Maybe it
> would be good to mention in the man page that dhcp-host specifications
> are ignored unless they're preceeded by a dhcp-range specification, it
> that's actually true.
>
The order of those config lines makes no difference. Getting a client
with an existing lease to move is a bit tricky, as you noted. Different
DHCP clients behave in different ways and the frequently the easiest
thing to do is to delete all client state and start again.
Cheers,
Simon.
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list