Cleanup leases?

Glenn Satchell Glenn.Satchell at uniq.com.au
Tue Sep 26 14:17:22 UTC 2006


>Date: Tue, 26 Sep 2006 10:03:56 -0400
>From: "B. Cook" <bcook at poklib.org>
>To: dhcp-users at isc.org
>Subject: Cleanup leases?
>
>Hello All,
>
>I have a /25 defined for about 64+ laptops, and for low public usage 
>here at the library..
>today I have started to receive the 'no free leases' entry in the logs..
>
>I am going in and removing leases that ended about 20+ days ago..
>
>How can I keep this file cleaned up so that people that need leases will 
>get them back from people that are no longer using them?
>
>Thanks in advance.
>
>- Brian
>
Hi Brian,

No need to manually clean up the file. The dhcp RFC (2131 I think) says
that the dhcp server must try really hard to give the same IP address
to a client.

dhcpd does this by remembering even expired leases so that if that
particular client came back it could give it the same address it had
before.

When a client requests a lease dhcpd tries to match it with an existing
lease if possible. If it can't then it selects a free lease. If there
are no free leases then it selects the least recently used lease, frees
that, and gives that address to the client.

If you are getting no free leases, and you have a transient client
base, then perhaps a shorter lease time would work better for you. This
can be done by setting max-lease-time to something suitable, perhaps an
hour or so?

Otherwise what is the size of your range of addresses that you are
allocating from?

If none of this helps, then perhaps post your dhcpd.conf, plus dhcpd
version and platform (eg linux, bsd, solaris, etc).

regards,
-glenn
--
Glenn Satchell     mailto:glenn.satchell at uniq.com.au | Some days we are
Uniq Advances Pty Ltd         http://www.uniq.com.au | the flies;  some
PO Box 70 Paddington NSW Australia 2021              | days we  are the
tel:0409-458-580  tel:02-9380-6360  fax:02-9380-6416 | windscreens...



More information about the dhcp-users mailing list