Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
11.  Troubleshooting DHCP (Reference) Troubleshooting DHCP Client Configuration Problems Problems Communicating With DHCP Server How to Run the DHCP Client in Debug Mode  Previous   Contents   Next 
   
 

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 
 

 
 
 
  Previous   Contents   Next