Troubleshooting the DHCP Client


The majority of problems that will be found on a DHCP client involve a DHCP server that can't be reached or is not responding, or a problem with the configuration of the DHCP server itself.

The main troubleshooting tools available to the administrator include the following actions:

  • Run the server process in debug mode (detailed in the preceding section).

  • Run the client process ( dhcpagent ) in debug mode to view additional messages.

  • Run snoop to capture network traffic between the DHCP client and the server.

Run the DHCP Client in Debug Mode to View Messages

To see more detailed messages about the client IP allocation process, you can run the client DHCP daemon, dhcpagent , in debug mode. The following session proceeds through these steps:

  • Releases the current IP address assigned to the DHCP client.

  • Stops the client DHCP process, dhcpagent .

  • Starts the client DHCP process in debug mode.

  • Enables the network interface so that it requests an IP address from the DHCP server.

  • Releases the current IP address assigned to the DHCP client and stops the client DHCP process, dhcpagent .

The lines of interest appear in bold.

 ultra5# ifconfig hme0 dhcp release ultra5# pkill dhcpagent ultra5# /sbin/dhcpagent -d1 -f & ultra5# ifconfig hme0 dhcp start /sbin/dhcpagent: debug: set_packet_filter: set filter 0x2e648 (DHCP filter) /sbin/dhcpagent: debug: init_ifs: initted interface hme0 /sbin/dhcpagent: debug: insert_ifs: hme0: sdumax 1500, optmax 1260,  \ hwtype 1, hwlen 6 /sbin/dhcpagent: debug: insert_ifs: inserted interface hme0 /sbin/dhcpagent: debug: set_packet_filter: set filter 0x2e648 (DHCP filter) /sbin/dhcpagent: debug: init_ifs: initted interface hme0  /sbin/dhcpagent: debug: dhcp_selecting: DF_REQUEST_HOSTNAME   /sbin/dhcpagent: debug: select_best: OFFER had 42 points   /sbin/dhcpagent: debug: select_best: most points: 42  /sbin/dhcpagent: debug: register_acknak: registered acknak id 5 /sbin/dhcpagent: debug: unregister_acknak: unregistered acknak id 5 /sbin/dhcpagent: debug: set_packet_filter: set filter 0x2c640 (ARP reply filter)  /sbin/dhcpagent: info: setting IP netmask on hme0 to 255.255.255.0   /sbin/dhcpagent: info: setting IP address on hme0 to 192.168.28.32   /sbin/dhcpagent: info: setting broadcast address on hme0 to 192.168.28.255   /sbin/dhcpagent: info: added default router 192.168.28.28 on hme0  /sbin/dhcpagent: debug: set_packet_filter: set filter 0x2e6d4 (blackhole filter) /sbin/dhcpagent: debug: configure_if: bound ifsp->if_sock_ip_fd  /sbin/dhcpagent: info: hme0 acquired lease, expires Tue Jun 24 00:59: 09 2003   /sbin/dhcpagent: info: hme0 begins renewal at Tue Jun 24 00:29:46 2003   /sbin/dhcpagent: info: hme0 begins rebinding at Tue Jun 24 00:50:33 2003  ultra5# ifconfig hme0 dhcp release /sbin/dhcpagent: info: releasing interface hme0 /sbin/dhcpagent: debug: free_ifs: freeing interface hme0 ultra5# pkill dhcpagent /sbin/dhcpagent: info: received SIGTERM, shutting down... 

The following options to dhcpagent were used in the preceding example:

  • -d1 Debug level 1. This value can be set to 1 or 2. Level 2 provides the most verbose output.

  • -f Instructs the process to run in the foreground, rather than in the background as a daemon process. This option means that messages are written to the standard output, instead of via syslog , making the output readily available.

The example debug session shows a successful IP address being obtained by a client. You can see that the client assesses the offer of an address, scores it (42 points), and then selects it. The network mask, IP address, broadcast address, and default router are also set from the DHCP server and finally the lease is acquired.

snoop

