Mixing fixed-address host declations in dhcpd.conf with dynamic entries created via omapi

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Jul 17 11:57:13 UTC 2012

Kristian Pedersen wrote:

>So the question goes, how does the dhcp server handle overlaps in 
>dhcpd.conf vs. dynamic entries in dhcpd.leases?

It doesn't - DON'T DO IT

>When the server starts up and checks the dhcpd.leases, will any 
>config in dhcpd.conf override the ones from the lease-file? Do you 
>see any problems in this implementation or have suggestions for 
>other ways to implement this?

There are no checks, it's assumed that the administrator knows what 
he is doing ! Depending on various factors, it may result in the 
address being marked as abandoned in the leases file (fairly 
innocuous), or at the other extreme it may result in two clients 
being given the same address.

The simple answer is : never have an address i a dynamic range AND a 
fixed address statement. If you must have a fixed address in the 
middle of a dynamic range, then split the range :


To expand on this, fixed-address statements are handled completely 
separately from dynamic leases. The "lease" does not go through the 
normal lease cycle, and it is not recorded in the leases database.

As an alternative, you may wish to consider whether reserved leases 
would suit your needs. A reserved lease is just like any other, goes 
through the same lifecycle, takes part (properly) in dynamic DNS 
updates, and is recorded in the leases file. However, being marked as 
reserved, it will not be reused (even if long expired) for any other 
I believe you should be able to create a lease and mark it reserved, 
or just mark an existing lease as reserved, via OMAPI.

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

More information about the dhcp-users mailing list