Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to know the MAC to IP address mapping stored on DHCP server.

I don't 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?

share|improve this question

4 Answers 4

In Windows Server 2008 (possibly for 2003 as well, but don't have access to a 2003 DHCP server right now)

Start the DHCP mmc. The IP leases & mac addresses should be under Scope->Address Leases.

If you want to export them to a file & then you can right-click on addresses leases and select Export List...

alt text

Getting this programatically? DHCPOBJS.DLL from the Windows 2000 Resource Kit looks promising.

share|improve this answer
    
thanks , that looks promising, let me get check the dll –  Kazoom Feb 9 '10 at 18:31

Last time I looked, Advanced IP Scanner was able to provide this info. It doesn't query DHCP for it (goes out to the network instead), but it is pretty damn fast and will cost you nothing.

share|improve this answer
    
i need to use it in a prgoram advanced ip scanner wont do that –  Kazoom Feb 8 '10 at 21:59

Are you sure scanning takes a long time? I just scanned a /24 using nmap in just under 4 seconds. Along with scanning and querying the DHCP server, you might also look at querying your switch CAM table(s) or router ARP table(s) via SNMP.

share|improve this answer

You can also use the Windows API if you can use a native language like C++.

DHCP Server Management API Functions

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.