Use the snoop command to monitor network traffic between the DHCP client and the server. It can often provide useful information when you are trying to diagnose a problem. The following snapshot from snoop captures packets when a client requests an IP address. Note that only the DHCP protocol items are shown here:

 ultra10# snoop -i /tmp/sn.log DHCP: ----- Dynamic Host Configuration Protocol ----- DHCP: DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb)) DHCP: Hardware address length (hlen) = 6 octets DHCP: Relay agent hops = 0 DHCP: Transaction ID = 0x6372d201 DHCP: Time since boot = 0 seconds DHCP: Flags = 0x0000 DHCP: Client address (ciaddr) = 0.0.0.0 DHCP: Your client address (yiaddr) = 0.0.0.0 DHCP: Next server address (siaddr) = 0.0.0.0 DHCP: Relay agent address (giaddr) = 0.0.0.0 DHCP: Client hardware address (chaddr) = 08:00:20:8E:48:CE DHCP: DHCP: ----- (Options) field options ----- DHCP:  DHCP: Message type = DHCPDISCOVER  DHCP: Maximum DHCP Message Size = 1472 bytes DHCP: IP Address Lease Time = -1 seconds DHCP: Client Class Identifier =   "SUNW.SPARCstation-5" DHCP: Requested Options: DHCP:     1 (Subnet Mask) DHCP:     3 (Router) DHCP:    12 (Client Hostname) DHCP:    43 (Vendor Specific Options) DHCP: ----- Dynamic Host Configuration Protocol ----- DHCP: DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb)) DHCP: Hardware address length (hlen) = 6 octets DHCP: Relay agent hops = 0 DHCP: Transaction ID = 0x6372d201 DHCP: Time since boot = 0 seconds DHCP: Flags = 0x0000 DHCP: Client address (ciaddr) = 0.0.0.0  DHCP: Your client address (yiaddr) = 192.168.28.40  DHCP: Next server address (siaddr) = 0.0.0.0 DHCP: Relay agent address (giaddr) = 0.0.0.0 DHCP: Client hardware address (chaddr) = 08:00:20:8E:48:CE DHCP: DHCP: ----- (Options) field options ----- DHCP:  DHCP: Message type = DHCPOFFER  DHCP: DHCP Server Identifier = 192.168.28.28 DHCP: UTC Time Offset = 0 seconds DHCP: RFC868 Time Servers at = 192.168.28.28 DHCP: IP Address Lease Time = 86400 seconds DHCP: DNS Domain Name = xyz.com DHCP: DNS Servers at = 192.168.28.28 DHCP: TFTP Server Name = 192.168.28.28 DHCP: Broadcast Address = 192.168.28.255 DHCP: Router at = 192.168.28.28 DHCP: Subnet Mask = 255.255.255.0  DHCP: Client Hostname = ultra10-40  DHCP: ----- Dynamic Host Configuration Protocol ----- DHCP: DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb)) DHCP: Hardware address length (hlen) = 6 octets DHCP: Relay agent hops = 0 DHCP: Transaction ID = 0x180271a2 DHCP: Time since boot = 0 seconds DHCP: Flags = 0x0000 DHCP: Client address (ciaddr) = 0.0.0. 0 DHCP: Your client address (yiaddr) = 0.0.0.0 DHCP: Next server address (siaddr) = 0.0.0.0 DHCP: Relay agent address (giaddr) = 0.0.0.0 DHCP: Client hardware address (chaddr) = 08:00:20:8E:48:CE DHCP: DHCP: ----- (Options) field options ----- DHCP:  DHCP: Message type = DHCPREQUEST  DHCP: IP Address Lease Time = 86400 seconds DHCP: Maximum DHCP Message Size = 1472 bytes  DHCP: Requested IP Address = 192.168.28.40  DHCP: DHCP Server Identifier = 192.168.28.28 DHCP: Client Class Identifier =   "SUNW.SPARCstation-5" DHCP: Requested Options: DHCP:     1 (Subnet Mask) DHCP:     3 (Router) DHCP:    12 (Client Hostname) DHCP:    43 (Vendor Specific Options) DHCP: ----- Dynamic Host Configuration Protocol ----- DHCP: DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb)) DHCP: Hardware address length (hlen) = 6 octets DHCP: Relay agent hops = 0 DHCP: Transaction ID = 0x180271a2 DHCP: Time since boot = 0 seconds DHCP: Flags = 0x0000 DHCP: Client address (ciaddr) = 0.0.0.0  DHCP: Your client address (yiaddr) = 192.168.28.40  DHCP: Next server address (siaddr) = 0.0.0.0 DHCP: Relay agent address (giaddr) = 0.0.0.0 DHCP: Client hardware address (chaddr) = 08:00:20:8E:48:CE DHCP: DHCP: ----- (Options) field options ----- DHCP:  DHCP: Message type = DHCPACK  DHCP: DHCP Server Identifier = 192.168.28.28 DHCP: UTC Time Offset = 0 seconds DHCP: RFC868 Time Servers at = 192.168.28.28 DHCP: IP Address Lease Time = 86400 seconds DHCP: DNS Domain Name = xyz.com DHCP: DNS Servers at = 192.168.28.28 DHCP: TFTP Server Name = 192.168.28.28 DHCP: Broadcast Address = 192.168.28.255 DHCP: Router at = 192.168.28.28 DHCP: Subnet Mask = 255.255.255.0  DHCP: Client Hostname = ultra10-40  

