3

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?

James
  • 7,553
  • 2
  • 24
  • 33
Kazoom
  • 203
  • 4
  • 10

4 Answers4

2

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.

Nick Kavadias
  • 10,758
  • 7
  • 36
  • 47
1

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.

Maximus Minimus
  • 8,937
  • 1
  • 22
  • 36
0

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.

Gerald Combs
  • 6,331
  • 23
  • 35
0

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

DHCP Server Management API Functions

Joe Doyle
  • 1,681
  • 14
  • 15