arping in linux for getting MAC address and update ARP caches by broadcast

Suppose we want to know MAC address of then we can log on one linux host which is in the same subnet of, e.g.

[root@centos-doxer ~]#arping -U -c 3 -I bond0 -s
ARPING from bond0
Unicast reply from [00:21:CC:B7:1F:EB] 1.397ms
Unicast reply from [00:21:CC:B7:1F:EB] 1.378ms
Sent 3 probes (1 broadcast(s))
Received 2 response(s)

So 00:21:CC:B7:1F:EB is the MAC address of And from here we can see that IP address is now used in local network.

Another use of arping is to update ARP cache. One scene is that, you assign a new machine with one being used IP address, then you will not able to log on the old machine with the IP address. Even after you shutdown the new machine, you may still not able to access the old machine. And here's the resolution:

Suppose we have configured the new machine NIC eth0 with IP address which is already used by one old machine. Log on the new machine and run the following commands:

arping -A -I eth0
arping -U -s -I eth0 #this is sending ARP broadcast, and is the gateway address.
/sbin/arping -I eth0 -c 3 -s #update neighbours' ARP caches


  1. You can run 'arp -nae'(linux) or 'arp -a'(windows) to get arp table.
  2. Here is more about arp sproof prevention (in Chinese. statistic binding/arp firewall/small vlan/PPPoE/immune network).
  3. Here is about Proxy ARP(join broadcast LAN with serial link on router).

Good Luck & Best Wishes