There are many options when configuring a DHCP server. In this video, you’ll learn about DHCP scopes, address allocation options, address reservations, and DHCP lease timers.
<< Previous Video: DHCP Addressing Overview Next: An Overview of NTP >>
If you’ve been tasked with configuring a DHCP server, then you’re going to be very familiar with configuring a scope inside of that server. This is usually a list of the IP addresses that will be available for devices on a particular IP subnet. This may also include subnet mask information. You’ll specify how long these IP addresses will be least for, and you may also include other IP configurations, such as a DNS server, a default gateway, WIN servers, and other IP address configuration details.
It’s also common to provide a grouping of IP addresses that will be leased out by the DHCP server. We call this a DHCP pool, and there’s usually a separate pool for each subnet that will be serviced by this DHCP server. It’s usually a large contiguous range of IP addresses, but of course, certain IP addresses can be excluded from this pool. Here’s a DHCP server that’s running on a Windows Server. This one is providing DHCP services for the SG1.SGC.LocalDomain, and these are the parameters for IP version 4 IP addresses in my DHCP server. I’ve created a single scope for this particular server, which is servicing 165.245.44.
The scope includes an address pool, so we have a list of available IP addresses. We have address leases, so we can see exactly what devices have been provided in IP address. I can provide reservation, so I can associate a single IP address with a Mac address and automatically configure that using DHCP, and then I have a section for scope options to provide additional details for these IP leases.
There are many different ways For a DHCP server to allocate IP addresses to these remote devices. One is through dynamic allocation. There’s a large IP address pool. As devices come onto the network, they are provided an IP address. If a device leaves the network and that particular lease expires, then that IP address is put back into the pool.
When that device comes back onto the network, it may or may not be provided the same IP address. One is simply chosen from the pool again and provided to that particular device. With an automatic allocation, a device that receives an IP address will always have that IP address associated with that device. The DHCP server is going to keep a list of all of the Mac addresses, and it’s going to permanently associate an IP address to that Mac address. That means if you were to leave the network and come back a month later, you’ll be assigned exactly the same IP address that you received a month ago.
You can also use DHCP to statically configure an IP address on a device. You may have a server or a router or a switch that you would like to have the IP address configured automatically when those devices start up, but you want those devices to always have exactly the same IP address. You can do that by associating the Mac address of that device with the IP address that you would like it to have. You might see this referred to as a static DHCP assignment, a static DHCP, an address or reservation, or an IP reservation.
I have a DHCP server running on my wireless router, and it also provides me with static allocations. It calls these address reservations, and you can see that I can add an IP address, I can even put in the name of a device, and then I can specify the Mac address of that device. So if this DHCP server sees this Mac address on the network, it will provide a DHCP address that’s specified in my address reservations, rather than pulling in a address from the available pool.
The IP addresses we’re assigned with DHCP are only temporary. There is an existing lease time that is associated with that IP address and the moment we receive that IP address, the lease begins counting down. There is an allocation then that’s initially made by the DHCP server. Your device is assigned a lease time, and this configuration for the lease time is usually made on the DHCP server configuration. If you were to reboot your computer, a re-allocation process tries to use the same IP address that it had originally if it’s still available, and if it is, it’s provided to your computer and the lease timer is reset.
Of course, you don’t have to wait for the timer to expire to give up that IP address. You can manually release the IP address on your device, and that IP address is now available to others in the pool. When we are first assigned an IP address, there’s a lease timer associated with this. There’s actually two timers that will start counting down. The first one is a T1 timer.
This is when your device will check in to be able to renew this IP address, and the T1 timer is 50% of the lease time by default. There’s another timer that is the T2 timer, which means if the original DHCP server is no longer available on the network, it will try rebinding this IP address with some other DHCP server that might be available. The T2 timer is 87 and 1/2 percent of the lease time or 7/8 of the lease time.
Let’s see how this lease timer might work. Let’s say that we’re on a laptop that has received an IP address or the lease time is eight days, and if we do the math, we know that it will try to perform a renewal timer after four days, because the T1 timer, by default, is 50%, and it will try rebinding or use the T2 timer after seven days. So if four days goes by and into the fifth day, this device will try to check back in and renew the T1 timer, and we can see here that it has updated itself on that original DHCP server, and now we start the timer back again. Now that DHCP server suddenly becomes unavailable, and we go past the 50% mark. Now when we finally get to the 87 and 1/2 percent or seven days into this particular lease, it will try to rebind itself with some remaining DHCP server on the network, and if that’s successful the process is reset and the timer begins counting forward again.