How can i configure ISC DHCP server to infinite lease time for all clients?
man dhcpd:
Lease Lengths DHCP leases can be assigned almost any length from zero seconds to infinity. What lease length makes sense for any given subnet, or for any given installation, will vary depending on the kinds of hosts being served.
but dhcpd completely not works with the zero lease-time value:
ddns-update-style none;
#option domain-name "dobisel.com";
option domain-name-servers 8.8.8.8,8.8.4.4;
default-lease-time 0; <---- here
max-lease-time 0; <----- here
authoritative;
log-facility local7;
subnet 192.168.11.0 netmask 255.255.255.240 {
range 192.168.11.2 192.168.11.14;
option routers 192.168.11.1;
option broadcast-address 192.168.11.15;
option subnet-mask 255.255.255.240;
}
It is not mentioned explicitly in the manpage, but setting lease time to -1 in any of the options you mention,
is effectively disabling the expiry time of the leases, so their expiration will be effectively set "to infinity".
You should not configure an infinite lease time. The reason of having DHCP is to have a central management and flexibility. Making the lease time infinite, you will kill the flexibility.
I would suggest specifying lease times in seconds. So where:
default-lease-time 600;
This being ten minutes
max-lease-time 7200;
This being two hours
try:
default-lease-time 86400;
This being one day
max-lease-time 604800;
This being one week
You could try 2592000
which is 30 days
.I wouldn't exceed that.