1dhcping(8)                  General Commands Manual                 dhcping(8)
2
3
4

NNAAMMEE

6       ddhhccppiinngg - send a DHCP request to DHCP server to see if it's up and
7       running
8

SSYYNNOOPPSSIISS

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

DDEESSCCRRIIPPTTIIOONN

14       This command allows the system administrator to check if a remote DHCP
15       server is still functioning.
16
17       Options are:
18
19       --vv   Verbose, print some information.
20
21       --ii   Use DHCPINFORM packets.
22
23       --rr   Use DHCPREQUEST packets (default behaviour).
24
25       --qq   Quiet, print nothing on the screen.
26
27       --tt maxwait
28            Maximum time to wait for an answer from the server in seconds.
29            Default is 3 seconds.
30
31       --cc client-IP-address
32            Request this IP address. Note that this is also the IP address the
33            answer will be sent to.
34
35       --ss server-IP-address
36            Send the DHCP packet to this IP address.
37
38       --hh client-hardware-address
39            Use this hardware-address in the DHCP request. It can be up to
40            sixteen octets seperated by colons (i.e. 01:02:03:04)
41
42       --gg gateway-IP-address
43            Use this IP address for the gateway IP address in the DHCP packet.
44            This option is currently broken.
45

RREETTUURRNN VVAALLUUEESS

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

SSEETTUUPP

51       This program should be installed setuid root or ran by root only.  See
52       SECURITY for more information.
53
54       On your DHCP server, add these lines to the dhcpd.conf:
55
56         host <your monitoring host FQDN> {
57            hardware ethernet <your monitor host mac address>;
58            fixed-address     <your monitoring host IP address>;
59         }
60
61       Then try it:
62
63       $ dhcping -c your monitoring host IP address \
64                 -s your DHCP server IP address \
65                 -h your monitor host mac address
66
67       It will either respond with "no answer" or "Got answer from: your DHCP
68       server IP address"
69
70       The DHCP server logfile will give:
71        DHCPREQUEST for 192.168.1.1 from 00:20:18:56:29:8f via ed0
72        DHCPACK on 192.168.1.1 to 00:20:18:56:29:8f via ed0
73        DHCPRELEASE of 192.168.1.1 from 00:20:18:56:29:8f via ed0 (found)
74
75       Running in DHCPINFORM mode with --ii:
76
77       If you see "DHCPINFORM from 192.168.1.1 via xl0: not authoritative for
78       subnet 192.168.1.0", you should add the authoritative statement to the
79       subnet, See dhcpd.conf(5) for details.
80
81       When running in very verbose mode, ddhhccppiinngg tries to dump all data of
82       the send and received DHCP packets. It will first dump the packet in
83       hex-format, then decodes the header and finally the options.
84

HHOOWW IITT WWOORRKKSS

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

SSEECCUURRIITTYY

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

BBUUGGSS

96       Currently (this may, or may not, change in the future) the ISC DHCP
97       daemon does not write leases with a fixed IP address in the
98       dhcpd.leases file.
99
100       DHCPINFORM packets can only be used on subnets the server is authori-
101       tative for. If the monitoring script runs on a subnet the server isn't
102       authoritative for, it should use the DHCPREQUEST packets. I also
103       experienced some problems with ISC DHCPD v2 servers, but that is also
104       in the README of it.
105
106       The --VV option is still working, but shouldn't be used for debugging of
107       the packets. Better use dhcpdump(8) for that, which is available on my
108       website. I wanted to remove it, but decided only to do it from the
109       documentation, not from the code. Maybe I'll need it one day for
110       debugging.
111

AAUUTTHHOORR

113       Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)
114

SSEEEE AALLSSOO

116       dhcpd(8), dhclient(8), dhcpd.conf(5), dhcpdump(8)
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
1413rd Berkeley Distribution      Januari 27, 2002                     dhcping(8)
Impressum