×


Troubleshooting DHCP client issues

When we are troubleshooting a DHCP client, it is very necessary for us to understand certain issues about configuring the client and client-server communication.

Sometimes, the DHCP may fail to configure the client properly. It may be either because DHCP could not communicate with a server, or because, although configuration responses were received, they were incorrect. Also, the problems can also occur later if the client cannot renew its IP addresses.

If a DHCP server fails or goes offline, network communications can quickly break down. Without DHCP, you'd need to go to each computer and manually assign it an IP address, subnet mask, default gateway and other network settings.


Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve Windows related errors.

In this context, we shall look into steps to troubleshoot the DHCP client issues.


Troubleshooting DHCP client issues

Here, you will learn how to troubleshoot the DHCP client problems.


1. DHCP Client Cannot Communicate With the Server

Sometimes, a client and a server will not be able to communicate with each other. Its consequences depend on whether or not the client has a configuration cached from an earlier DHCP transaction. In case, if it has and if the lease is still valid then the client will use the cached data to configure the interface.

Since the client has not received any outside confirmation that this configuration is valid, there is no guarantee that the IP address, router address, and other information are valid.

If the interface is connected to a network other than the one on which the configuration was received, one of two things can happen.

Errors may appear when other network services start

It may be impossible to communicate with other hosts on the network.

On the other hand, if no cache with an unexpired lease exists, the interface is not configured.


2. DHCP Configurations Received Are Invalid

There can be two reasons for the configurations to be invalid:

1. Using ARP, the client determines that the IP address offered to it is in use elsewhere. In this case, the client will send a DHCPDECLINE message to the server. If the server offers more than two bad addresses, dhcpagent fails.

2. The client gets offers, but when it tries to confirm them, the server sends a DHCPNAK message instead of a confirmation. If the client receives DHCPNAK messages more than twice, dhcpagent fails. This indicates a malfunctioning server.


3. DHCP Client Cannot Obtain an IP Address from Server

If a DHCP client cannot obtain an IP address from the DHCP server, we perform the following troubleshooting steps to identify the problem.

i. Verifying whether the DHCP Server is up and running. For that, we check the following:

a. We make sure that the IP interfaces are active, and that the UDP port 68 is registered if a DHCP server exists on the local segment.

b. We make sure that a relay agent is set up so that the DHCP requests are forwarded to the appropriate DHCP server if there is no DHCP server on the local segment.


ii. Also, we check that the DHCP Server has available IP addresses to hand out.

It could be that the DHCP server has run out of addresses for a specific subnet and a client request for another IP address on that subnet will fail. In most cases, the DHCP server generates warnings or errors when this occurs. Checking the DHCP server logs will confirm the issue.


iii. We check that the DHCP Server does not expect certain tags to be set in the DHCP request.

Some ISP's that provide IP addresses to cable modems via DHCP expect the customer's hostname or customer ID in the incoming DHCP request. If this is the case, we make sure that the DHCPCLNT module is loaded with the HOST=<hostname/customer ID> parameter.


iv. We verify that the DHCP server responds to the request and that the DHCP client receives this request.

For doing it, we check the following:

a. Most DHCP servers can be run in debug mode, which logs information about DHCP requests along with their responses. We check this log to verify that the DHCP client request made it to the DHCP server and that the DHCP server responded.

b. When DHCPCLNT loads, it spawns a “DHCP Client Info Screen” at the server console. This Info screen displays error and warning information whenever it detects a problem, including error checks for resource issues, thread issues, and DHCP protocol issues. Check this screen for possible messages.


Troubleshooting by isolating the Issues to the Client or Server

We perform the following actions to isolate the problem to either the client or the server machine.


Problem 1

The DHCP server machine is not working.

For verification purposes, we log in to another machine on the same subnet as the client and use the ping command to try to reach the server.


Solution:

We diagnose the problem on the server machine.


Problem 2

The DHCP server is not running.

We log in to the server and enter the command:

ps -ef | grep dhcp

Solution:

We stop and restart the DHCP server. For that, we run the below command.

/etc/init.d/dhcp stop

Wait about 10 seconds. Then we enter the command:

/etc/init.d/dhcp start

 

Problem 3

The boot process hangs during DHCP.

We verify if the interface is marked primary, but no valid DHCP transaction has occurred.


Solution:

We interrupt DHCP by typing control-C. The boot continues.


[Need urgent assistance in fixing DHCP errors? – We are here to help you. ]


Conclusion

This article will guide you on troubleshooting different DHCP #client issues. Whenever a DHCP server gets a request from a client it responds with a DHCP offer containing IP address being offered, #network mask offered, the amount of time that the client can use and keep it, the ip address of the DHCP server making this offer.

To #Troubleshoot DHCP:

1. Check for IP Address Conflicts. #DHCP clients connect to the network using a leased IP address.

2. Check Physical Connectivity.

3. Test connections with other Client using a Static #IP Address.

4. Confirm Switch #Port #Configuration.

5. Verify the source of Clients IP Address.