C:\> arp -a <ip-address> (Windows)
or
$ /sbin/arp <ip-address> (Linux)
will give you the MAC address of the specified IP address. You will need to parse the output if you are using this in a script, but the third field (HWaddress) is the one you want to look at.
update: arp will only return valid information about an IP address for other addresses on the same subnet. So, if the IP address you are asking about is beyond a router (or switch), then you will only be able to get information about the nearside router interface. Thanks to yibC for pointing this out.
In reply to Re: Re: Re: MAC address for Linux Machine
by nimdokk
in thread MAC address for Linux Machine
by vvrao_2000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |