Finding the DHCP Servers on a Subnet

This is useful if you believe there is a rogue DHCP Server causing problems for your clients.

The dhcploc command lets you see a computer’s DHCP traffic for a broadcast domain. Simply pass in the IP address of the machine from which you are running the command:

> dhcploc

You will not see any output from the command until it captures some DHCP traffic. You can try running ipconfig /renew to force some traffic to be generated. You can also press the “d” key when you have dhcploc running to have it generate a DISCOVER message.

Here is some sample output from the command:

9:34:58 (IP)        NACK      (S)     ***
 9:36:38 (IP) OFFER     (S)   ***
 9:36:38 (IP) ACK       (S)
 9:36:53 (IP) ACK       (S)
 9:37:05 (IP) OFFER     (S)
 9:37:05 (IP) OFFER     (S)
 9:37:06 (IP) OFFER     (S)   ***

The first column contains a timestamp, the second column is the IP address of the target computer, the third is the DHCP request type, the fourth is the IP address of the DHCP Server, and the fifth is a flag that indicates whether the DHCP Server is authorized. If it is not authorized, you’ll see three stars (***). In the previous output, you can see that,, and are all unauthorized DHCP Servers.

dhcploc can also send alerts if it detects an unauthorized server. This allows you to start dhcploc, leave it running, and let it proactively notify you when it discovers an unauthorized server. To do so, specify the /a: option followed by the list of users to alert as shown here:

> dhcploc /a:"rallen"

dhcploc works by capturing all of the DHCP traffic it sees on the network. Since most DHCP traffic is sent via broadcast, every computer in the broadcast domain (e.g., all computers connected to a hub on a local segment), can look at DHCP traffic. Most computers simply discard the traffic unless it is destined for them, but dhcploc captures all DHCP traffic.

Do not run dhcploc from a DHCP Server. DHCP traffic will be delivered to dhcploc instead of the DHCP Server. By running the command directly on a DHCP Server, it is likely the server won’t be able to respond to any client requests.