DHCP Lease Time – What is it and How does it work?

The DHCP Lease Time, an important part of the DHCP settings. But what is it, how long should you set it or can you leave it on the default settings? In this article, I will explain how it works and what the recommended settings are for your network.

Every network has it, a DHCP Server. It may be built into your router or you have a server that is handling the DHCP Leases. Without it, you would have to assign every network device (computer, mobile phone, network printer) manually an IP Address.

A DHCP server does this task automatically for you ensuring that every device gets a unique IP Address to connect to the network. Now that address is leased to the client for a specific amount of time, the DHCP Lease Time.

What is DHCP Lease Time?

In short, DHCP Lease Time is the amount of time in minutes or seconds a network device can use an IP Address in a network. The IP Address is reserved for that device until the reservation expires.

For computers and other network devices, to communicate on a network they need a unique IP Address. You can compare an Ip Address to the postal address of your house. There can’t be houses with the same address, otherwise, your mail might be delivered to the wrong house.

IP Addresses work the same way and in a network, a DHCP server is responsible for assigning every device a unique address. The Lease Time indicates how long a device is allowed to use that IP Address. Now, this is important because the amount of available IP Addresses is limited in a network. For a typical home network, you have a DHCP Pool of 200 Ip Addresses.

How does DHCP Lease Work?

Before we go into detail what the optimal DHCP lease time is, lets first look into how DHCP Lease works. When your computer powers up it doesn’t have an IP Address so it will need to communicate with the DHCP server for an IP Address.

If the computer doesn’t have a reservation yet for an address it will begin a new lease of the IP Address. But when it already has an active lease standing out, then it will confirm the availability of it and resume the lease.

Every DHCP lease life cycle will follow a specific pattern, it starts with the initial lease, a normal operation period, a renewal period and if the renewal fails a rebinding period.

  • At day 0 it will request a new lease
  • During normal operation, the client can use the address
  • Halfway the lease time it will try to renew the lease so it can keep the same IP address.
  • If renewing failed (DHCP server is offline for example), it will try to extend the current lease with any active DHCP Server.
DHCP Lease Time

Now let’s say you have set the lease time to 8 days (pretty long, but common in an enterprise network for wired devices). After 4 days the network device will try to renew the lease. On day 5 it is able to contact the DHCP server and renew the current lease.

At that point, the DHCP Lease life cycle will start over, so the timers (T1 and T2) will reset and the lease is valid for another 8 days.

DHCP Lease Life Cycle

Recommend DHCP Lease Time

So now we know how the DHCP lease works, how long should you set it? It depends on the situation but that are some guidelines you can use to find the optimal lease time for your network:

  • For wired devices, a lease time of 8 days is a typical period. Wired devices won’t leave the network often, so there is no reason to create a shorter period. A shorter period only increases the DHCP-related network traffic.
  • Wireless devices tend to leave the network pretty often and can stay away for a couple of days. So a smaller lease of 24 hours is pretty common. This way regular devices will keep mostly the same IP Address.
  • For guest networks and hotspots, you want a short lease time. Hotspots an hour max, while for Office guest networks 8 hours will work fine.
  • Always make sure 20% of the DHCP pool remains available. To calculate the potential amount of devices in the network and add 20%. Increase the pool size or lower the DHCP Lease Time to make it fit.

Home networks

For a home network, the default 24 hours (1440 minutes or 86400 seconds) is fine. The amount of devices in a home network is limited, maybe up to 3 per household member where your pool of IP addresses is around the 200 addresses.

But a higher lease time of 8 days would work evenly good. The reason is simple, the amount of network devices in a home network is pretty much static. The occasional guest won’t be a problem with the number of available IP Addresses.

Guest networks and hotspots

The problem with guest networks and hotspots is that you will have a lot of devices that are connected for only a short amount of time and then leaving. They might never come back, so there is no reason for a high lease time.

