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 192.168.0.1-254 -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.
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 192.168.99.254;
option dhcp-server-identifier 10.5.5.1;
there are my two servers.
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.
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 06:40 PM.|