Address Resolution Protocol (ARP) does exactly the opposite, I mean it transforms IP Addresses into their corresponding MAC Addresses, it uses the physical to send the packet and bring the attention of the remote NIC (Network Interface Card), it caches that information in the ARP table to avoid doing the query for each packet. ARP table's info is not persistent because as you can imagine IP addresses can change (i.e:DHCP)
What I'm trying to say is that there is no direct way to translate MAC into IP, unless you ping your entire network so you build the ARP table ( this is crazy and takes forever ) or use another mechanism like querying a router/switch for their entries ( they are short-lived too). Even more the entries in the ARP table are from your LAN, all other IP addresses behind the router will have router's MAC address
|