Friday, August 04, 2006

How to get a MAC Address from an IP

Sometimes we need an information about MAC Address from an IP. How to do that? You can use arp command on both Windows and Linux area.

On Windows, only type arp -a IP_ADDRESS. For example :

C:\Documents and Settings\Administrator>arp -a 172.16.3.157

And the DOS prompt would echoing something like this

Interface: 172.16.3.87 --- 0x2
Internet Address Physical Address Type
172.16.3.157 00-11-09-97-ac-66 dynamic


On Linux, you can type arp IP_ADDRESS. For example :

[root@ppbj upload]# arp 172.16.3.157

And the terminal would echoing something like this

Address HWtype HWaddress Flags Mask Iface
172.16.3.157 ether 00:11:09:97:AC:66 C eth0


For a note, if there are no information after typing the command above, please try to ping the destination IP first. For example :

ping 172.16.3.157

No comments: