EDIT the selected answer solves the broader problem that I was trying to solve, which is "Given selected mac addresses, how do I efficiently find each mac addresses corresponding IP address on the local network?".
ORIGINAL: I need to write a program to find out the IP addresses of machines on my local network.
I have the mac address of the machines.
Given that DHCP servers return the same IP address for a given mac address, would it be possible somehow to send a DHCP request to the server, insert the known mac address, and capture the response, which presumably has the correct IP address in it for that mac address?
FURTHER INFORMATION: I tried arpwatch and found it to be unreliable. Much more satisfactory was addrwatch https://github.com/fln/addrwatch
ping
all of them from the same host in their network, and doarp -a
.ping -b
), but not all hosts answer those. If you have a home router, a third option is to ask it for MAC-to-IP mappings if the router supports it (some do via UPNP).arpwatch
if you have time to wait