Configuring a DHCP server requires a number of different settings. In this video, you’ll learn about DHCP pool, address reservations, DHCP options, the lease process, and more.
In our previous video, we looked at the process of DHCP from the client’s perspective, but obviously there are a number of configurations that have to be made to the DHCP server itself. So in this video, we’ll look at some of those DHCP configuration settings.
When a device requests a DHCP address, the DHCP server refers to a list or a pool of addresses that are defined within a DHCP scope. This scope commonly includes the IP address range that will be handed out to the different devices on the network, as well as any addresses that should be excluded from the DHCP pool.
You also have your subnet mask as part of this scope. There are also lease durations so you know exactly how long these IP addresses will be available on that device. And there’s other options that you might include, such as the DNS servers that need to be configured, default gateways, and other additional optional settings such as Voice Over IP server IP addresses.
There are usually a pool of IP addresses created on a per-subnet basis, and each scope usually is responsible for providing that particular subnet’s IP addresses. Usually this is a contiguous pool. So you could tell the DHCP server to assign addresses 1 through 100 on this particular subnet. And then if you want to create exceptions to that, you can add them to the scope as well.
Here’s what this looks like on the Server Manager on Windows Server. This is part of the DHCP Server settings. And this particular DHCP server handles the network sg1.sgc.local. You can see there is a single scope available on this network. Its scope is 165.245.44.0, and within that scope you have a pool of IP addresses that would be handed out.
The address leases– any reservations in this IP address range. Reservations are for devices that will always receive the same IP address each time it is requested. And then scope options that you might include along with others on this scope. So if you need to make changes to the IP address pool or modify any of the DNS configurations or anything else associated with DHCP, you would do that all from this DHCP settings inside of this scope on the server.
This process happens automatically for the end stations. They make a request to the DHCP server and the server goes through the pool of addresses, picks one of those addresses, and hands it out to that device on the network. There’s a lease period associated with this address, so that device is able to use that IP address for only a limited amount of time. And if that lease is not renewed, that address is then returned to the pool, and someone else visiting that network can potentially be assigned that IP address.
An interesting feature of DHCP is that it will keep track of these MAC addresses and IP addresses that it’s pairing together. So if you visit this network again, the DHCP server will recognize that you’ve been here before. And if the IP address you used previously is still available in this pool, you will be assigned the same IP address you had on your original visit.
If you wanted to configure an IP address on a printer or a server and you wanted to confirm that that IP address would never change, you could manually configure those settings on that device. But this does not scale very well, especially in large networks. And if you need to make a change to those settings, you would need to manually visit all of those devices to make that configuration update.
Instead, you might want to lock in the IP addresses for those devices in the DHCP server using a feature known as address reservation. Inside the DHCP server, you would create a table that has the MAC addresses of these devices, such as your printers and your servers. And you would manually configure an IP address within the DHCP server that will always be assigned to that particular MAC address. If you look at your DHCP server, you might see this listed as static DHCP assignment, static DHCP, or an IP reservation.
Here’s the address registration process in one of my DHCP servers. This one has a couple of reservations that I’ve added. This one is 192.168.1.6. The device name is Prometheus, and you can see the MAC address of that device is listed in the reservation.
I also have another IP address– 192.168.1.9. This is the device known as Odyssey and it has, of course, a different MAC address. By adding these addresses into the DHCP server as a reservation, I can go to one central place to manage all of this information, yet still be assured that those devices will always receive the same IP address every time they’re started.
As we mentioned earlier, these DHCP addresses are not permanent. They are leased to these devices, and they’re only available for a temporary amount of time. This lease time is one that is configured in the DHCP server itself.
In some organizations, they might have a very long lease time. In other locations, it might be very short. You, as the DHCP administrator, get to determine what the lease time will be for your network.
If you were to look at the IP address configuration of your device, you would see the lease timer associated with the IP configurations. If you were to restart that device or unplug from the network and plug back in again, you would be reinitializing that DHCP process and potentially restarting that lease. Another nice feature of DHCP is, if you are turning off your system, it can release that IP address back into the pool so that other people would be able to use that IP address in the future.
This DHCP leasing process doesn’t wait until the entire lease is complete before trying to renew the lease. Instead, there are different timers that DHCP will use to be able to provide that renewal. The first timer is a T1 timer. This is set by default as 50% of the lease time. So no communication is going to occur between your device and the DHCP server until half of that lease is complete, at which time your device will attempt to communicate to the DHCP server and renew the lease.
But it could be that the original DHCP server is no longer operating properly or has been removed from the network. In that case, we go to a T2 timer. By default, the T2 timer is 87.5% of the lease time, or 7/8 of that lease time. With the T2 timer, your device will attempt to renew the lease with any available DHCP server that’s on the network.
Let’s say on your network that your DHCP server is set with a lease time of eight days. If we do the math, that means the T1 timer, since it’s 50% of the lease time, would be 4 days, and the T2 timer or rebinding timer would be 7/8 of that timeframe, or in this case, 7 days. So under normal operation, we’ll go along for four days without needing to check in with the DHCP server. But as soon as we hit that T1 timer, we’re going to begin a period where we will begin renewing with the original DHCP server.
So that renewal is sent to the server, and if that DHCP server is available, it will very quickly renew that lease. And we’ll have another four days where we can continue to operate without checking in again with the DHCP server. But let’s say at this point, that DHCP server is taken out of the network and is no longer available. That means we will go all the way through the renewal period without ever renewing the lease.
Once we hit the T2 timer or the rebinding period, your device will reach out to any DHCP server to try to renew that lease. And on your corporate network, there’s most certainly another DHCP server. And it will renew that lease, and the entire timing process starts over again.
We often think of DHCP as that automated IP address, subnet mask, and default gateway configuration. But there are other options that DHCP can configure as well, and we refer to those literally as DHCP options. This is a separate field in the DHCP process that allows us to configure other settings that are related to TCP/IP.
These options are listed in the Request For Comments– or the RFC– associated with DHCP. Back in the BOOTP days, we referred to these as vendor extensions. These DHCP options are associated with a number, and there are 254 usable options that could potentially be configured using DHCP.
The common configurations for DHCP would be the things that we would normally think about– the IP address, the subnet mask, the default gateway, and the DNS servers. And there may be times when you would like to add additional DHCP options to be configured on that device, but you have to make sure that the DHCP server supports that specific option. Not all DHCP servers support the ability to configure DHCP options. So you’ll want to check with your DHCP server to make sure that the options you need are supported by that server.
For example, you might have a Voice Over IP call server on your network, and you might want to add that as part of the DHCP configuration process. So option 129 is the DHCP option for the call server IP address. If you wanted to configure an HTTP proxy, you would use option 135. And there are many other DHCP options to choose from.
We’re looking again at the scope that’s configured within Windows Server under the DHCP Server options. And there is an option there for Server Options, and that refers back to those DHCP options. You can see a list of all of the numbered options within those server options. You can select any of those and define them within the DHCP server itself. Then when anybody connects to the network, not only will they receive the IP address, subnet mask, default gateway, and DNS settings, they’ll also receive any of the configurations that you’ve defined under DHCP Options.