The DHCP process is critical for managing IP addresses on your network. In this video, you’ll learn about DHCP scopes, pools, address assignments, leases, and the DHCP renewal timers.
In a previous video, we described the DHCP process as seen from the perspective of the workstation. But what are the configuration settings that we need to make inside of the DHCP server itself? Well, first we’ll need an IP address range. We’ll need to understand exactly what IP addresses will be assigned by this particular DHCP server, and we’ll need the associated subnet mask for that IP address range.
We’ll also need to determine how long a workstation can hold on to the same IP address, and we’ll make that configuration setting under the lease duration. And we’ll also want to configure the DHCP server with DNS server settings so that your end stations can be configured with an appropriate DNS server IP address, a default gateway setting. And if you’re using things like voice over IP servers, it’d be nice to include the options for that along with all of the other IP configurations.
When the DHCP server assigns an IP address to a device, it’s choosing an available address from a pool of addresses that you’ve previously configured inside of the DHCP server. For example, you might have one subnet pool that is 192.168.1.0/24, which means anything in that subnet can be assigned as an IP address from the DHCP server. These IP scopes are usually a very large contiguous range of IP addresses and your DHCP server simply pulls from any available address inside of that range. But there may be times when you’d like to set a DHCP reservation or exclude certain IP addresses from that range, and you can certainly create those exceptions within the DHCP server.
Here’s a DHCP server that’s running on a Windows Server device. This specifies the scope of 165.245.44.0, and underneath that scope we have a series of address pools, so we know what IP addresses will be assigned. We have address leases, so we can view what IP addresses have previously been assigned. We can configure IP reservations. So if a certain device should always receive the same IP address, we can configure that in that section of the DHCP server.
And we have scope options which allow us to configure additional parameters. For example, we might want to add the IP address of a voice over IP gateway so that all of the devices on your network would know exactly what IP address to contact.
If you’re using DHCP at home or in a small office, your DHCP server may not be on a Windows device. It may be on an embedded router. This is the web frontend to an embedded router that shows that the DHCP server is enabled. The start address on this network is 10.10.10.2, and the end address is 10.10.10.100. So we can expect this DHCP server to assign addresses starting with the .2 all the way up to .100.
This DHCP server specifies the address lease time in seconds, which is a bit unusual. But if we know that 86,400 seconds is the same as 24 hours, then this configuration works just fine. The gateway is configured as 10.10.10.1, and we have DNS configurations that will also be assigned to our local devices. So any device on your network that needs an IP address when it starts up will receive an address from this DHCP server with these specific configuration values.
For most devices connecting to a network and receiving a DHCP address, they’re receiving a dynamic assignment. This means that they could receive any IP address from that large pool of IP addresses that we’ve previously configured. And after your lease period has timed out, those addresses will be available for another person who connects to the network.
Many DHCP servers will also have an automatic assignment where they will keep a list of everyone who’s previously connected to the network, and if you happen to connect to the network again after a short period of time away, it will remember your previous assignment. And if that IP address is still available, it will assign you the same IP address you had originally.
You can also take this one step further by configuring a DHCP address reservation, which means that a device connecting to the network will always receive that same IP address and that IP address will never be given to a different device on the network. This is usually configured based on the MAC address or Media Access Control address, which is the burned in address on a network interface card. Every device has a unique MAC, address and that allows us to associate a device with a particular IP address. You might also see this referred to as a static DHCP assignment, static DHCP, a static assignment, or an IP reservation.
Here are some DHCP reservations in my DHCP server on a SoHo network. You can see a MAC address is listed along with an IP address, and the host name for this device is Prometheus. I have another device listed by MAC address. You can see that is a different MAC address than the original. It gets a different IP address, and the host name for that device is Odyssey. This means that when Prometheus starts up, it will always receive the IP address of 192.168.1.6, and that IP address will never be assigned to another device on this network.
When a device is dynamically assigned to DHCP address, it’s a temporary assignment. After a certain amount of time, that device must check in again to the DHCP server to let it know that it is still working with that same IP address, or the lease will time out and that IP address will be available for others. The amount of time in that lease is determined by the configuration within your DHCP server. We saw on my DHCP server the lease times are 24 hours, but you can administratively configure that to be any value you’d like.
There’s also a reallocation process that can occur. If you reboot a device or you leave the network and then return to the network, it will renew that lease and continue using the same IP address. And there may be times when you would like to administratively or manually release that IP address, hand it back to the DHCP server, and then either leave the network or request a new address from the DHCP server.
When a device receives an IP address from a DHCP server, there’s a timer that starts that is the length of the lease time that’s configured for that DHCP server. We mentioned earlier that once that lease timer has expired, that IP address is returned to the DHCP server and it can be assigned to others. But during that lease process, there are other timers you should know about.
One is called the T1 timer. This checks in with the DHCP server halfway through the lease time. So if your lease time was eight days, this T1 timer, which is 50% of the lease time by default, will check in after four days and let the DHCP server know that we would like to keep this IP address for another lease duration. At that point, the timer resets to eight days and we start counting down again.
There may be times, though, that a DHCP server is unavailable and you’re not able to check in with that T1 timer after four days. If that DHCP server never returns to the network, then the lease time continues to count down. And once you get to 7/8 of that lease time, or 87 and 1/2 percent of that lease time, it will try rebinding with any other DHCP server that you might have on the network so that it can retain that IP address. This is the T2 timer, and it gives every device on the network a chance to keep its IP address by rebinding with a redundant DHCP server.
Let’s look visually at how this DHCP process might occur. Let’s say in this particular network the lease time is 8 days in length. That means your T1 timer, if it’s 50% of that time, would be four days, and a 7/8 timer of T2 would be 7 days in length. So let’s look at this device which has been given an IP address and each one of these blocks is a single day. Somewhere after the fourth day, or after 50% of this time has gone by and the T1 timer has gone off, it will want to renew this IP address by contacting the DHCP server and letting it know that it would like to renew that particular lease. Once that process is complete, the timer restarts, and we have another DHCP lease process that will occur.
However, during the second lease process, our original DHCP server is no longer available, so we’re not able to check in after that T1 timer has completed. This means that we’ll go all the way into the rebinding period with the T2 timer, or in this particular case after seven days have elapsed. Once we’re able to contact that redundant DHCP server after the T2 timer has expired, the process then begins again, starting at day 1, and we have another eight days in our lease.