Friday, April 8, 2016

What is a good DHCP lease timeout configuration




I have generally seen that DHCP lease times are quite long (a day plus) on most defaults. I have a client that seems to have the following problem. They have a DHCP server in a router that is near-saturation (say in a normal work day 80-85% of the potential IPs are used). Occasionally they restart their router. When that happens it seems that the the router loses its table of assigned IPs, so it assigns IPs anew (of course).



The problem is that quite often there is a client on the LAN which has the IP already and is going to hold it for a day (the current timeout length), causing an IP conflict and connectivity issues for those two machines.



The obvious solution is to make a very short lease time, but since I'm only a hobbyist when it comes to networking, there may be more to DHCP that I don't understand.



Is the above a reasonable evaluation of the situation (at least with lower-end equipment) and does a lower lease time (say a half-hour) make sense in this case?


Answer



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.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...