4

At work, we have a network with internal IP addresses given to machines. How can I find the MAC address of machines in my network whose IP address is known to me?

Also how do I find the MAC address of my router whose IP address I know?

I work on Ubuntu.

goldenmean
  • 2,497

2 Answers2

7

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.

skrewler
  • 1,035
2

Use arping as superuser:

sudo arping -I<interface> <IP>
Casual Coder
  • 4,032