[Dnsmasq-discuss] question on lease expire times

Simon Kelley simon at thekelleys.org.uk
Tue Mar 9 22:11:14 GMT 2010


Leonardo Rodrigues wrote:
>      Hi,
> 
>      with ISC DHCP i can have two expire times on the leases:
> 
>    default-lease-time 86400;
>    max-lease-time 259200;
> 
> 
>      the default-lease-time is the one sent to the client ... and the 
> max-lease-time is the one used to keep to calculate the expire time of 
> the leases that will be written on the leases file.
> 
>      is that possible to something similar to these 2 values for the 
> lease expire times ? Actually i can have only one on the dhcp-range 
> parameter, which is sent to the client AND used to calculate the expire 
> time and write on the leases file.
> 
> 
My reading of the dhcpd man page is a bit different:

        default-lease-time time;

        Time should be the length in seconds that will be assigned
        to a lease if the client requesting the lease does not ask
        for a specific expiration time.

        The max-lease-time statement

         max-lease-time time;

        Time  should be the maximum length in seconds that will be
        assigned to a lease if the  client  requesting  the  lease
        asks for a specific expiration time.



So max-lease-time is an upper bound applied to a the requested lease 
time, and default-lease-time is the value used if the client doesn't ask 
for a particular time. You are right that dnsmasq has only one parameter 
which is used for both of these.

There are yet more time values, which are the time before the client 
should attempt to renew the lease, and the time before it should start 
to look for a new DHCP server if the lease can't be renewed. These are 
fixed by dnsmasq to be 1/2 the length of the lease and 7/8ths the length 
of the lease respectively. That's pretty conventional.


Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list