|
|
Installing and Administering Internet Services: HP 9000 Networking > Chapter 6 Dynamic Host Configuration Protocol (DHCP)Monitoring and Troubleshooting DHCP Operations |
|
This section describes techniques and tools you can use to troubleshoot problems found with the DHCP server. You can use one of four techniques for monitoring DHCP:
Syslog collects the most detailed information about operations. You will get the most direct, real-time information when you use syslog. However, this method is only good for monitoring short periods of time because syslog grows quickly.
Table 6-1 “Common Errors Found in Syslog” lists some of the common error messages you may see in the syslog when a client fails to get an address lease. Table 6-1 Common Errors Found in Syslog
Turn on tracing by typing the following command: /usr/sbin/dhcptools -t ct=100 This command turns on tracing and writes the full contents of 100 packets to a file named/called /tmp/dhcptrace.
Use the dhcptools to cause the daemon to dump. Type the following command: /usr/sbin/dhcptools -d This command dumps dynamic information into the file /tmp/dhcp.dump.other. Other information is dumped into the files /tmp/dhcp.dump.bootptab and /tmp/dhcp.dump.dhcptab. Review the contents of /tmp/dhcpdb, which is a less verbose version of /tmp/dhcp.dump.dhcptab. The file /tmp/dhcpdb is continually updated by the daemon. The HP-UX DHCP server has tools that will help you debug problems and make adjustments while the server is running. When building the files /etc/bootptab and /etc/dhcptab, you need a tool that will automatically discover illegal entries and typographical errors. The command-line tool known as dhcptools(1M) is available to provide access to DHCP-related options for the bootpd server. The options provide control for dumping internal data structures, generating a host file, previewing client address assignment, reclaiming unused addresses, tracing packets, and validating configuration files. Refer to the dhcptools(1M) man page for detailed information about the various options. The -v option should be used after you have completed configuration to verify that no detectable errors exist in either the bootptab or dhcptab configuration files. If communication problems exist between the server and client at a protocol level, and you have verified that no errors exist in the configuration files, you may want to use the -t option of the dhcptools command. This option performs packet tracing. You may want to use this option in conjunction with the -d option of the bootpd(1M) command. Refer to the bootpd(1M) man page for details. Here are some of the tools available and appropriate reason for using them. Automatically discovers illegal entries and typographical errors in bootptab and dhcp tab.
Allows you to review a lease for a particular client. You can use it to make sure the client is responding correctly.
Allows you to reclaim an individual lease address, making it available for a new client.
HP-UX DHCP server provides a powerful facility that enables you to customize the DHCP server, known as callbacks. These are user-defined actions that are executed for different types of transaction successes and failures. These callbacks are defined in /etc/dhcptab as follows:
Each callback passes some command line parameters (such as client hardware address, client IP address, class-id, etc.) to the executable file named in /etc/dhcptab. The executable is typically a shell script, but it can be any executable file. This is commonly used to send mail to the network administrator or store data in a file about DHCP clients that have succeeded or failed in negotiating a lease. The following is an example callback script: |
|