[Dnsmasq-discuss] Leases file is not updated and dhcp-script is not called if Requested-IP is in the pool.

Simon Kelley simon at thekelleys.org.uk
Sat Aug 28 10:28:41 UTC 2021

Probable explanation.

It looks like your dhcp clients are attempting to the renew their leases
(which makes sense,  unless you explicitly told them to delete the
leases when you deleted the leases server-side.) Without
dhcp-authoritative, dnsmasq follows the RFC spec and assumes an attempt
to renew a lease it doesn't know about is meant for another DHCP server
on the net and ignores it. At that point your DHCP clients probably just
continue to use the existing lease until it expires.

dhcp-authoritative changes the behaviour so that dnsmasq assumes the
renew was for it, and silently recreates its lease record. It's
explicitly intended for this sort of situation.

DHCP can behave very strangely when the client and server get out of sync.


On 27/08/2021 20:05, Vallevand, Mark K wrote:
> WooHoo.
> Dhcp-authoritative did the trick!
>>From the fire, my bacon has been pulled.
> Thanks!
> Mark K Vallevand
> Unisys | 651-635-7708 | mark.vallevand at unisys.com 
> MATERIAL and is for use only by the intended recipient. If you received this
> in error, please contact the sender and delete the e-mail and its
> attachments from all devices.
> Outside of a dog, a book is man's best friend.
> Inside of a dog, it's too dark to read.
> -  Groucho
> -----Original Message-----
> From: Simon Kelley <simon at thekelleys.org.uk> 
> Sent: Friday, August 27, 2021 1:31 PM
> To: Vallevand, Mark K <Mark.Vallevand at UNISYS.com>;
> dnsmasq-discuss at lists.thekelleys.org.uk
> Subject: Re: [Dnsmasq-discuss] Leases file is not updated and dhcp-script is
> not called if Requested-IP is in the pool.
> EXTERNAL EMAIL - Be cautious of all links and attachments.
> On 27/08/2021 15:45, Vallevand, Mark K wrote:
>> I do clear the leases database as described.
>> I have tried a newer version of dnsmasq and experimented with
>> script-on-renewal.  It really didn't seem to help with the problem.
>> Here is what I do and see (v 2.79)
>> - stop dnsmasq
>> - erase leases file
>> - write config file
>> - start dnsmasq
>> - client request with preferred ip in configured pool
>> - leases file *is not* updated
>> - dhcp-script *is not* called
>> - client request completes and begins to use the address
>> - client request to renew lease
>> - leases file *is* updated (yay)
>> - dhcp-script *is* called with 'add' (yay)
>> Subsequent client lease renews do not see the dhcp-script called.
> Expected.
>> With a newer version, 2.86rc1, and script-on-renewal set, the subsequent
>> client lease renews *do* see the dhcp-script called with 'old'.  Again,
> this
>> is expected.  But, the behavior of dnsmasq does not otherwise change with
>> the newer version.
>> So, why is the lease file not getting updated?
>> When the initial client request has a preferred ip outside the pool or is
>> not included, it seems like things work as expected.
> Are you setting the dnsmasq option --dhcp-authoritative
> Could you set the dnsmasq option --log-dhcp and post the resulting logs
> when you go through the procedure above?
> Cheers,
> Simon.

More information about the Dnsmasq-discuss mailing list