unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 dhcptools(1M)						       dhcptools(1M)




 NAME
      dhcptools - command line tool for DHCP elements of bootpd

 SYNOPSIS
      dhcptools -d

      dhcptools -h fip=first_IP_address no=number_of_entries_to_generate
	   sm=subnet_mask hn=hostname_template [dn=domain_name]

      dhcptools -p ht=hardware_type ha=hardware_address sn=subnet_identifier
	   [lt=lease_time] [rip= requested_IP_address]

      dhcptools -P ci=client_identifier sn=subnet_identifier [lt=lease_time]
	   [rip=requested_IP_address]

      dhcptools -C cl=class_identifier sn=subnet_identifier [lt=lease_time]
	   [rip=requested_IP_address]

      dhcptools -r ip=IP_address ht=hardware_type ha=hardware_address

      dhcptools -R ip=IP_address ci=client_identifier

      dhcptools -t [ct=count]

      dhcptools -v [bt=bootptabfile] [dt=dhcptabfile]

 DESCRIPTION
      dhcptools is a command line tool that provides access to DHCP-related
      options for the bootpd server.  The options provide control for
      dumping internal data structures, generating a hosts file, previewing
      client address assignment, reclaiming unused addresses, tracing
      packets, and validating configuration files.

    Options
      dhcptools supports the following options:

	   -d	     Dump internal bootpd data to output files.	 The dump
		     output files are /tmp/dhcp.dump.bootptab,
		     /tmp/dhcp.dump.dhcptab, and /tmp/dhcp.dump.other.	The
		     first file reports fixed address clients known to the
		     currently active bootpd server.  The second file
		     reports bootpd global and group configuration.  The
		     third file reports miscellaneous bootpd internal data.

	   -h	     Generate a hosts file in /etc/hosts format; see
		     hosts(4).	The output file is /tmp/dhcphosts.  The file
		     can be incorporated into a name database in advance of
		     bootpd server activation so that the server can
		     automatically allocate a host name along with an IP
		     address to a DHCP client.	For IP address allocation to
		     DHCP clients, the bootpd server uses gethostbyaddr(3N)



 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 dhcptools(1M)						       dhcptools(1M)




		     to find the host name associated with a particular IP
		     address.  Each host entry in dhcphosts contains an IP
		     address followed by a hostname.  The IP address of the
		     first entry is first_IP_address.  The hostname of the
		     first entry is derived from the hostname_template.
		     Each subsequent host entry contains a unique IP address
		     and hostname derived from the first_IP_address,
		     subnet_mask, and hostname_template.  The wildcards
		     permitted in the hostname_template are *#?.  A * means
		     to use a character selected sequentially from the range
		     [a-z,0-9].	 A # means to use a digit selected
		     sequentially from the range [0-9].	 A ?  means to use a
		     letter selected sequentially from the range [a-z].	 A
		     maximum of 3 wildcards can be specified.  If a
		     domain_name is specified, it will be appended to the
		     hostname.	The maximum number_of_entries_to_generate is
		     1000.

	   -p	     Preview a client's address assignment based on current
		     conditions for the bootpd server.	The output is
		     written to stdout.	 The subnet-identifier tells bootpd
		     the subnet for which the client is requesting an IP
		     address.  Optionally, the user may request a specific
		     IP address and lease duration using the parameters
		     lease-time and requested-IP-address.  Use Internet
		     address dot notation (see inet(3N) for the IP address
		     and an integer number of seconds for the lease-time.

	   -P	     Preview a client's address assignment based on current
		     conditions for the bootpd server.	This option is the
		     same as -p except that the client is identified by a
		     unique client-identifer.  See bootpd(1M).

	   -C	     Preview a client's address assignment based on current
		     conditions of the bootpd server.  This option is the
		     same as -p except that the class identifier is used to
		     identify the device group from which the client is
		     requesting an IP address. See bootpd(1M).

	   -r	     Reclaim a client's IP address for re-use by the bootpd
		     server. This option is intended for limited 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
		     (e.g. 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.





 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000






 dhcptools(1M)						       dhcptools(1M)




	   -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:





 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000






 dhcptools(1M)						       dhcptools(1M)




	   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.

 AUTHOR
      dhcptools was developed by HP.

 FILES
      /tmp/dhcphosts		       hostgen output file in /etc/hosts
				       format
      /tmp/dhcptrace		       packet trace output file
      /tmp/dhcpvalidate		       validate output file
      /tmp/libdhcp.sl		       library file
      /tmp/dhcp.dump.bootptab	       dump output file
      /tmp/dhcp.dump.dhcptab	       dump output file
      /tmp/dhcp.dump.other	       dump output file
      /etc/bootptab		       default bootptab file for validate
      /etc/dhcptab		       default dhcptab file for validate




 Hewlett-Packard Company	    - 4 -   HP-UX Release 11i: November 2000






 dhcptools(1M)						       dhcptools(1M)




      /tmp/dhcpfifo.root	       FIFO file for dhpctools to bootpd(1M)
				       communication
      /tmp/dhcpfifo.any		       FIFO file for dhcptools to bootpd(1M)
				       communication
      /tmp/dhcpfifo		       FIFO file for bootpd(1M) to dhcptools
				       communication

 SEE ALSO
      bootpd(1M), bootpquery(1M); DARPA Internet Request For Comments
      RFC1541, RFC1542, RFC1533, RFC1534, Assigned Numbers












































 Hewlett-Packard Company	    - 5 -   HP-UX Release 11i: November 2000