dhcping – a utility for checking DHCP-servers using unicast packages.
In Ubuntu, you can install dhcping with the command:
sudo apt-get install dhcping
First let’s see what IP-addresses are received and from which gateway:
ifconfig route netstat -rn | grep default
Also you can see the information received from DHCP in the directory /var/lib/dhcp/.
In my case, IP is received from the DHCP server 10.0.2.2.
Here’s an example of running dhcping:
dhcping -s 10.0.2.2
If the DHCP server responds, the following information will be displayed:
Got answer from: 10.0.2.2
If there is no answer:
I’ll describe the dhcping startup keys:
-v (detailed mode)
-V (very detailed mode)
-i (use DHCPINFORM packets)
-r (use DHCPREQUEST packets (standard))
-q (quiet mode)
-t maxwait (response timeout, standard 3 seconds)
-c IP (request the specified IP)
-s IP (send request to specified IP)
-h MAC (use the specified MAC address in the request)
-g IP (use the specified IP gateway in the packet)