DHCP Server Operations and IP Address Management
Network+ · Network Operations · By Super Admin
How DHCP servers assign IP addresses, configure scope options, handle client requests, and use DHCP relay to serve multiple network segments.
DHCP Server Functionality
DHCP servers assign IP addresses to hosts. This protocol gives us a much easier way to administer—by automatically providing IP information—than the alternative and tedious method known as static IP addressing or static assignment, where we have to address each host manually. It works well in any network environment, from tiny to huge, and allows all types of hardware to be employed as a DHCP server, including routers.
A DHCP server receives a request for IP information from a DHCP client using a broadcast. The DHCP server is configured by the administrator with what is called a pool of addresses that it uses for this purpose. When the administrator configures this pool, they can also set some addresses in the pool as "off limits." These are called IP exclusions or exclusion ranges. It means that these addresses cannot be assigned. An example might be the address of the router interface.
<img src="/question_assets/Network+/sg_c05f008.png" alt="A diagram of the D H C P client, and D H C P server. It includes a client broadcast, router A, router B, directed broadcast, server, and unicast."/>
<figcaption>DHCP client sends broadcasts looking for a DHCP server.</figcaption>
DHCP Relay Configuration
The only hitch is that if the DHCP server isn't on the same segment as the DHCP client, the broadcast won't be received by the server because, by default, routers won't forward broadcasts. You can configure your router interface to relay or forward the DHCP client requests. This is referred to as a DHCP relay. If we don't provide this service, our router would receive the DHCP client broadcast, promptly discard it, and the remote host would never receive an address—unless we added a DHCP server on every broadcast domain!
Router A is configured with the IP helper address command on interface E0 of the router. Whenever interface E0 receives a broadcast request, Router A will forward that request as a unicast (meaning instead of a broadcast, the packet now has the destination IP address of the DHCP server). You can configure Router A to forward these requests and even use multiple DHCP servers for redundancy, if needed. This works because the router has been configured to forward the request to a single server using a unicast or by sending the request to multiple servers via a directed broadcast.
Scope Options and Client Configuration
Scope options provide IP configuration for hosts on a specific subnet. Below Scope Options, you'll find Server Options; these options provide IP information for all scopes configured on the server. If I had just one Domain Name System (DNS) server for the entire network, I'd configure the server options with my DNS server information; that DNS server information would then show up automatically in all scopes configured on my server.
<img src="/question_assets/Network+/sg_c05f009.png" alt="A snapshot of the D H C P server's scope options window. It contains file, action, view, and help options. The scope option is selected for option name, vendor, and value."/>
<figcaption>A Windows DHCP server's scope options</figcaption>
Scope options comprise the informational elements that the DHCP server can provide to the DHCP clients. Examples of these options include TTL (provides the default TCP TTL value for TCP packets sent by the client), DNS server, and TFTP server (especially important for IP phones that need to get a configuration for a TFTP server).
DHCP Client Request Process
The DHCP service runs on top of the BootP protocol (port 68) and the DHCP client is looking for a BootP server (port 67). The client IP address is 0.0.0.0, and the client doesn't know the DHCP server address either because this is a broadcast to 255.255.255.255 (the Data Link layer broadcast shows ff:ff:ff:ff:ff:ff). Basically, all the DHCP client knows for sure is its own MAC address. The client is "requesting" a certain IP address because this is the IP address it received from the server the last time it requested an IP address.
<img src="/question_assets/Network+/sg_c05f010.png" alt="A snapshot of the D H C P client request to a D H C P server window. It highlights user datagram protocol, source port: boot PC 68, destination port: bootps 67."/>
<figcaption>DHCP client request to a DHCP server</figcaption>
The DHCP client Parameter Request List option includes subnet mask, domain name, router, DNS server, domain name used by DNS, and NetBIOS information (used by Windows for name resolution). The DHCP server will respond with the options that it has configured and are available to provide to a DHCP client.
Lease Time and Troubleshooting
The client is going to get the IP address that it asked for, a subnet mask, a lease time of 23 hours (the amount of time before the IP address and other DHCP information expires on the client), the IP address of the DHCP server, the default gateway (router), the DNS server IP address (it gets two), the domain name used by DNS, and some NetBIOS information.
<img src="/question_assets/Network+/sg_c05f012.png" alt="A snapshot of the D H C P server response window. It highlights the first four l..."/>
<figcaption>DHCP server response</figcaption>
The lease time is important and can even be used to tell you if you have a DHCP problem or, more specifically, that the DHCP server is no longer handing out IP addresses to hosts. If hosts start failing to get onto the network one at a time as they try to get a new IP address as their lease time expires, you need to check your server settings. If you arrive at work after a weekend and find that hosts that were left running are still working, but hosts that were shut down and restarted do not get a new IP address, this is a good indication that you need to head over to your DHCP server and take a look at what is going on.
MAC Reservations
A DHCP server can also be configured with a reservation list so that a host always receives the same IP address. When this is done, the reservation is made on the basis of the router interface MAC address. Therefore, it is sometimes called a MAC reservation. You would use this reservation list for routers or servers if they were not statically assigned. However, you can use reservation lists for any host on your network as well. DHCP is an Application layer protocol. While the DORA (Discover, Offer, Request, Acknowledgment) components operate at layer 2, the protocol is managed and responds to the Application layer. DHCP uses UDP ports 67 and 68.
Discussion (0)
No discussion on this article yet — be the first to comment.
Please sign in to join the discussion.