fir3net
PPS-Firenetbanner-780.5x190-30-03-17

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

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001