Never Expire leases.

Glenn Satchell glenn.satchell at uniq.com.au
Sun Feb 21 22:33:10 UTC 2010


Keith wrote:
> On Sat, 20 Feb 2010, Glenn Satchell wrote:
> 
> |->Keith wrote:
> |->> I have a bunch of leases in a pretty vanilla dhcp setup that end up as
> |->> NEVER expire in the dhcpd.leases file.
> |->>
> |->> How can one prevent that from happening?
> |->>
> |->That's not normal, unless you configure bootp addresses, or reserved
> |->addresses.
> |->
> |->	range dynamic-bootp ...
> |->
> |->Please show us your dhcpd.conf.
> 
> Nothing is reserved, and there is not bootp.
> 
> Global options:
> 
> option domain-name "rupert.net";
> ddns-update-style none;
> ddns-updates off;
> omapi-port 7911;
> authoritative;
> 
> Each network is setup the same way:
> 
> subnet 69.176.166.0 netmask 255.255.255.0 {
>         Authoritative;
>         pool {
>                 option domain-name-servers 209.145.111.37;
>                 option routers 69.176.166.1;
>                 max-lease-time 240;
>                 default-lease-time 240;
>                 range 69.176.166.12 69.176.166.24;
>                 allow unknown clients;
>         }
>         #known clients
>         pool {
>                 option domain-name-servers 209.145.111.62, 64.114.55.100;
>                 option routers 69.176.166.1;
>                 max-lease-time 604800;
>                 default-lease-time 604800;
>                 range 69.176.166.25 69.176.166.254;
>                 deny unknown clients;
>         }
> }
> 
> The only difference between networks is the acutal /24 being
> setup and option routers statement. Other than that they all
> get the same DNS and lease times. Its practically a template for each /24
> to be setup this way.
> 
> But there are lease times in the leases database that expire in 2038.
> Which for all intents is never.
> 
> Here are two examples:
> 
> lease 69.176.166.13 {
>   starts 3 2007/11/21 02:21:31;
>   ends never;
>   tstp 2 2038/01/19 03:14:07;
>   binding state active;
>   next binding state free;
>   hardware ethernet 00:17:3f:be:95:65;
> }
> 
> lease 69.176.166.201 {
>   starts 1 2008/04/28 21:10:42;
>   ends never;
>   tstp 2 2038/01/19 03:14:07;
>   binding state active;
>   next binding state free;
>   hardware ethernet 00:16:e3:fd:aa:7c;
> }
> 
> Is this a client side asking for an unlimited lease, overriding what the
> server sends to them?
> Can I just stop dhcpd then delete the never expire leases from
> dhcpd.leases and restart dhcpd? I would like to reclaim those leases
> before 2038. :)
> 
> Thanks,
> Keith
> 

It could be  a client that has asked for an unlimited lease, or it may 
have been manually editted some years ago. It doesn't seem to agree with 
your max-lease-time setting, but these entries (Nov 2007 and Apr 2008) 
could have been granted prior to the current settings.

If those clients are not using the particular IP then you can stop 
dhcpd, delete the lease entries and start up again to remove them.

-- 
regards,
-glenn
--
Glenn Satchell                            |  Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
http://www.uniq.com.au tel:0409-458-580   |  types random stuff.



More information about the dhcp-users mailing list