Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] Determine MAC address based on IP address
Delphi, Lazarus, Free Pascal
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2822
Topic starter
April 24, 2016 11:37 PM
I hate entering a MAC Address, especially when I already know the IP address.
With this little trick (tested on MacOSX and Linux, but will probably also work under Windows), you can retrieve the MAC address of another computer in your network.
$ ping -c 1 192.168.1.10
PING 192.168.1.10 (192.168.1.10): 56 data bytes
64 bytes from 192.168.1.10: icmp_seq=0 ttl=64 time=313.632 ms
--- 192.168.1.10 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 313.632/313.632/313.632/0.000 ms
$ arp 192.168.1.10
aftv_bedroom (192.168.1.10) at 0:2b:3a:4f:69:ba on en0 ifscope [ethernet]
The ping is sometimes needed to avoid getting this with Arp:
$ arp 192.168.1.10
192.168.1.10 (192.168.1.10) -- no entry