简体   繁体   中英

Finding an IP address by MAC address

I know this question has been asked before and that and my own findings rely on using the ARP functionality.

The problem is that ARP only contains entries of IP/MAC addresses that have been “initialized” by some application/code. It could even be as simple as just a ping.

I came across reverse ARP (NARP?) but could not find any sample code for it anywhere.

Is it possible to acquire an IP address by just knowing the MAC address?

I could ping the whole su.net, but that would be inefficient.

I don't know how to integrate terminal command results on C# but I know you can get just the IP address scanning the Mac on your local.network by implementing this command on a terminal.

sudo arp-scan --localnet | awk '/b8:27:/ { print $1 }'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM