System Administration Guide: IP Services

Problems Communicating With DHCP Server

This section describes problems you might encounter as you add DHCP clients to the network.

After you enable the client software and reboot the system, the client tries to reach the DHCP server to obtain its network configuration. If the client fails to reach the server, you might see error messages such as:


DHCP or BOOTP server not responding 

Before you can determine the problem you must gather diagnostic information from both the client and the server and analyze the information. To gather information you can:

  1. Run the client in debug mode.

  2. Run the server in debug mode.

  3. Start snoop to monitor network traffic.

You can do these things separately or concurrently.

The information you gather can help you determine if the problem is with the client, server, or a relay agent, and then you can find a solution.

How to Run the DHCP Client in Debug Mode

If you have a client that is not a Solaris DHCP client, refer to the client's documentation for information about how to run the client in debug mode.

If you have a Solaris DHCP client, use the following steps.

  1. Become superuser on the client system.

  2. Type the following commands to kill the DHCP client daemon and restart it in debug mode:


    # pkill -x dhcpagent
    # /sbin/dhcpagent -d1 -f &
    # ifconfig interface dhcp start
    

    When run in debug mode, the client daemon displays messages to your screen as it performs DHCP requests. See DHCP Client Debug Output for information about client debug output.

How to Run the DHCP Server in Debug Mode
  1. Become superuser on the server system.

  2. Type the following commands to kill the DHCP daemon and restart it in debug mode:


    # pkill -x in.dhcpd
    # /usr/lib/inet/in.dhcpd -d -v 
    

    You should also use any in.dhcpd command-line options that you normally use when you run the daemon. For example, if you run the daemon as a BOOTP relay agent, include the -r option with the in.dhcpd -d -v command.

    When run in debug mode, the daemon displays messages to your screen as it processes DHCP/BOOTP requests. See DHCP Server Debug Output for information about server debug output.

How to Use snoop to Monitor DHCP Network Traffic
  1. Become superuser on the DHCP server system.

  2. Start snoop to begin tracing network traffic across the server's network interface.


    # /usr/sbin/snoop -d interface -o snoop-output-filename udp port 67 or udp port 68
    

    For example:


    #  /usr/sbin/snoop -d le0 -o /tmp/snoop.output udp port 67 or udp port 68
    

    Note that snoop continues to monitor the interface until you stop it explicitly by pressing Control-C after you have the information you need.

  3. Boot the client system, or restart the dhcpagent on the client system.

    Restarting dhcpagent is described in How to Run the DHCP Client in Debug Mode.

  4. On the server system, use snoop to display the output file with the contents of network packets:


    # /usr/sbin/snoop -i snoop-output-filename -x0 -v
    

    For example:

    # /usr/sbin/snoop -i /tmp/snoop.output -x0 -v
    

The -d switch with the dhcpagent command puts the client in debug mode with level 1 verbosity, and the -f switch causes output to be sent to the console instead of to syslog. Replace interface in the ifconfig command line with the name of the network interface of the client (for example, le0).

See DHCP snoop Output for information about interpreting the output.

DHCP Client Debug Output

The following example shows normal debug output when a DHCP client sends its DHCP request and receives its configuration information from a DHCP server.


Example 11–1 Sample Normal DHCP Client Debug Output


/sbin/dhcpagent: debug: set_packet_filter: set filter 0x27fc8 (DHCP filter) 
/sbin/dhcpagent: debug: init_ifs: initted interface le0 
/sbin/dhcpagent: debug: insert_ifs: le0: sdumax 1500, optmax 1260, hwtype 1, hwlen 6 
/sbin/dhcpagent: debug: insert_ifs: inserted interface le0 
/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 0x26018 (ARP reply filter)
/sbin/dhcpagent: info: setting IP netmask on le0 to 255.255.192.0 
/sbin/dhcpagent: info: setting IP address on le0 to 10.23.3.233 
/sbin/dhcpagent: info: setting broadcast address on le0 to 10.23.63.255 
/sbin/dhcpagent: info: added default router 10.23.0.1 on le0 
/sbin/dhcpagent: debug: set_packet_filter: set filter 0x28054 (blackhole filter) 
/sbin/dhcpagent: debug: configure_if: bound ifsp->if_sock_ip_fd 
/sbin/dhcpagent: info: le0 acquired lease, expires Tue Aug 10 16:18:33 1999 
/sbin/dhcpagent: info: le0 begins renewal at Tue Aug 10 15:49:44 1999 
/sbin/dhcpagent: info: le0 begins rebinding at Tue Aug 10 16:11:03 1999

If the client cannot reach the DHCP server, you might see debug output similar to the following example.


Example 11–2 Sample Debug Output for DHCP Client


/sbin/dhcpagent: debug: set_packet_filter: set filter 0x27fc8 (DHCP filter)
/sbin/dhcpagent: debug: init_ifs: initted interface le0 
/sbin/dhcpagent: debug: select_best: no valid OFFER/BOOTP reply
/sbin/dhcpagent: debug: select_best: no valid OFFER/BOOTP reply
/sbin/dhcpagent: debug: select_best: no valid OFFER/BOOTP reply
 

If you see this message, the request never reached the server, or the server cannot send a response to the client. Run snoop on the server as described in How to Use snoop to Monitor DHCP Network Traffic to determine if packets from the client have reached the server.

DHCP Server Debug Output

Normal server debug output shows server configuration information followed by information about each network interface as the daemon starts. After daemon startup, the debug output shows information about requests the daemon processes. Example 11–3 shows debug output for a DHCP server that has just started and then extends the lease for a client that is using an address owned by another DHCP server that is not responding.


Example 11–3 Sample Debug Output for DHCP Server


Daemon Version: 3.1  
Maximum relay hops: 4  
Transaction logging to console enabled.  
Run mode is: DHCP Server Mode.  
Datastore: nisplus  
Path: org_dir.dhcp.test..:dhcp.test..:$ 
DHCP offer TTL: 10  
Ethers compatibility enabled.  
BOOTP compatibility enabled.  
ICMP validation timeout: 1000 milliseconds, Attempts: 2.  
Monitor (0005/hme0) started...  
Thread Id: 0005 - Monitoring Interface: hme0 *****  
MTU: 1500      Type: DLPI  
Broadcast: 10.21.255.255 
Netmask: 255.255.0.0  
Address: 10.21.0.2  
Monitor (0006/nf0) started...  
Thread Id: 0006 - Monitoring Interface: nf0 *****  
MTU: 4352      Type: DLPI  
Broadcast: 10.22.255.255  
Netmask: 255.255.0.0  
Address: 10.22.0.1  
Monitor (0007/qe0) started...  
Thread Id: 0007 - Monitoring Interface: qe0 *****  
MTU: 1500      Type: DLPI   
Broadcast: 10.23.63.255  
Netmask: 255.255.192.0  
Address: 10.23.0.1  
Read 33 entries from DHCP macro database on Tue Aug 10 15:10:27 1999 
Datagram received on network device: qe0  
Client: 0800201DBA3A is requesting verification of address owned by 10.21.0.4 
Datagram received on network device: qe0  
Client: 0800201DBA3A is requesting verification of address owned by 10.21.0.4  
Datagram received on network device: qe0  
Client: 0800201DBA3A is requesting verification of address owned by 10.21.0.4  
Datagram received on network device: qe0  
Client: 0800201DBA3A maps to IP: 10.23.3.233  
Unicasting datagram to 10.23.3.233 address.  
Adding ARP entry: 10.23.3.233 == 0800201DBA3A  
DHCP EXTEND 0934312543 0934316143 10.23.3.233 10.21.0.2 
          0800201DBA3A SUNW.SPARCstation-10 0800201DBA3A

Example 11–4 shows debug output from a DHCP daemon that starts as a BOOTP relay agent and relays requests from a client to a DHCP server, and relays the servers responses to the client.


Example 11–4 Sample Debug Output for BOOTP Relay


Relay destination: 10.21.0.4 (blue-servr2)     network: 10.21.0.0  
Daemon Version: 3.1  
Maximum relay hops: 4  
Transaction logging to console enabled.  
Run mode is: Relay Agent Mode.  
Monitor (0005/hme0) started...  
Thread Id: 0005 - Monitoring Interface: hme0 *****  
MTU: 1500      Type: DLPI  
Broadcast: 10.21.255.255  
Netmask: 255.255.0.0  
Address: 10.21.0.2  
Monitor (0006/nf0) started...  
Thread Id: 0006 - Monitoring Interface: nf0 *****  
MTU: 4352      Type: DLPI  
Broadcast: 10.22.255.255  
Netmask: 255.255.0.0  
Address: 10.22.0.1  
Monitor (0007/qe0) started...  
Thread Id: 0007 - Monitoring Interface: qe0 *****  
MTU: 1500      Type: DLPI  
Broadcast: 10.23.63.255  
Netmask: 255.255.192.0  
Address: 10.23.0.1  
Relaying request 0800201DBA3A to 10.21.0.4, server port.  
BOOTP RELAY-SRVR 0934297685 0000000000 0.0.0.0 10.21.0.4 0800201DBA3A 
N/A 0800201DBA3A  
Packet received from relay agent: 10.23.0.1  
Relaying reply to client 0800201DBA3A  
Unicasting datagram to 10.23.3.233 address.  
Adding ARP entry: 10.23.3.233 == 0800201DBA3A  
BOOTP RELAY-CLNT 0934297688 0000000000 10.23.0.1 10.23.3.233 0800201DBA3A 
N/A 0800201DBA3A  
Relaying request 0800201DBA3A to 10.21.0.4, server port.  
BOOTP RELAY-SRVR 0934297689 0000000000 0.0.0.0 10.21.0.4 0800201DBA3A 
N/A 0800201DBA3A  
Packet received from relay agent: 10.23.0.1  
Relaying reply to client 0800201DBA3A  
Unicasting datagram to 10.23.3.233 address.  
Adding ARP entry: 10.23.3.233 == 0800201DBA3A 
 

If there is a problem, the debug output might display warnings or error messages. Use Table 11–4 to find error messages and solutions.

Table 11–4 DHCP Server Error Messages

Message 

Explanation 

Solution 

ICMP ECHO reply to OFFER candidate: ip_address disabling

Before the DHCP server offers an IP address to a client, it pings the address to verify that the address is not in use. If a client replies, the address is in use. 

Make sure the addresses you configured are not already in use. 

No more IP addresses on network_address network.

No available IP addresses in the DHCP network table associated with the client's network. 

Create more IP addresses using DHCP Manager or pntadm. If the DHCP daemon is monitoring multiple subnets, be sure the additional addresses are for the subnet where the client is located.

No more IP addresses for network_address network when you are running the DHCP daemon in BOOTP compatibility mode (-b option).

BOOTP does not use a lease time, so the DHCP server looks for free addresses with the BOOTP flag set to allocate to BOOTP clients. 

Use DHCP Manager to allocate BOOTP addresses. 

Request to access nonexistent per network database: database_name in datastore: datastore.

During configuration of the DHCP server, a DHCP network table for a subnet was not created.  

Use DHCP Manager or the pntadm to create the DHCP network table and new IP addresses.

There is no table_name dhcp-network table for DHCP client's network.

During configuration of the DHCP server, a DHCP network table for a subnet was not created.  

Use DHCP Manager or the pntadm to create the DHCP network table and new IP addresses.

Client using non_RFC1048 BOOTP cookie.

A device on the network is trying to access an unsupported implementation of BOOTP. 

Ignore this message, unless you need to configure this device. 

DHCP snoop Output

In the snoop output, you should see that packets are exchanged between the DHCP client system and the DHCP server system. The IP address for each system (and any relay agents or routers in between) is indicated in each packet. If the systems do not exchange packets, the client system might not be able to contact the server system at all, and the problem is at a lower level.

To evaluate snoop output, you should know what the expected behavior is (such as if the request should be going through a BOOTP relay agent). You should also know the MAC addresses and IP address of the systems involved (and those of the network interfaces, if there is more than one) so that you can determine if those values are as expected. The following example shows normal snoop output for a DHCP acknowledgement message sent from the DHCP server on blue-servr2 to a client whose MAC address is 8:0:20:8e:f3:7e. In the message, the servers assigns the client the IP address 172.168.252.6 and the host name white-6. The message also includes a number of standard network options and several vendor-specific options for the client.


Example 11–5 Sample snoop Output for One Packet


ETHER:  ----- Ether Header ----- 
ETHER:   
ETHER:  Packet 26 arrived at 14:43:19.14 
ETHER:  Packet size = 540 bytes 
ETHER:  Destination = 8:0:20:8e:f3:7e, Sun 
ETHER:  Source      = 8:0:20:1e:31:c1, Sun 
ETHER:  Ethertype = 0800 (IP) 
ETHER:  
IP:   ----- IP Header ----- 
IP:    
IP:   Version = 4 
IP:   Header length = 20 bytes 
IP:   Type of service = 0x00 
IP:         xxx. .... = 0 (precedence) 
IP:         ...0 .... = normal delay 
IP:         .... 0... = normal throughput 
IP:         .... .0.. = normal reliability 
IP:   Total length = 526 bytes 
IP:   Identification = 64667 
IP:   Flags = 0x4 IP:         .1.. .... = do not fragment 
IP:         ..0. .... = last fragment 
IP:   Fragment offset = 0 bytes 
IP:   Time to live = 254 seconds/hops 
IP:   Protocol = 17 (UDP) 
IP:   Header checksum = 157a 
IP:   Source address = 10.21.0.4, blue-servr2 
IP:   Destination address = 192.168.252.6, white-6 
IP:   No options 
IP:   UDP:  ----- UDP Header ----- 
UDP:   
UDP:  Source port = 67 
UDP:  Destination port = 68 (BOOTPC) 
UDP:  Length = 506  
UDP:  Checksum = 5D4C  
UDP:  
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 = 0x2e210f17 
DHCP: Time since boot = 0 seconds 
DHCP: Flags = 0x0000 
DHCP: Client address (ciaddr) = 0.0.0.0 
DHCP: Your client address (yiaddr) = 192.168.252.6 
DHCP: Next server address (siaddr) = 10.21.0.2 
DHCP: Relay agent address (giaddr) = 0.0.0.0 
DHCP: Client hardware address (chaddr) = 08:00:20:11:E0:1B 
DHCP:  
DHCP: ----- (Options) field options ----- 
DHCP:  
DHCP: Message type = DHCPACK 
DHCP: DHCP Server Identifier = 10.21.0.4 
DHCP: Subnet Mask = 255.255.255.0 
DHCP: Router at = 192.168.252.1 
DHCP: Broadcast Address = 192.168.252.255 
DHCP: NISPLUS Domainname = dhcp.test 
DHCP: IP Address Lease Time = 3600 seconds 
DHCP: UTC Time Offset = -14400 seconds 
DHCP: RFC868 Time Servers at = 10.21.0.4 
DHCP: DNS Domain Name = sem.example.com 
DHCP: DNS Servers at = 10.21.0.1 
DHCP: Client Hostname = white-6 
DHCP: Vendor-specific Options (166 total octets): 
DHCP:   (02) 04 octets  0x8194AE1B (unprintable) 
DHCP:   (03) 08 octets  "pacific" 
DHCP:   (10) 04 octets  0x8194AE1B (unprintable) 
DHCP:   (11) 08 octets  "pacific" 
DHCP:   (15) 05 octets  "xterm" 
DHCP:   (04) 53 octets  "/export/s2/base.s2s/latest/Solaris_8/Tools/Boot" 
DHCP:   (12) 32 octets  "/export/s2/base.s2s/latest" 
DHCP:   (07) 27 octets  "/platform/sun4m/kernel/unix" 
DHCP:   (08) 07 octets  "EST5EDT" 
  0: 0800 208e f37e 0800 201e 31c1 0800 4500    .. .ó~.. .1...E.
 16: 020e fc9b 4000 fe11 157a ac15 0004 c0a8    ....@....z......           
 32: fc06 0043 0044 01fa 5d4c 0201 0600 2e21    ...C.D..]L.....!           
 48: 0f17 0000 0000 0000 0000 c0a8 fc06 ac15    ................           
 64: 0002 0000 0000 0800 2011 e01b 0000 0000    ........ .......           
 80: 0000 0000 0000 0000 0000 0000 0000 0000    ................           
 96: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
112: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
128: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
144: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
160: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
176: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
192: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
208: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
224: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
240: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
256: 0000 0000 0000 0000 0000 0000 0000 0000    ................          
272: 0000 0000 0000 6382 5363 3501 0536 04ac    ......c.Sc5..6..          
288: 1500 0401 04ff ffff 0003 04c0 a8fc 011c    ................          
304: 04c0 a8fc ff40 0964 6863 702e 7465 7374    .....@.dhcp.test          
320: 3304 0000 0e10 0204 ffff c7c0 0404 ac15    3...............          
336: 0004 0f10 736e 742e 6561 7374 2e73 756e    ....sem.example.          
352: 2e63 6f6d 0604 ac15 0001 0c07 7768 6974    com.........whit          
368: 652d 362b a602 0481 94ae 1b03 0861 746c    e-6+.........pac          
384: 616e 7469 630a 0481 94ae 1b0b 0861 746c    ific.........pac          
400: 616e 7469 630f 0578 7465 726d 0435 2f65    ific...xterm.5/e          
416: 7870 6f72 742f 7332 382f 6261 7365 2e73    xport/sx2/bcvf.s          
432: 3238 735f 776f 732f 6c61 7465 7374 2f53    2xs_btf/latest/S          
448: 6f6c 6172 6973 5f38 2f54 6f6f 6c73 2f42    olaris_x/Tools/B          
464: 6f6f 740c 202f 6578 706f 7274 2f73 3238    oot. /export/s2x          
480: 2f62 6173 652e 7332 3873 5f77 6f73 2f6c    /bcvf.s2xs_btf/l         
496: 6174 6573 7407 1b2f 706c 6174 666f 726d    atest../platform          
512: 2f73 756e 346d 2f6b 6572 6e65 6c2f 756e    /sun4m/kernel/un          
528: 6978 0807 4553 5435 4544 54ff              ix..EST5EDT.