[Dnsmasq-discuss] Questions about DHCP persistence and lease times

Chris Green cl at isbd.net
Fri Sep 3 14:02:11 UTC 2021

On Fri, Sep 03, 2021 at 01:58:54PM +0100, Jesus M Diaz wrote:
>      I wasn't considering erasing/deleting the dnsmasq.leases file, I was
>      rather thinking of copying it to a non-running backup dnsmasq so
>      that
>      if/when the running dnsmasq fails I can start the other and it will
>      give out the same IPs.
>    Do you really need this? I mean, if dhcp server dies and you have a
>    stand-by backup that takes over immediately, the renew request from the
>    hosts will be to use the same IP address, so if you don't have the
>    dnsmasq.lease file, ergo there are no leases at the moment, dnsmasq
>    would grant the same (requested) IP address.

That's why I asked the question about persistence of IP address, does
a client give a 'hint' to the DHCP server that it would like the same
IP again?  However it's trivial to copy the contents of the leases
file across so it's not a big issue.

>      The only other issue is then how to tell 'everyone' that the DNS
>      server has
>      changed address.
>    Why don't you always include both DNS servers, so if one dies, the
>    second one will be there anyway?

I was thinking about the usual "one local server and or as secondary" but now I think about it I suppose there's
nothing difficult about providing two local servers.  However will
having one of them non-functional slow things down at all?


    1 - How do I configure dnsmasq to give two DNS server addresses?

    2 - Will only actually having one listening cause any delay?

Chris Green

More information about the Dnsmasq-discuss mailing list