Update: Almost 2 years after I wrote this article, it remains one of the most popular on the website, so I put together a brief video explaining what is written below, for the more visual learners out there. Enjoy! 🙂
Original post below:
When you’re initially setting up a router, one of the things you might skip over is the DHCP Lease Time setting. It’s typically measured in minutes, but how long should it be set for? What are the advantages or disadvantages of longer or shorter lease times?
In the average home router, your lease time is set for about 24 hours (1440 minutes). Some people set 8 hour leases, some prefer up to a week! The DHCP lease is how long a device reserves an IP address on your network. The DHCP reservation is the key. The device can leave the network, but the reservation can still be in place, depending on how long you set the lease time.
It’s a little confusing, so let’s use a few real world examples. Imagine you’re the IT Guy for a dentist’s office. Let’s say you have 2 routers – one for Internal use, and one being used as a public hotspot. On the internal router, things aren’t going to change too often. Even if you are pretty lenient and you let employees use their cell phones on the internal wi-fi (we can get in to why you might not want to do that another time), you can probably get away with long DHCP lease times, because new devices are not being introduced to the network on a regular basis. Workstations, tablets, laptops, and employee devices are generally the same from day to day. As long as you have enough IP addresses to handle the volume of devices, you’re fine. If employee Mary has a 24 hour lease, and she comes in the next morning, her phone will likely still be on its initial lease and keep the same IP address. If her lease expired, she will only be able to get a new address if there are unassigned addresses left in the pool.
When running a public hotspot, however, you can expect to see a lot of turnover. Different patients come in to the waiting room every few minutes. Let’s say that you’ve noticed slow downs to your business’ internet access when more than 10 people are connected in the waiting room at one time. So, in order to make sure your employees can do their job without disruption, you set the public hot spot to DHCP pool of 10 addresses, just to make absolutely certain no more than 10 devices could be allowed on at one time. If you have a DHCP lease time of 24 hours, then the first 10 people to come in that day will get a connection, but nobody else for the rest of the day can connect, because all of the spots are already reserved. In a case like this, your options are to reduce the DHCP lease time, or increase the DHCP address pool. Because you don’t want too many concurrent users simultaneously hammering away at your network, you would want to decrease the lease time, something from 60-90 minutes would likely suffice.
Creating an even lower DHCP time is possible – but if you did something extreme like setting it to 1 minute, it is very likely that it would cause interruptions in service, and noticeable connectivity problems for the users being dropped and having to request new addresses. It would also be taxing on the router itself, and likely bog down other aspects of the routers performance.
For the majority of cases, a 24 hour (1440 minute) lease is sufficient, but you could do a 5 day (7200 minute) lease, or even higher if your router supports it, but at that point, you could consider disabling DHCP and configuring static addresses for all of your workstations.