Override dynamic lease with static reservation

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Sep 27 17:59:51 UTC 2019


Marc Haber <mh+dhcp-users at zugschlus.de> wrote:

> I find it a rather common occurence that a client that currently holds a
> dynamic lease should get a static reservation of a different IP address.
> Thus, a host entry is put into the configuration and the client
> rebooted.
> 
> It then asks for the last IP address it knows of, which is the dynamic
> address. The server proceeds to look in its database, says "yup, here is
> the address".

Yes, that's correct.
As an alternative to the host declaration, setting the reserved flag on the lease will achieve almost the same effect - but still needs OMSHELL or lease file editing). The address is permanently reserved for the client, but unlike a host declaration, it goes through the normal lease lifecycle (it can expire, DNS updates happen properly, etc).

> The usual method is to delete the dynamic address from the database,
> which either involves a rather fragile and often misbehaving omshell
> process where the only "documentation" is half a mailing list thread
> from ten years ago, or shutting down the server and hand-editing the
> database file (which is a service interruption).
> 
> Is there a configuration option to tell the server "if there is
> something static for this client, forget everything dynamic you might
> have and NAK the dynami address from the client"?

deny known-clients (or allow unknown-clients) might do what you want.



More information about the dhcp-users mailing list