At work, we have a network with internal ip addresses given to machines.

Question: How can I find MAC address of machines in my network whose IP address is known to me.

Also how to find mac address of my router whose ip address I know.

I work on ubuntu.

link|improve this question

54% accept rate
feedback

2 Answers

up vote 4 down vote accepted

Erm, arping isn't needed. You can just use arp.

arp <ipaddress>

same thing with your gateway. netstat -rn to find your gateway then arp <ipaddress>, use arp -i <device> <ipaddress> if you want to force a specific interface.

you probably also want to use the -c 4 arguments if you decide to use arping.

After all is said and done you can simply type arp -a to get your current ARP table. another reason arping isn't ideal is that it's not installed by default on many systems.

link|improve this answer
feedback

Use arping as superuser:

sudo arping -I<interface> <IP>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.