BASH – ARP Scan command

The following syntax will scan a range of IP addresses. At the point of a ARP response being received it will show a reply message (shown in below example).

Note : In this example it will scan IPs between 10.1.1.1-255.

if [ -x  /sbin/arping ] ; then for i in {1..255} ; do echo arping 10.1.1.$i ; arping -c 1 10.1.
1.$i | grep reply ;    done ; fi
Output Example
arping 10.1.1.20
Unicast reply from 10.1.1.20 [00:50:53:47:AD:2A]  0.938ms
arping 10.1.1.21
arping 10.1.1.22
arping 10.1.1.23
Rick Donato

Want to become a Linux expert?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial