Cleanup leases?

B. Cook bcook at
Tue Sep 26 15:58:15 UTC 2006

Jeff A. Earickson wrote:
> Hi,
> Attached is a perl script to clean up lease files.  It takes the
> current lease file, cleans it per the arguments, and writes out
> a new file that you can move into place WHILE dhcp is shut down.
> Be *sure* that all DHCP servers are shut down and quiet before 
> monkeying with your lease files.  Be *sure* that all of your
> DHCP servers have the same lease file before starting DHCP back
> up.  Use at your own risk, etc, etc.
> For public areas where people/laptops come and go, lower your lease
> time.  Our pubic areas like our library have lease times only in
> the few-hour range.
> Jeff Earickson
> Colby College
> On Tue, 26 Sep 2006, B. Cook wrote:
>> Date: Tue, 26 Sep 2006 10:03:56 -0400
>> From: B. Cook <bcook at>
>> Reply-To: dhcp-users at
>> To: dhcp-users at
>> 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
# Public Network
subnet netmask {
default-lease-time 1800;
max-lease-time 1800;
option domain-name "public.adriance";
option domain-name-servers;
#option domain-name-servers;
option routers;

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;
ddns-update-style none;
ddns-updates off;
deny bootp;
deny declines;
deny duplicates;
log-facility local7;
one-lease-per-client on;
ping-check true;

I don't understand how I saw leases in there from July.. and Aug.. and 

More information about the dhcp-users mailing list