omapi/omshell database errors

Claus Holm Christensen iscdhcp at
Fri Jan 4 23:28:06 UTC 2008

Aaron Holtz wrote:
> 1.  Get the dhcp server to only store omapi info about 'active' leases
> 2.  Flush out these 'free' leases so the omapi hash is correct

The wish has been expressed here before, but the RFC specifies that the
DHCP server should try to let clients have the same IP as before, even
if the lease has expired. That is the reason (1) is not possible without
modifications to the source code.

(2) can be done, but requires that the DHCP-server is stopped while your
own script removes all the freed addresses from the leases file. I doubt
is an acceptable solution, and you probably need to write your own
script for it.

> I've looked at the server code for where the hash is being updated, but I 
> haven't been able to resolve the multiple entries for the same key 
> problem.

Looking through "man dhcpd" for version 3.0.5, it says that the hardware
address field can be examined and updated, but not searched (lookup).
I'm not sure if that has changed in later versions, but the problem with
doing lookups on this field is that a laptop moving between subnets will
appear with the same MAC on multiple leases, and there is no way in
omapi to distinguish between the different leases.

More information about the dhcp-users mailing list