Posts Tagged ‘dhcp request’

How to scan for DHCP available servers in a Network range on Linux and FreeBSD

Thursday, December 8th, 2011

Reading Time: < 1 minute
GNU / Linux and FreeBSD had a nifty little program (tool) called dhcping . dhcpingsend a DHCP request to DHCP server to see if it’s up and running. dhcping is also able to send a request to DHCP servers on a whole network range and therefore it can e asily be used as a scanner to find any available DHCP servers in a network.
This makes dhcping a nmap like scanner capable to determine if dhcp servers are in a network 😉
To scan an an entire network range with dhclient and find any existing DHCP servers:

noah:~# dhcping -s -r -v
Got answer from:
received from, expected from
no answer

In above’s output actually my Dlink wireless router returns answer to the broadcast DHCP LEASE UDP network requests of dhcping .
On a networks where there is no DHCP server available, the requests dhcping -s -r -v returns:

noah:~# dhcping -s -r -v
no answer

This article was inspired by a post, I’ve red by a friend (Amridikon), so thx goes to him.