Configure Leasetime
Simon Hobson
dhcp at thehobsons.co.uk
Fri Mar 24 23:22:03 UTC 2006
Chinmaya S. Narayana Reddy wrote:
>I have to configure leasetime for each device, if the device is not
>configured,
>then I would like to use a default/global value.
>
>To achieve this I tried following configuration
>
>--- dhcpd.conf ---
>default-lease-time 3600; # one hour lease
>max-lease-time 864000; # 7days
>
>host MACADDRESS {
> ...
> option dhcp-lease-time 86400; # 1day
>}
>
>
>When I boot my device, 1 hour lease is given out, I expected 1day.
>
>I tried this one too (eliminating default-lease-time statement)
>--- dhcpd.conf ---
>max-lease-time 864000; # 7days
>
>host MACADDRESS {
> ...
> option dhcp-lease-time 86400; # 1day
>}
>
>
>Now my device gets 12hours lease.
>
>Can anyone please tell me how I can configure this?
Try setting max, min, and default lease times. Default is the value
to be used if the client doesn't specify one, otherwise the client
supplied value is used. Min and Max are lower and upper bounds on
allowable leases.
If you have a number of clients to set, then you can save some space
by using a group :
group onehourclients {
min-lease-time 3600 ;
max-lease-time 3600 ;
host a { ... }
host b { ... }
}
More information about the dhcp-users
mailing list