dhcpd lease problems?

Simon Hobson dhcp at thehobsons.co.uk
Wed Jun 7 07:06:08 UTC 2006


Alan DeKok wrote:

>    I'm not clear on the difference between the current hosts, and
>reserved dynamic leases.  Is it just that the reserved dynamic leases
>inherit the pool & range properties, where hosts don't?

I struggled with this as well, but I **THINK** it's clicked ! I'm 
sure David will correct me if I'm wrong here ...

At present, we have dynamic leases and hosts, Leases go through the 
lifecycle stages and appear in the database, host declarations don't. 
The two are handled differently (using, at least some, different 
code). Because of the way host declarations are handled, things like 
ddns don't work (efficiently) for them.


As I think they are supposed to work, a reserved lease is almost 
identical to any other lease and will appear in the database. It will 
go through the same lifecycle as a 'normal' lease - so dns entries 
can be created when it's leased, and removed when the lease expires. 
The main difference being that the lease is marked as reserved and so 
will never be re-used for a different client (modification of the 
'find an available lease' code).

Whenever the client comes along for a lease, the old lease will be in 
the database* and so the client will get the reserved address (as 
long as any allow/deny rules permit ?) - this will not need any new 
code as the existing lease matching code will find the lease.

I assume it will still be possible to do a host declaration (without 
fixed address statement) to override/add host specific options.


So it looks like the extra code required is contained to a small area 
(find a free lease) along with a means of creating and destroying the 
reservations, plus having an extra lease property to keep around.


So it would seem that the benefit/effort ratio would be fairly high 
for this change.

Simon


* As is the case now, the only way for a lease to be removed from the 
database is for it to be allocated to another client (other than 
admin intervention such as editing the lease file or altering the 
pools). Since a reserved lease cannot be allocated to another client, 
it will never be removed from the database.


More information about the dhcp-users mailing list