How to get MAC address via IP
I have an IP address of a computer which I am currently away from, and I need the MAC address. How do I get the MAC address if I ony have the IP?
possible duplicate of Resolving an IP address of a Remote machine to its MAC address
Might be easy if it's an IPv6 address (sometimes MAC addresses are part of public IPv6 addresses).
In short the answer will be you can't.
It is usually not possible for a person to get the MAC address of a computer from its IP address alone. These two addresses originate from different sources. Simply stated, a computer's own hardware configuration determines its MAC address while the configuration of the network it is connected to determines its IP address.
However, computers connected to the same TCP/IP local network can determine each other's MAC addresses. The technology called ARP - Address Resolution Protocol included with TCP/IP makes it possible. Using ARP, each computer maintains a list of both IP and MAC addresses for each device it has recently communicated with.
And that short answer is wrong. One can **always** do an ARP lookup to determine the MAC of an IP. The only thing is that you probably are not seeing the actual IP of a device (due to NAT), if you're on separate networks.
The above comment is wrong. If you do an ARP lookup for an IP that's not on the same network, you will generally get no reply. There are some cases where ARP masquerading is configured and *will* reply, but it's quite rare to do that as it causes other problems.
@pjc50 Getting no replay does not prevent one from attempting an ARP lookup. My main point is that you can **always** do a lookup. And, if you're on the same network, you will **always** get what you were looking for. That's how the Ethernet protocol works. Otherwise there would be no IP packet exchange on the network, because NICs would not be able to resolve IPs to MACs.
@U-D13 `I have an IP address of a computer which I am currently away from` ,in the question probably meant that the user is trying to find the MAC address of a computer which is not on the same network. So in that case the answer is right
@Shiva "probably meant". I can be away from my colleagues computer, but we're on the same network. I can be working from home via VPN and be away from my actual work machine, yet we're still on the same network. I strongly believe your answer should be reworded to clearly indicate that one can only resolve IPs to MACs in a local network, but one can **always** do that.
@U-D13: Well If you didn't noticed ,its an accepted answer, so I believe , I did correctly get what the user meant in his question. And this was an answer not a wiki, to handle all possible corner cases. You can ask the user who posted the question what he meant rather that speculating what can be the meaning of 'What he meant' here.
You can, the method in the post below this one works: http://security.stackexchange.com/a/64291/70108