[Dnsmasq-discuss] flush dhcp lease cache
Simon Kelley
simon at thekelleys.org.uk
Thu Jul 4 17:46:54 BST 2013
On 04/07/13 12:44, gabriel wrote:
>
>
> hello,
>
> is it somehow possible (signal, etc) to flush dnsmasq's internal dhcp
> lease cache?
>
> i want to be able to update ip addresses without restarting dnsmasq. So
> I send a SIGHUP to dnsmasq to reread its host definition files. But
> althought I've disabled the leasefile (leasefile-ro) and enabled a
> script to run the machines still get their old addresses.
>
> maybe I just don't check how to do this ...
>
> thanks in advance,
> gabriel
>
If you've disabled the leasefile, then the problem is likely to be that
the DHCP client is remembering what address it had last, and asking for
that address again. dnsmasq will give the client the address is asks for
if it's OK (not in use, still on a configured network, etc).
You could remove the caches in your hosts too, or configure static
addresses for them in dnsmasq. Dnsmasq will force the static address,
rather than one a client asks for.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list