Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
dhcping(8)		    General Commands Manual		    dhcping(8)

       ddhhccppiinngg - send a	DHCP request to	DHCP server to see if it's up and

       ddhhccppiinngg [--vv] [--qq] [--ii] [--rr] --tt maxwait --cc client-IP-address --ss server-
       IP-address --hh client-hardware-address [--gg gateway-IP-address]

       This command allows the system administrator to check if	a remote DHCP
       server is still functioning.

       Options are:

       --vv   Verbose, print some	information.

       --ii   Use	DHCPINFORM packets.

       --rr   Use	DHCPREQUEST packets (default behaviour).

       --qq   Quiet, print nothing on the	screen.

       --tt maxwait
	    Maximum time to wait for an	answer from the	server in seconds.
	    Default is 3 seconds.

       --cc client-IP-address
	    Request this IP address. Note that this is also the	IP address the
	    answer will	be sent	to.

       --ss server-IP-address
	    Send the DHCP packet to this IP address.

       --hh client-hardware-address
	    Use	this hardware-address in the DHCP request. It can be up	to
	    sixteen octets seperated by	colons (i.e. 01:02:03:04)

       --gg gateway-IP-address
	    Use	this IP	address	for the	gateway	IP address in the DHCP packet.
	    This option	is currently broken.

       If everything goes okay,	it returns 0. If there went something wrong,
       it returns 1.

       This program should be installed	setuid root or ran by root only.  See
       SECURITY	for more information.

       On your DHCP server, add	these lines to the dhcpd.conf:

	 host <your monitoring host FQDN> {
	    hardware ethernet <your monitor host mac address>;
	    fixed-address     <your monitoring host IP address>;

       Then try	it:

       $ dhcping -c your monitoring host IP address \
		 -s your DHCP server IP	address	\
		 -h your monitor host mac address

       It will either respond with "no answer" or "Got answer from: your DHCP
       server IP address"

       The DHCP	server logfile will give:
	DHCPREQUEST for from 00:20:18:56:29:8f via ed0
	DHCPACK	on to 00:20:18:56:29:8f via	ed0
	DHCPRELEASE of from	00:20:18:56:29:8f via ed0 (found)

       Running in DHCPINFORM mode with --ii:

       If you see "DHCPINFORM from via xl0:	not authoritative for
       subnet", you	should add the authoritative statement to the
       subnet, See dhcpd.conf(5) for details.

       When running in very verbose mode, ddhhccppiinngg tries	to dump	all data of
       the send	and received DHCP packets. It will first dump the packet in
       hex-format, then	decodes	the header and finally the options.

       The client either sends a DHCPREQUEST or	DHCPINFORM packet to the
       server and waits	for an answer. Then, if	a DHCPREQUEST was send,	it
       will send a DHCPRELEASE back to the server.

       This program is installed setuid	root as	it requires the	privileges to
       bind itself to port 68 (bootpc).	Root privileges	are dropped as soon as
       the program has bound itself to that port.

       Currently (this may, or may not,	change in the future) the ISC DHCP
       daemon does not write leases with a fixed IP address in the
       dhcpd.leases file.

       DHCPINFORM packets can only be used on subnets the server is authori-
       tative for. If the monitoring script runs on a subnet the server	isn't
       authoritative for, it should use	the DHCPREQUEST	packets. I also
       experienced some	problems with ISC DHCPD	v2 servers, but	that is	also
       in the README of	it.

       The --VV option is	still working, but shouldn't be	used for debugging of
       the packets. Better use dhcpdump(8) for that, which is available	on my
       website.	I wanted to remove it, but decided only	to do it from the
       documentation, not from the code. Maybe I'll need it one	day for

       Edwin Groothuis, (

       dhcpd(8), dhclient(8), dhcpd.conf(5), dhcpdump(8)

3rd Berkeley Distribution      Januari 27, 2002			    dhcping(8)

N | S | D | R | S | H | S | B | A | S

Want to link to this manual page? Use this URL:

home | help