Is there a way to find out a computer's MAC address if we know its IP address, assuming this computer is outside our LAN? I know we can easily get the physical address of a computer in our LAN using getmac or arp in command prompt, but these commands don't work for other remote hosts.
Getting a MAC address requires the ability to get broadcast traffic.
ARP is a broadcast protocol and is therefore only available on a LAN.
Once traffic is routed you are unable to get the MAC address as it is stripped from the packet once it crosses the boundary of a router/L3 device.
Switches have a MAC table. Routers have a routing table, in general.
You can only get MAC addresses from a LAN.
No. MAC addresses only have significance on a LAN. Different LAN types have difference kinds of MAC addresses. Knowing the MAC address of a host on a different LAN is meaningless.
Using the DHCP server or known bindings you can find it, I have done this in Windows server before, it is not common but it is possible. ARP is locally based and just a binding between an IP and MAC address tying them together to facilitate traffic flow past the boundaries of layer 3 network boundaries.....This is where routers come in. MAC addresses are only important getting the frame/packet to the router, at that point it is then forwarded again based on the MAC/IP combination.
ANgry IP scanner would tell you, and you could locally perform an arp -a...routers use this to map MAC addresses when they are not known at a layer three boundary in order to assist with route forwarding for packets. this information is then stored in the arp cache of the device.MAC addresses exist per LAN, routers connect LAN boundaries at layer 3, hence tying the two together.