But don’t want to set it to low, because this will only create a lot of DHCP-Related traffic. So first you need to know how much IP Address you have available and how much visitors you expect per day or per hour.

Example case

If you have a coffee bar and you get 400 visitors a day. They stay on average 30 to 60 minutes and you have a DHCP Pool of 200 IP Address (192.168.0.10 – 192.168.0.210 for example).

When you leave the DHCP Lease Time on the default 24 hours (1440 minutes) after 200 guest no other guest can use the free wifi network. Because all the 200 IP Addresses are reserved for the first 200 guests.

So in this case you want to lower the DHCP Lease Time to one hour for example. This way the reservation is released soon enough for the other guests:

DHCP Lease Time Example

With a lease time one hour, the client will try to renew the lease after 30 minutes. At 35 min it contacts the DHCP server to extend/renew the lease. It’s granted so the timers reset, a new lease is acquired for another 60 minutes. In total, the IP Address is reserved for 95 minutes. With 200 addresses available you can have 130 guests per hour on average on your network.

Static IP Address and DHCP Pool

Permanent devices in a network can have a fixed IP Address. This is useful if you have to set Port Forwarding to a device or if you need to manage the device. Typically network devices like routers, switches, and network printers have a fixed or static IP Address.

If you leave a printer on DHCP mode, it might get a new IP Address if you turn it on after a long time of period (after a holiday for example). If this happens you might have to re-install the printer on your computer, because your computer doesn’t know anymore where to find the printer.

So always leave some room in your DHCP Pool for fixed network devices. Typically you start the DHCP Pool at 192.168.0.10 and let it end at 192.168.0.200. This leaves you with enough room for the static Ip Address. (So you can assign your printer the IP Address 192.168.0.201 for example).

Conclusion

For home networks, you don’t have to change the DHCP Lease time. Just leave it on default and you will be fine. Small Offices, Corporate Networks and Guest Networks, on the other hand, will need some planning when settings up the DHCP Server.

Also, make sure to take a look into DNS Scavenging when you are settings up DHCP and DNS servers in an enterprise network.

You may also like:

23 thoughts on “DHCP Lease Time – What is it and How does it work?”

  1. Ruud, I hope you can give me your thoughts regarding the following. I see My IPv4 lease (Spectrum) goes for 3 days and my IPv6 for 7 days. I turn my connection (all TV and Internet) everynight OFF from the wall, at around 12AM. I turn it ON next day at around 11AM or 1PM. Could this be the reason I have had problems with my AmTV but not my Internet ?! And the cable box stopped setting at App or something like that and would not be able to watch tv !! I did replace the cable box for the other unused one in another room and …. everything works fine. My internet really never left me. I was wondering if Spectrum was just giving me hell for unplugging everything at night!? and trying to give me a lesson! ? Am I doing anything wrong? Maybe spoiling Spectrum provider’s plans? A granny here.

    • If internet is working fine, then it’s not a network related issue. Try to turn on the Spectrum first, give it 5min and then turn-on / plug-in the TV. Or just leave the Spectrum on at night.

  2. Thanks – Now I understand why I have to keep re-installing my Scanner Driver – It looses it’s lease and the Driver isn’t smart enough to re-find the scanner. 🙂

  3. One thing I miss in this excellent article is the use of DHCP reservations. Most DHCP servers offer the possibility bind IP addresses to a MAC-address in a static fashion, keeping administration of those devices centralized.

  4. Hi,
    The article is really great but I have difficulties with Math above if you can help me please how did you get 130 guests per one hour in steps.
    I miss my Math classes :'(
    My mail is stefa.konsta@gmail.com
    Thanks in advance Ruud

    • Hi Stefan,

      200 available addresses divided by an average lease time of 95 minutes equals 2.1 addresses per minute. 2.1 x 60 = 126 available addresses per hour.

      • Oh, it’s not Math only it’s more logic.
        Thanks a lot, Rudy stay well and continue with great work.
        All the best

  5. Great one, Apologies, Please correct if I am missing something here. Why at the end of Day 5 the renewal takes(Isn’t it at the 50% of the lease, i.e on the start of the 4th day ) place if 8 days lease time. And seen mentioned same at 35 mins instead of half i.e 30 mins time stamp the renew takes place?

    • This is purely an example to illustrate what happens with the lease if the device isn’t able to renew on the 4th day. If you have a device running 24/7, then it will renew on the 4th day (if you have a lease time of 8 days) But a notebook for example isn’t always connected to the network, so it can take a day more before it renews.

  6. I would suggest updating this article to include how this the renew process communicates on the network. Is the renew a broadcast or unicast. I think most will assume it is a like DORA and use broadcast to accomplish renew. It would also be helpful to include more details about when a dhcp server is unreachable, how will the client proceed? How does the client know that a server isn’t replying? Also, how does DHCP Relay effect this process? Thanks

  7. I was disconnected a lot, and my modem take hours to reconnected again. Problem was fixed by comcast, by removing a filter that somebody installed on the pole outside. Trying to fix this problem, I read on internet, to increase the lease time on the modem On LAN Setup I set it to 1382400 seconds (16 days) but after reading this, I set it to 691200 seconds, 8 days. I was thinking that, when this lease expire, my modem will turn off and re-start again, and if I am in the middle of movie, it will say ” no internet connection” until connected again. Good to know that if i set it to 1 day or less, I will not loose connection in rebooting process, and I keep the same IP, even if I stay connected longer then the lease time.
    On printer static IP address example, you say the pool is from .10 to .200 . Should it be between these to number? like, .199 or .200? .201 is outside these numbers. Or Static IP MUST be after my pool of addresses? Just starting to learn about network.

    • You need to give your printer an IP Address outside the pool that you created. The pool is used to dynamically assign an IP Address to a random client. So fixed IP Addresses should be outside the pool, otherwise, the same IP Address can be used twice which will cause a conflict in your network.

  8. Hi, I’m a total noob in network issues but thanks to your site I could solve a problem I was having with the IP leasing time. Very nice and didatic article!

    I have a question though: I set my router to a 24 hour leasing time, but the router keeps showing my main PC (desk2040011, wired) leasing time will expire in “58 minutes and 11 seconds”? (see link below. Mobile Phone and secondary PC (desk2040010, wired) show the right leasing time). The desk2040011 Windows 7 local connection status screen shows the correct IP leasing time (24 hours) and right now the connection has been OK for much more than 1 hour. The “58 minutes and 11 seconds” message doesn’t change, even after almost 4 hours. Maybe a router bug?

    Any help will be greatly appreciated. Thanks.

    https://imgur.com/a/Kostapw

  9. the article was great, i had a question, it would be great if you could help me. i am a student and the wifi in my dorm gets disconnected frequently so i bought a router and im am not able to receive internet yet the device is connceted. the server uses DHCP IP, when normally connceted through LAN we are supposed to install a configuration program.
    https://cat.eduroam.org/?idp=366
    the link for the program is given above.
    the link for the dormitory internet service provider is given below
    http://liane.tul.cz/en/Main_Page
    what should i do inorder to surpass this and get internet access to my connceted router.

    • That is not possible from the app. You will need to a controller for this.

      Sorry replied to the wrong comment.

      What you want to do isn’t going to work. The Eduroam is the closest environment, so adding your own router or access point won’t work. Do you have an idea why you are getting disconnected? Is’t a range issue (is your signal too weak) or a network related issue?

  10. This is a good article with good information and good examples.

    There are a few typos. “In sort,” should be “In short,”. “At they 5” should be “At day 5,” with a comma. “The occasinal quest” should be “The occasional guest”. Some of your sentences start with prepositional phrases, which should be followed by a comma. For example, “After 4 days”, “At day 0”, “During normal operation”, “For home networks”, etc. should all be followed by commas.

Leave a Comment

0 Shares
Tweet
Pin
Share
Share