HP-UX Reference (11i v3 07/02) - 1M System Administration Commands A-M (vol 3)
d
dhcptools(1M) dhcptools(1M)
-r Reclaim a client’s IP address for re-use by the
bootpd server. This option is intended for lim-
ited use by the
bootpd administrator to return an allocated but unused IP address to a DHCP
allocation pool. The option may be useful to clear the
bootpd database of old entries (for exam-
ple, for clients retired from service while holding an unexpired IP address lease). Do not reclaim
an address that belongs to an active client. See bootpd(1M). The IP_address, hardware_address,
and hardware_type can be obtained from the
bootpd database file.
-R Reclaim a client’s IP address for re-use by the
bootpd server. This option is the same as -r
except that the client is identified by its unique client_identifier. See bootpd(1M). The
IP_address and matching client_identifier can be obtained from the
bootpd database file.
-t Establish packet tracing for bootpd. This will trace the inbound and outbound BOOTP/DHCP
packets for the local bootpd server. The output file is
/tmp/dhcptrace
. The packet trace
count can be a value from 0 to 100. To query the current count, use
dhcptools -t. To turn
off packet tracing use
dhcptools -t ct=0
.
-v Validate
bootpd configuration files. The default configuration files that will be validated are
/etc/bootptab and /etc/dhcptab . When a bootptabfile or dhpctabfile is specified, the
full pathname is required. The output file for validate is
/tmp/dhcpvalidate
.
Only one of the
-d, -h, -t, -p,
-P, -r, -R,or-v options is allowed per dhcptools command.
RETURN VALUE
dhcptools returns zero upon successful completion or non-zero if the command failed, in which case an
explanation is written to standard error.
EXAMPLES
Dump the active bootpd server’s internal data to the dump output files:
dhcptools -d
Generate a /tmp/dhcphosts file with 10 entries:
dhcptools -h fip=192.11.22.0 no=10 sm=255.255.255.0 hn=workstation#?
Query the active bootpd daemon for the the current packet trace count:
dhcptools -t
Set the count to 10 packets:
dhcptools -t ct=10
Preview two clients’ address assignments by hardware address:
dhcptools -p ht=1 ha=080009000001 sn=192.11.22.0 lt=infinite
dhcptools -p ht=1 ha=080009000002 sn=192.11.22.0 lt=600 rip=192.11.22.105
To preview a client’s address assignment by client identifier, a unique client identifier value is needed. This
information can be obtained for actual DHCP clients (provided they support a client identifier) from the
manufacturer’s documentation. See bootpd(1M) for more information about the client identifier. Assuming
that
serial_number_12345678
is a valid client identifier, the preview command is:
dhcptools -P ci="serial_number_12345678" sn=192.11.22.0
To reclaim an IP address by hardware address:
dhcptools -r ip=192.11.22.149 ht=1 ha=080009000006
The parameter values were obtained from this sample entry in the dhcpdb file:
C 192.11.22.0: 192.11.22.149 00 1 080009000006 FFFFFFFF 00
To reclaim an IP address by client identifier (see earlier example of preview by client identifier):
dhcptools -R ip=192.11.22.110 ci="serial_number_12345678"
To validate a bootptab and dhcptab file:
dhcptools -v bt=/home/mydir/bootptab dt=/home/mydir/dhcptab
WARNINGS
The dhcptools operations of dump, packet trace, preview, and reclaim depend on communication with
the local bootpd server. If the server is not running, you may encounter an error.
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 153