One of the most important services that run on an organization’s network is the DHCP server. Without a correctly configured DHCP server to supply the address and server information to be used on each of the client devices, users are left without a usable network computer. If this happens the administrator only has a few options: get the server back up and running correctly or statically configure each of the client devices; the latter not being preferred. This article takes a look at a number of the common DHCP problems and their symptoms from the perspective of the network administrator and the DHCP server (being run on a Cisco device).
Common DHCP Configuration Problems
There are a couple common configuration problems that can make the life of a network administrator quite challenging, these include:
- Server not giving out addresses
- Clients receiving addresses already statically assigned to servers or reserved devices
- Clients unable to reach external networks (off subnet)
- Clients unable to use the Internet with domain names
- Clients not receiving domain name suffix
Server Not Giving out Addresses
There are a couple of reasons that a server (In this case the Cisco device) will not give out addresses. The most obvious of these is that the server is not configured. On a Cisco DHCP device, this can be verified by viewing the current DHCP pool configuration using the show ip dhcp pool command; this is shown in Figure 1.
The second reason is that the DHCP pool configured does not match any of the interfaces that are currently configured on the Cisco device. An example of this is shown in Figure 2. In this example, R1 only has a single interface (f0/0) that is configured with an IP address of 10.10.10.1/24 and a single DHCP pool that is configured to give out the addresses from the 22.214.171.124/24 network.
Clients Receiving Addresses Already Statically Assigned to Servers or Reserved Devices
A common mistake that happens when configuring a Cisco device as a DHCP server is the failure to reserve addresses that are already in use (including the device itself). By default, when configuring a DHCP pool the whole range of addresses are eligible for lease. Figure 3 shows an example of this misconfiguration. In this example, the address 10.10.10.2/24 has already been statically configured on a local server.
Keep in mind, however, that by default the Cisco DHCP server will attempt to ping the next IP address in the pool to ensure the IP address is not currently being used. The example shown in Figure 3 is only possible if the local server was not on when the address was requested or did not respond to the ping request from the DHCP Server.
Clients Unable to Reach External Networks (off subnet)
Another common mistake happens when a DHCP server has been configured but clients are unable to reach networks outside the local subnet. When setting up a configuration for client devices that will need to reach clients external to the local subnets (almost all modern clients), a default gateway must be set up inside the DHCP configuration. On a Cisco device, the configuration of the default gateway inside a DHCP pool is done with the default-router command. The example in Figure 4 shows a DHCP pool configuration with a default gateway.
Clients Unable to Use the Internet with Domain Names
Typically, incorrect configuration of either the default gateway or the inability to use the Internet using Domain Names are grouped into the same problem category. For users to be able to use the Internet using domain names, a Domain Name Server (DNS) server (or servers) must be configured on their local machines. It is possible to configure these separately from the IP addressing, but in most typical configurations the DNS server (or servers) is configured as part of the DHCP pool. On a Cisco device, the configuration of a DNS server (or servers) is done with the dns-server command. The example in Figure 5 shows a DHCP pool configuration with DNS servers configured.
Clients Not Receiving Domain Name Suffix
An often overlooked function of a DHCP server is that is can also give out a domain name suffix. If the organizational network relies on both DHCP and DNS, users can become accustom to using single name domain names for local servers; for example marketing (for marketing.sample.com). Without a correctly configured domain name suffix, the users would need to type out the complete domain name (including sample.com); depending on the temperament of the users inside the organization this can become a problem. On a Cisco device, the configuration of a domain name suffix is done with the domain-name command. The example in Figure 6 shows a configuration for a domain name suffix.
There are certainly a number of advantages of using DHCP inside an organization; for the most part once DHCP is up and running within an organization it is rock solid and performs very well. However, if the configuration is not quite correct many different DHCP problems can occur as a result. Proper configuration is a must to avoid these DHCP problems, but the real focus of this article is for those situations when the configuration has already been completed and issues are being troubleshooted. Hopefully, the information contained with this article will be able to be practically used to help fix these common misconfigurations.