Re: getting the MAC address from an ip
On Fri, Jun 24, 2005 at 02:52:40PM +0200, LeVA wrote:
> How can I get a machines mac address, if I only know it's ip?
If it's on your LAN ping it then look at your arp cache:
skx@mystery:~$ ping -c 1 192.168.1.1 >/dev/null
skx@mystery:~$ /usr/sbin/arp 192.168.1.1
Address HWtype HWaddress Flags Mask
Iface
sun ether 08:00:20:C2:1E:F6 C eth0
Or if you have a login you can use ifconfig to read it:
skx@mystery:~$ /sbin/ifconfig |grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:0A:E6:F6:A3:F4
If it's a remote host then you cannot....
Steve
--
Reply to: