-   Linux - Networking (
-   -   Scanning network for DHCP servers (

pgb205 08-07-2008 05:23 PM

Scanning network for DHCP servers
we apparently have more than one dhcp server on our network which is causing issues. I tried using nmap -sU -p 67
to find all the dhcp servers but doesn't look like this worked. Tried using wireshark and looking for boot.dhcp packet but this again doesn't seem to give consistent results. What utilities are there for linux (or methods available) to find out ip's for all the dhcp servers on a given subnet.


grepmasterd 08-07-2008 05:46 PM

if your clients are linux boxes you can examine the dhclient.leases to see what server the lease came from.

~$ locate dhclient*leases

since I know that eth2 is connected to my LAN currently, I can search for the server string in this way

~$ grep dhcp-server-identifier /var/lib/dhcp3/dhclient.eth2.leases
option dhcp-server-identifier;
option dhcp-server-identifier;

there are my two servers.

pgb205 08-07-2008 06:52 PM

If i understood you correctly there is a problem with you method. There is a good chance that you will get information about all DHCP servers in the lan. So linclientA may have information about DHCPServer1 and linclientB may have info from DHCPServer2. But it's also possible that all the linux clients got their information from the same DHCP server. So even I check a few clients there is no guarantee that i have information about ALL the DHCP servers.

grepmasterd 08-07-2008 07:02 PM

True, it's not an active scan, it's just a good place to look if your intent is to just fix the current problem.

if you want to run scans on a routine basis, there are allegedly tools that will do this. Search google for 'rogue dhcp servers'.

Also, have you seen this?

All times are GMT -5. The time now is 07:26 AM.