I need to get the mapping of MAC to IP stored on DHCP server, either through a program running on the server itself or preferably through a program running on one of the DHCP clients.
I understand netsh utility can be used to get the dump however i have not had much success with that.
Any working examples or hint on that?
I have admin rights on DHCP server
Edit
I dont want to use arp cache as that would require me to either broadcast ping (which is not allowed on windows) or ping the all possible ip address of subnet( which takes lot of time).
I am sure that DHCP server stores the mapping of MAC to IP, how can i use that information, to map MAC to IP address?
Would using
arp -ado the trick...on my machine the output I get is:I have the mac/ip address replaced by bogus values to show the results...
By shelling out using
System.Diagnostics.Process, you can redirect the output to an input stream and read from it...Hope this helps, Best regards, Tom.