As we have already discussed in one of our previous articles, ARP protocol  is commonly used by layer two devices to communicate and discover each other easily. The arping utility performs an action similar to ping, but at the Ethernet layer. Where we can use ping to tests the reachability of an IP address, arping can be used to report the reachability and round-trip time of an IP address hosted on the local network.

You can use the following command to install arping in yur system

#apt install arping

Execute the following to check the version

#arping -v

To check the current ARP entries in your ARP table, issue the following command

#arp  -a

In this case, I am presented with the only entry in my ARP table : a router accessible via the IP address.

Execute the following command to ping a host using arping

#arping -c 2 <ip_address>

Here I have specified the number of pings to be sent using the “-c” option for “count”.

As you can see, if you are getting response pings, you are presented with the MAC address of the corresponding device.

You will have to specify the network interface if you have multiple network interfaces on your system. You can do it by using the following command

#arping -I <interface_name> <ip address>

You can specify the source MAC address you are sending packets from using the following command

#arping -c 2 -s <mac_address> <ip_address>

In this scenario, you can use 2 options

  • You are the owner of the MAC address and you can simply use the “-s” option.
  • You are not the owner of the MAC address and you are trying to spoof the MAC address. In this case, you need to use the promiscuous mode using the “-p” option
#arping -c 2 -s <mac_address> -p <ip_address>







The following two tabs change content below.
Ruwantha Nissanka is a Professional Cyber Security Engineer from Sri lanka with having a demonstrated history of providing cyber security services for multiple organizations in Sri Lanka. He is a positive person who wants to believe the best in others and he likes to help, encourage people and make them feel good.