Infinite Leases

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Aug 15 18:25:36 UTC 2011


Randall C Grimshaw wrote:

>Is it possible that you could provide a static 'lease' for a fixed 
>address? this would be in the host option.

That won't help. it will make it a static assignment, but it won't 
change the lease time given to the clients.

>I read the man page for dhcpd.conf and found this:
>
>
>
>        The infinite-is-reserved statement
>
>
>
>           infinite-is-reserved flag;
>
>
>
>           ISC DHCP  now  supports  'reserved'  leases.   See  the  section  on
>
>           RESERVED LEASES below.  If this flag is on, the server will automat-
>
>           ically reserve leases allocated to clients which requested an  infi-
>
>           nite (0xffffffff) lease-time.
>
>
>
>           The default is off.
>
>
>
>I turned the flag to on (infinite-is-reserved on;) in iscdhcpd.conf, 
>and /var/log/messages shows the following entry after the DHCPOFFER 
>to the device in question:
>
>
>
>Aug 9 17:14:33 of888tuna dhcpd:  Infinite-leasetime reservation made 
>on 192.168.0.20.
>
>
>
>However, in a packet sniff, I can see the server is offering a 1 day 
>lease instead of the 0xffffffff value. The device I'm dealing with 
>will only accept that value. While I realize that it inadvisable, 
>I'm stuck with it.
>
>Is there something I'm missing here as far as setting the flag to on 
>and making it work?

Yes, what you are missing is that the setting you found only affects 
what the server does in terms of recording leases. The other element 
you need is to have the server put infinite in the lease itself.

You probably need something like :
host bothersome_host {
   hardware ethernet xx:xx:xx:xx:xx:xx ;
   min-lease-time 2147483647 ;
   max-lease-time 2147483647 ;
}
This would set max and min lease times for this client only to be 
2^31-1 seconds. I believe the server will realise this will actually 
cause the end date to wrap (Unix dates/times are a 32 bit signed 
integer) and will thus truncate the end date/time to be 2147483647 or 
0x7fffffff.
I assume you can't use -1 to get 0xffffffff.

Some device manufacturers are a pain aren't they. Years ago I 
couldn't get a network copier to accept a lease and ended up manually 
configuring it. I found out some time later that it had a requirement 
of a minimum 2 year lease time. Seems both pointless and arbitrary to 
me.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list