[Dnsmasq-discuss] Can not set lease time to less than 2m

Simon Kelley simon at thekelleys.org.uk
Wed Feb 25 22:37:24 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25/02/15 07:24, Tomas Hozza wrote:
> On 02/24/2015 05:26 PM, Jim Alles wrote:
>> You must have a very small network and very special
>> requirements?
> It was for dhcp client testing purposes.
>> From the man pages for dhcp-range:
>> 
>> Enable the DHCP server. Addresses will be given out from the
>> range <start-addr> to <end-addr> and from statically defined
>> addresses given in *dhcp-host *options. If the lease time is
>> given, then leases will be given for that length of time. The
>> lease time is in seconds, or minutes (eg 45m) or hours (eg 1h)
>> or "infinite". If not given, the default lease time is one hour.
>> 
>> The minimum lease time is two minutes.
> Ahh, Thank you. I was looking for "2m" and didn't see this
> statement.
>> For IPv6 ranges, the lease time maybe "deprecated"; this sets the
>> preferred lifetime sent in a DHCP lease or router advertisement
>> to zero, which causes clients to use other addresses, if
>> available, for new connections as a prelude to renumbering.
>> 
>> On Tue, Feb 24, 2015 at 10:11 AM, Tomas Hozza <thozza at redhat.com>
>> wrote:
>> 
>>> Hi.
>>> 
>>> Even though I configure dnsmasq to git leases e.g. for 1 minute
>>> it always configures it self with 2m lease time. I was not able
>>> to get under 2m, however if the value is greater than 2m,
>>> dnsmasq configures itself correctly.
>>> 
>>> using: ... dhcp-range=192.168.99.2,192.168.99.254,1m 
>>> dhcp-range=fd00:dead:beef:55::100,fd00:dead:beef:55::1ff,1m 
>>> ...
>>> 
>>> gives: ... dnsmasq-dhcp: DHCP, IP range 192.168.99.2 --
>>> 192.168.99.254, lease time 2m dnsmasq-dhcp: DHCPv6, IP range
>>> fd00:dead:beef:55::100 -- fd00:dead:beef:55::1ff, lease time
>>> 2m ...
>>> 
>>> Why it is so? Seems like a bug IMHO.
>>> 
>>> Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer
>>> Experience
>>> 
>>> PGP: 1D9F3C2D Red Hat Inc.
>>> http://cz.redhat.com
> 
> Anyway, my question why is this so and why is the user
> hard-limited? Is there some technical reason behind the limit?

It was a long time ago, and I can't remember the details, but I know
short leases caused client problems. There's a comment in the code

                  /* Leases of a minute or less confuse
                     some clients, notably Apple's */

So that gives somewhere to start looking.


Cheers,

Simon.


> 
> Thanks!
> 
> Regards,
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlTuTqQACgkQKPyGmiibgrdjzACgolDCVJxxCB8qis0MTRoxTiXE
vAQAn32DtJsSv8lEIp+MA+ELGmBsEHKT
=SYev
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list