[Dnsmasq-discuss] Questions about DHCP persistence and lease times
lists at wildgooses.com
Fri Sep 3 11:08:20 UTC 2021
On 03/09/2021 11:31, Chris Green wrote:
> Two questions really:-
> Is the file /var/lib/misc/dnsmasq.leases the only place where
> dnsmasq keeps DHCP/IP/Name information across restarts? I.e. if I
> delete that file will new DHCP requests get new IPs? (or does the
> client have some memory of the last IP it got?)
> If a client's DHCP lease expires and it sends a new DHCP request
> out, which fails, will it continue to use the old values or will
> it just die?
> I realise /var/lib/misc/dnsmasq.leases is not cast in stone and could
> be a different file but I'm sure it's clear what question I'm asking.
My understanding is yes to this.
Dnsmasq keeps it's database completely in ram while running. It updates the disk "periodically" (ie
whenever the in ram changes), and calls some external events at the same time.
To be precise I believe you need to first stop dnsmasq before erasing the disk cache (however, I
regularly get away with doing so while it's running... ;-) )
More information about the Dnsmasq-discuss