Join Ed Liberman for an in-depth discussion in this video DHCP overview, part of Windows Server 2016: DHCP.
- [Instructor] Before deploying any networking service role out onto your network, it's important that you understand what that networking service is going to provide, and what kind of effect it's going to have in your network environment. So here I'd like to talk to you about the DHCP service. Now really, it's a server role in Windows Server 2016. And as we'll see here, it's actually a protocol meaning DHCP itself is not a Microsoft thing it is a generic protocol.
So the letters D-H-C-P actually stand for the Dynamic Host Configuration Protocol. And this is a protocol that's used to simplify the configuration of IP clients out on your network. And reducing the complexity, and amount of administrative work, by using automatic IP configuration. So the real simplified definition is it's a way of dynamically, or automatically configuring IP addresses out on your clients.
So what are some of the benefits of using DHCP versus not using it? Well, one real obvious benefit is when using DHCP, all your clients are going to get their IP addresses automatically. Whereas without DHCP you have to go around to every single client and type it in, one by one. Which is a lot of work. Now besides, the workload involved the other advantages to having everything done dynamically, is that you will get a consisting configuration every time.
And, if there are any changes to the configuration the clients will get that update automatically. Whereas again, if you're doing things without DHCP, and you're typing everything in manually you may have a typo at any given machine just a simple slip of the keyboard. And then also, if there's a change to the configuration there's always the possibility that a client won't get that change and then you'll have communication issues. Now here I'd like to go over the actual DHCP Lease Generation process.
Now it is a four step process. Which is commonly known as DORA. So if you've ever heard anybody talking about the DORA process on your network, they're talking about DHCP Lease Generation. It's four steps, and each of the four steps begin with the letters D-O-R-A. So step one, in the process is you have a client who is in need of an IP address. And so what it's going to do is it's going to try to discover the presence of a DHCP server. So step one is actually called Discover.
And the packets that are actually put out on the network if you were to use some kind of a network sniffer and you were watching the actual packets they're called DHCP Discover. That's the actual name. But this process goes pretty much like this. You have a client. The client doesn't have any IP address, so all it can do is pretty much using its Mac address with the network card it can broadcast out on the network and say, hey I'm a client and I'm looking for an IP address. Is there a DHCP server out there who could help me? So that's step one.
Step two is what's known as an Offer. And again, the packet would be called DHCP Offer. And this is where any and all DHCP servers that heard that DHCP Discover will then broadcast out and offer to say, yes, hi. I'm a DHCP server, here I am. And then it will look in its database of IP addresses and it will grab an available one and put it out there as an offer to say, here's an IP address. If you'd like to have it.
Now the reason we don't just stop there is because there's always the possibility that there might be multiple DHCP servers out on the network. If any others also put out an offer but then they hear from another DHCP server three's an offer they'll take their offer back. So there's kind of a whole timing thing. I don't want you to worry too much about it. Right now I just want you to know Step one is a client saying, hey, is there a DHCP server? Step two is, a DHCP server saying, yes, here I am and here's an offer of an IP address. Now the reason I was trying to avoid the word request earlier, is because that would actually be Step three.
That's the official title and the official packet name is DHCP Request. And this is where the client will broadcast back out to the DHCP server that it heard the offer from first saying, why yes, I would like that IP address. Thank you very much. And the final step would be the DHCP server who had that request come back to it, will then put out a DHCP ACK.
It's just A-C-K. But what it stands for is it's basically standing for I Acknowledge. I Acknowledge that you've requested this IP address and I'm telling you, you've got it. You now have that IP address. And along with that IP address the reason we call it a lease is because there will be a lease duration that will go with it. You can have it for a certain amount of time. And we'll get into that in just a moment. So basically, just to review very quickly the four steps. You have a client saying, hey, I need a DHCP server to give me an IP address.
Step two, DHCP server says, hi, I'm here. Here's an IP address if you want it. Step three, client says yes, I would like that IP address, thank you very much. Step four is server saying, okay, you've got it. It actually makes a notation in its own database to say this is an actual lease that I've given out now. And the client is good to go. Now I mentioned about a lease duration. So a client will get the IP address but it only gets to keep that IP address for a certain amount of time.
Well, because of that, we have to have a lease renewal process. And the renewal process is actually very simple. Since the client knows about the DHCP server at this point because it was given an IP address from a DHCP server. It knows about it, it could just go right back to that DHCP server and say, hey DHCP server. I'd like to request to renew the lease on this IP address. And then the server can respond back and acknowledge and say, yep, you got it. I'm going to renew you for a fresh lease.
Now when does this all happen? It happens at 50% of the lease duration. So basically, let's use a scenario here where we'll say that the client receives an eight day lease. And that happens to be the default, by the way. So as a client, I get an IP address, and I get it for eight days. After four days the client is going to say, hey DHCP server. I'd like to renew for a fresh eight days. Server will then say, okay, you've got it.
Now you have a fresh eight days to start all over again. But again, after only four more days it'll try the renewal process again. Now, where it gets a little bit tricky is what happens if the server does not respond? 'Cause I get that IP address for eight days. If I only get it for four and then I say, hey, I want to renew and there's no server there to respond, well guess what? I still have four days left. So, we're okay. Now what'll happen is with half of that remaining amount so two more days.
So we're now at 75% of the original lease duration. The client will try again, and say, hey. DHCP server, I'd like to renew. If the DHCP server does not respond no problem at all, I still have two days left. So then half of that which would be one more day, the client will try again. At this point, we are at 87.5% of the original lease duration. The client will say, hey. DHCP server, I'd like to renew. If it does not get a response at that point, at this point, the magical 87.5% then the client will attempt the full DHCP lease generation process.
In other words, it will go back out to a full DORA process and say, hey, is there any DHCP server that can help me out with an IP address? And if there is a response then the client will get the new IP address with the new lease, and everything is great. If there's still no server to respond then the client will do nothing more than basically just ride out the remainder of the lease that last day in this example. And, when that day is up it no longer has an IP address. And it will continue to do a regular DORA process to try to go ahead and get a new IP address from any DHCP server.
All right, so that's just kind of the high level basic 101 how does the DHCP protocol work. And, now that you know how it works, you can go ahead and implement it on your network.
- Installing the DHCP server roles
- Configuring DHCP
- Managing the DHCP database
- Securing DHCP
- Configuring advanced features