Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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;
}
share|improve this question

2 Answers 2

up vote 3 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 computer.how 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
1  
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

Your Answer

 
discard

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.