Arping Command Tutorial With Examples For Linux


There are a lot of tools for network troubleshooting and debugging. Arping is one of them which only pings same network hosts. So what makes arping special is it uses network layer arp packets. This works on mac protocol. It is useful especially to find hosts those do not respond layer 3 and layer 4 ping requests.

Install For Debian, Ubuntu, Mint, Kali

We can install arping command for Ubuntu, Debian, Mint, Kali with the arping package name like below.

$ sudo apt install arping -y
Install
Install

Install For CentOS, Fedora, Red Hat

We can install arping command for CentOS, Fedora, Red Hat with the arping package name like below.

$ sudo yum install arping -y

Arping Help

We can list help information and popular options with the -h option like below.

$ arping -h
Help
Help

For complete usage information please use --help option.

$ apirng --help
Arping Detailed Help and Usage Information
Arping Detailed Help and Usage Information

Ping Arp

We will use arping command without providing any option. We will just provide the destination host IP address. In this example, we will ping the IP address 192.168.122.1 with the ARP packages.

$ sudo arping  192.168.122.1
Ping Arp
Ping Arp

From the responses to the ARP ping packets we can find the following information.

  • `index` is the index number of the current ping series which starts from 0 .
  • `time` is the time duration between sending ARP packet and getting a response which is generally around 10 milliseconds.

Set Count

We can set ping request count with -c option. In the example, we will set the ping packet count to 2 .

$ sudo arping -c 2 192.168.122.1
Set Count
Set Count

Set Source Address

Source mac address can be set with -s option. In the example, we will set aa:bb:cc:dd:ee:ff as source mac address

$ sudo arping -s aa:bb:cc:dd:ee:ff  192.168.122.1
Set Source Address
Set Source Address

LEARN MORE  How To Generate Random Numbers In Linux?

Leave a Comment