Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 "";
option domain-name-servers,;
default-lease-time 0; <---- here
max-lease-time 0; <----- here
log-facility local7;

subnet netmask {
  option routers;
  option broadcast-address;
  option subnet-mask;
share|improve this question
up vote 10 down vote accepted

It is not mentioned explicitly in the manpage, but setting lease time to -1 in any of the options you mention,

default-lease-time -1;
max-lease-time -1;

is effectively disabling the expiry time of the leases, so their expiration will be effectively set "to infinity".

share|improve this answer

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.

share|improve this answer
i want to users join my network without any configuration and communicate each other by dedicated ip address for ever. this is simplicity, automation and stability. just remember a morning in your office you cannot view a shared-folder on a computer because of lease-expiration of a can i forget automation and stability on the way of flexibility ? – pylover May 10 '13 at 20:25
Why don't you use static leases? – Mircea Vutcovici May 10 '13 at 20:29
ok, so i need to spend some times to gathering mac addresses, and configuring associated address for each. – pylover May 10 '13 at 20:31
You could create a script that is adding all new hosts to the static lease list. This script could send you an email when you run out of IP addresses in that pool. Or send you an email each time a new IP/MAC was detected in the network. In this way you have the convenience of DHCP, you have the same IP assigned to the same NIC. And you have full control to change all this in a instant if you need it, and you can have static IPs too if you must. Modern DHCP server can be instructed to send an ARP request before assigning a lease for an IP. – Mircea Vutcovici Nov 10 '14 at 14:50
Or maybe his idea is a good one. He just wants to attribute IP addresses easily. If the DHCP range becomes completely full my guess is he could make a script to cleanup the dhcpd.leases files – Florent Aug 8 '15 at 18:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.