Override dynamic lease with static reservation
Marc Haber
mh+dhcp-users at zugschlus.de
Sat Sep 28 15:27:53 UTC 2019
On Fri, Sep 27, 2019 at 06:59:51PM +0100, Simon Hobson wrote:
> 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).
What would be the omshell procedure for that?
I guess that a reservation is the best thing for infrastructure like
servers while a "reserved" lease is better for a client that should have
always the same IP address?
Or why are there two ways to do this?
> > 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.
I have set deny known-clients on my pool and at least my notebook
changed its IP address at the next (manually triggered) renew. I haven't
done more explicit tests, but this seems to have solved it. We'll see in
a week whether clients without a host statement drop off the net.
Thanks for helping!
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
More information about the dhcp-users
mailing list