DHCPd sending lease expiration of 3600 seconds

Jeff Haran jharan at Brocade.COM
Wed Feb 18 01:32:28 UTC 2009


> -----Original Message-----
> From: dhcp-users-bounces at lists.isc.org 
> [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of David Forrest
> Sent: Tuesday, February 17, 2009 4:40 PM
> To: Users of ISC DHCP
> Subject: RE: DHCPd sending lease expiration of 3600 seconds
> 
> On Tue, 17 Feb 2009, Jeff Haran wrote:
> 
> >> -----Original Message-----
> >> From: dhcp-users-bounces at lists.isc.org
> >> [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Geoff Sweet
> >> Sent: Tuesday, February 17, 2009 3:47 PM
> >> To: dhcp-users at lists.isc.org
> >> Subject: DHCPd sending lease expiration of 3600 seconds
> >>
> >> On my CentOS 5.2 system I am setting up some network 
> services for our
> >> corporate environment. DHCP works great EXCEPT that clients
> >> are getting
> >> a lease from the server that expires in 3600 second even though the
> >> config says otherwise. Here is my config:
> >>
> >> #####
> ---------> snipped
> >>
> >> # lease expiration
> >> default-lease-time 86400;
> >> max-lease-time 86400;
> 
> ---->snipped
> >>
> >> I can see clearly in a WireShark network trace that the
> >> server responds back with the lease marked as expiring in 1
> >> hour. It's like the service is ignoring the default-lease and
> >> max-lease settings. Any thoughts?
> >>
> >> Thanks,
> >> Geoff Sweet
> >>
> >
> > I see something similar with dhcpd 4.0, except that my 
> problem is trying
> > to get it to assign infinite leases.
> >
> > Wireshark showed dhcpd assigning long leases (I believe it was the
> > number of seconds until the Unix Epoch overflows 2^^31 
> seconds in 2038),
> > but I could not get it to assign leases of infinite length 
> (all 1s in
> > the appropriate option value). This keeps the DHCP clients receiving
> > these leases executing but blocked on a long timeout in select() in
> > order to start renewing some day in the distant future when 
> they could
> > otherwise terminate. The problem remains.
> >
> > I posted to this group, but never got a response.
> >
> > Jeff Haran
> > Brocade
> 
> It seems sometimes the client requests a shorter lease.  If 
> you want a 
> longer lease assigned than the client requests, just assign a 
> min-lease
> like this:
> min-lease-time 85200;
> 
> along with your max and default of 86400 and you'll get leases in the 
> window of 85200-86400.
> 
> 
> Dave
> St. Louis, Missouri
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
> 

Dave,

Thanks for the response, but I've tried that.

I set min-lease-time, max-lease-time and default-lease-time all to
infinite and I still get finite offers from the server.

The configuration file I tried this most recently with looks like this:

# 2-17-2009, jharan, infinite leases

default-lease-time infinite;
max-lease-time infinite;
min-lease-time infinite;

class "brocade" {
        match if substring (option dhcp-client-identifier, 1, 24) =
"BRCDBP-CP0-SLOT01-HOST00" and option vendor-class-identifier =
"BROCADE";
}

shared-network backplane {
        subnet 192.168.74.0 netmask 255.255.255.0 {
#               default-lease-time infinite;
#               max-lease-time infinite;
#               min-lease-time infinite;
                option subnet-mask 255.255.255.0;
                pool {
                        range 192.168.74.200 192.168.74.200;
                        allow members of "brocade";
                }
        }
}

The length of the lease in the offer from the server was 0x36643dea
seconds according to Wireshark, which is 914 million seconds.

That's long, but not infinite.

I've tried moving the *-lease-time declarations into the subnet
statement, same behavior. I've tried replacing the text "infinite" with
the hexadecimal and decimal equivalents of all 1s (i.e 0xffffffff,
4294967295), same behavior.

This was with the stock dhcpd 4.0.0-18 that comes with Fedora 9. Note
that the client is requesting a lease length of 0x7fffffff seconds,
again according to Wireshark.

I wish I knew what the trick was to get truly infinite leases. The
dhcpcd client is running in an embedded system on a chassis backplane
Ethernet where it would be nice to recover the memory used by the client
that is just sitting there waiting to start renewing 14.4 years from
now. I've copied the resultant dhcpd.lease file below, in case that's
some help:

# The format of this file is documented in the dhcpd.leases(5) manual
page.
# This lease file was written by isc-dhcp-4.0.0

lease 192.168.74.200 {
  starts 3 2009/02/18 08:08:53;
  ends 2 2038/01/19 03:14:06;
  cltt 3 2009/02/18 08:08:53;
  binding state active;
  next binding state free;
  hardware ethernet 00:60:69:f0:00:80;
  uid "\000BRCDBP-CP0-SLOT01-HOST00";
}

Jeff Haran
Brocade



More information about the dhcp-users mailing list