Notice how each of the message types is present, namely:

  • DHCPDISCOVER The client locates a DHCP server and requests an IP address.

  • DHCPOFFER The server responds with an IP address ( 192.168.28.40 ).

  • DHCPREQUEST The client accepts the offer by confirming the requested IP address ( 192.168.28.40 ).

  • DHCPACK The server confirms the allocation of the IP address and the hostname.

Problems Acquiring Hostnames

The majority of problems with clients trying to acquire hostnames involve the use of DNS. Table 12.3 identifies some of the more common problems and their resolutions .

Table 12.3. Common Hostname Acquisition Problems

Problem Description

Problem Resolution

The requested hostname has not been configured in the network table for the required network.

Use dhcpmgr or pntadm to check the network table and, if necessary, add the required hostname.

The DNS server has not been configured to receive updates from the DHCP server.

Check the DNS configuration file, /etc/named.conf . There should be an allow-update statement with the DHCP server's IP address.

The DHCP server that has offered an IP address does not know the DNS domain name.

On the DHCP server, check the macro that is processed . The DNSdmain symbol should contain the correct domain name.

The client is specifying the hostname in FQDN format.

Solaris 9 DHCP does not support FQDN format for hostnames. Modify the hostname request to a short name.

Obtaining a Lease Manually

When a client is unable to use the normal dynamic mechanism to obtain a lease for an IP address, it is worthwhile trying to obtain a lease manually. Use the following ifconfig command to do this for a client with an hme0 interface:

 ultra10# ifconfig hme0 dhcp 

Verify that a lease has been obtained by using the ifconfig command to view the interface status. There should now be an IP address assigned to the interface.

Checking Client Status

At any time you can check the current status of the DHCP client by using the ifconfig command on the network interface being managed by DHCP. Execute the following command to examine the status of the hme0 interface:

 ultra5# ifconfig hme0 dhcp status Interface  State         Sent  Recv  Declined  Flags hme0       BOUND            2     2         0 (Began, Expires, Renew) = (06/24/2003 00:41, 06/25/2003 00:41, 06/24/2003 \ 13:03) 

The State field shows that the interface is BOUND to an address. The lease information gives details of when the lease for the IP address was assigned, when it will expire, and when it can be renewed.



Solaris 9 Network Administration Exam Cram 2 (Exam Cram CX-310-044)
Solaris 9 Network Administrator Exam Cram 2 (Exam CX-310-044)
ISBN: 0789728702
EAN: 2147483647
Year: 2003
Pages: 174
Authors: John Philcox

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net