A Question on Dynamic DHCP/DNS IP Lease Renew

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Sep 29 07:05:54 UTC 2016

David Li <dlipubkey at gmail.com> wrote:

> Thanks for the explanation. It seems like most of the cases the IP
> will be the same after reboot unless it's taken somehow.

Yes, in the general case with a device that's mostly on, it will actually be hard for it to lose it's address. For addresses to change you need to be off the network for a "long" time - where "long" is a function of the amount of available address space and client churn.

> Should I use "fixed address":

When you use a "fixed-address" declaration, the lease processing is bypassed. From the client side it looks the same, but the server doesn't do any lease lifetime actions - it's not recorded in the leases file, it doesn't (by default) do DDNS, and there's no lease to expire. There's a setting to make the server do DDNS for fixed-addresses - but all it does is force add/update of the records on every lease issue/renew (for fixed-address statements), as there's no lease to expire, the DNS entries never get removed.

As an alternative, add the "reserved" statement to the lease. You can either stop the server and edit the leases file (whether that's to add it to an existing lease or to add a skeleton new lease in advance) or (AIUI) use OMAPI to set it. This reserves the lease so it won't get re-used for another client, so it has the same effect of fixing the address but in a manner that doesn't interfere with normal lease processes & DDNS.

More information about the dhcp-users mailing list