Learn how DHCP leases get renewed.
- [Instructor] When a client gets his IP address from a DHCP server, we called it a DHCP lease. And if you think of the term lease, it's almost kind of like you're renting it. You only get to use it for a specified amount of time. It's for that reason, we actually have something called the DHCP lease renewal process. Now the renewal process is actually quite simple, and the reason why is because the client already knows about the DHCP server, so there's no reason to go through a DORA process.
All it's going to do is go right back to the DHCP server with a request. So we're going to jump right to the R part to DORA and it's going to say hey DHCP server, I'd like to request to renew the lease on this IP address. And then the second part, it's just a two step process, is the server responding back with an acknowledgement to say yup, you got it. I'm going to renew your lease. You can now have it for, again, some X amount of time.
And that really is how simple the lease renewal process is. What is probably more important to understand, is not the obvious two step process of saying hey can I renew, yes you can. But when does it happen? Well a client will attempt to renew its lease after 50% of the lease duration has expired. Okay so it doesn't just wait unit the full lease has been used up, because in that case, what if the DHCP server was down right in that moment? So we actually do this at 50%.
So let me give you a scenario. The default DHCP lease time is eight days. So if we were to give an eight day lease out to a client, then after four days, it's going to reach back out to the DHCP server and say hey, I'd like to refresh or renew this lease for a fresh eight days. All right, and if the DHCP server responds, great, we got a fresh eight days. And then four days in again it will try, but if the DHCP server is not available when it attempts to renew, well the client's only used up 50% of its lease, so it just continues to use that IP address.
All right, and it uses it until another 50% of the remaining time has passed. All right, so again, going back to the eight day scenario. We try to renew at four days, and if we're not able to do that, we have four days left. Which means half of that, we're going to try again in two days. And if we can't do that again, we'll try again in half of the remaining two days, which is one day. And it will keep doing this every half life, so to speak, until it gets to 87.5% of the lease being expired.
At this point, it will attempt to do the full DHCP lease generation process. Okay it'll go back out and say, it's thinking to itself, wow I'm down to only 12 and a half percent of my lease time left, and I don't want to lose this IP address. So it just kind of yells out with a discover all over again to say is there any DHCP server who's available to help me out here? And hopefully it finds a DHCP server and if it does, everything's great, but if it doesn't, then at that point, it will basically just hold on till it gets to 100%.
At which point it loses the IP address, and it just starts all over again with the full lease generation process hoping to get a new IP address. And that's how DHCP lease renewal work.
Released
2/5/2019- What is Dynamic Host Configuration Protocol (DHCP)?
- Setting up DHCP
- Securing and troubleshooting DHCP
- Configuring a DHCP relay agent
- Deploying Domain Name System (DNS)
- Creating stub zones and reverse lookup zones
- Testing queries
- DNS security
Share this video
Embed this video
Video: Lease renewal