[Dnsmasq-discuss] dhcp.leases file format?
Simon Kelley
simon at thekelleys.org.uk
Thu Apr 27 07:41:55 BST 2006
William Trenker wrote:
>
> Thanks for the very helfpul and timely answer. I should have
> mentioned that my interest in the dhcp.leases file is that I'm trying
> to find a way to force an expiration. I was thinking perhaps I could
> simply remove the relevant line from the dhcp.leases file. But of
> course I should have asked if that would even work.
>
Removing a lease line won't work: when the client renews, the line will
just be re-instated. (and modifying the leases file whilst dnsmasq is
running is completely pointless: the file is never read except at
startup, and it's overwritten with dnsmasq's current idea of the state
of the world whenever that changes.
There's normally no way to force a DHCP client to drop a lease before
the expiry time it was given. Once the client needs to renew a lease, if
you can configure dnsmasq to ignore the client
dhcp-host=<mac address>,ignore
then that will inhibit renewal.
There does exist a standard for forcing DHCP clients to give up or alter
a release early, in RFC3203, but AKAIK, no clients implement it. dnsmasq
doesn't, but it would be fairly trivial to do, if you can come up with a
convincing case (ie, you can find a viable client).
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list