What is a good DHCP lease timeout configuration

Solution 1:

You should consider replacing the DHCP server, as it is obviously broken. DHCP servers should keep lease information between restarts and preferably also probe addresses before releasing them into the pool to avoid address duplication.

If that is not an option you can drop the lease length. As long as the DHCP server can handle the churn it should work, but short leases will cause a small increase the amount of broadcast traffic on your network.

Short leases are primarily a problem when you have clients disconnecting and reconnecting a lot, for example in WiFi networks. Very short leases (less than 1 minute) can cause weird problems with some DHCP clients that have time-outs longer than the lease.

Solution 2:

Fix the real problem. DHCP servers should remember leases between restarts and should ping test IPs before handing them out (to make reasonably sure they aren't already in use).

Windows Server comes with a DHCP server. Any *nix platform can run ISC DHCPd. Both are pretty good choices and will easily accomplish the above requirements.

We have DHCP leases set to 8 days for IPv4, and 2 weeks for IPv6. Whatever you set, remember clients will renew after 1/2 the time, so if you set it to 8 hours, it'll renew every 4 hours (continuing with double declining time upon failed requests).


Solution 3:

Your routers DHCP server implementation may be able to do "DHCP collision detect". Check this out and enable it if possible. This is the easiest fix.

Shorter lease-times will definitely help but are not a 100% guarantee. I would not go below 1 hour though. In my experience many network-programs don't really like it the computer re-acquires DHCP while the program is running (e.g. Outlook2003 is notorious for this, 2007 seems better behaved). Doing it every 5 minutes may be quite noticable to the users.

If the DHCP scope is large enough for all computers on-site and the majority of those computers is fixed on-site it may be feasible to assign the regular systems a fixed ip-address through DHCP reservation, leaving only a very small pool of dynamically assigned addresses for guests and/or laptops that are infrequent in the office. The reserved addresses will not be subject to collisions. Of course: Someone has to maintain that reservation list......

If you have another DHCP server (Windows/Linux or another router) on your WAN that is able to do collision detect you may consider adding this LAN as an additional DHCP scope there and reconfigure the site-router to forward DHCP to this one.

If all else fails you will have to setup a separate DHCP server. For up to about 200 users you don't really need a big Windows server or a Linux box. You can get away with something like TFTPD32 which is free, easy to setup and will do collision detect as well. (And it will run on a desktop OS if costs are an issue. If you happen to have a PC lying around that can be left "always on"). (And, see previous paragraph, this can be located on another site.)


Solution 4:

A lease time of 30 minutes will be fine for a few hundred of clients. If you have under 100 clients you can use 5 or 10 minutes.


Solution 5:

The only real issue I would consider is server load. Since DHCP is a relatively light service compared to current processor/network power, that consideration is becoming much less important.

This is of course all relative to the size of your network. A class C full of clients is one thing, 5 class As is a completely different beast.

Try setting it to the 30 minutes you mentioned, and see how your router reacts as far as processor load.

More reading available here: http://www.dhcp-handbook.com/dhcp_faq.html (Look at Question 35)

Tags:

Dhcp