Infinite Leases

Thomas, Scott M scott.m.thomas at kroger.com
Mon Aug 15 21:18:47 UTC 2011


Simon Hobson wrote:

>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,
Thanks for the suggestion, but lease time still equates to 26 years and some change using the setting above, like the "-1" designation in earlier versions of ISC DHCP(when you try the -1 timeframe for option 51 in this version of ISC DHCP it ignores it unless you specify the max-lease-time above).
So to recap, infinite, 2147483647 and, in the past, -1 all equate(d) to the same timeframe.
I agree completely about these device manufacturers. I wish I could tell the manufacturer that we will need to test for one full infinite lease cycle before we buy from them.
-----Original Message-----
From: dhcp-users-bounces+scott.m.thomas=kroger.com at lists.isc.org [mailto:dhcp-users-bounces+scott.m.thomas=kroger.com at lists.isc.org] On Behalf Of Simon Hobson
Sent: Monday, August 15, 2011 2:26 PM
To: Users of ISC DHCP
Subject: RE: Infinite Leases

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.
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.



More information about the dhcp-users mailing list