Cleanup leases?
Simon Hobson
dhcp1 at thehobsons.co.uk
Tue Sep 26 20:32:21 UTC 2006
B. Cook wrote:
> >> 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..
If a lease ended 20+ days ago then it should be available for re-use.
> >> 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?
As someone else has already pointed out, this is automatic. The last
state of a lease (when it changes to free) is kept so that the same
address can be offered to a client should it return in the future -
but these addresses ARE available to be offered to another client if
required.
># Public Network
>subnet 10.0.0.0 netmask 255.255.255.128 {
>default-lease-time 1800;
>max-lease-time 1800;
>option domain-name "public.adriance";
>option domain-name-servers 10.0.0.62;
>#option domain-name-servers 10.0.0.87;
>option routers 10.0.0.87;
>
>This is what I am using.
>
>and this is my global section:
>
># $Id: dhcpd.conf,v 1.89 2006/09/22 15:48:56 root Exp root $
>
>always-reply-rfc1048 true;
>authoritative;
>ddns-update-style none;
>ddns-updates off;
>deny bootp;
>deny declines;
>deny duplicates;
>log-facility local7;
>one-lease-per-client on;
>ping-check true;
You've clipped that a bit too harshly - according to this you don't
have any ranges to lease so you would get "no free leases" :-)
>I don't understand how I saw leases in there from July.. and Aug.. and
>Sept..
Old leases kept as already mentioned.
Two other thoughts come to mind :
1) Do you have any form of conditional access configured - eg pools
restricted to known/unknown hosts or specific classes ? If so then I
would look again at those. If a client is not permitted a lease from
any pool then you will get "no free leases" even though there are
plenty available - it's just that there aren't any that the client is
allowed to use.
2) Are you using failover, and if so, what version server ? I believe
in some of the older versions there are bugs that can result in
leases not making the transition to free state - hence the addresses
never become available to re-lease to another client. This should be
obvious though, what state are the leases you are/have already
deleted from the leases file ?
More information about the dhcp-users
mailing list