Inspiration & Genius – One and the Same

Scan a range of IP addresses

Another post from SHELL-FU! (with some input from me too)

You may want to know which IP addresses have devices connected to them on a network segment. The following one-liner will ping scan a given range.

for IP in 192.168.1.{1..10}; do if ping $IP -c 1 > /dev/null; then echo $IP alive; else echo $IP dead; fi; done

Or, better still, how about this?

$ for i in `seq 1 255`; do ping -c 1 10.10.10.$i | tr n ' ' | awk '/1 received/ {print $2}'; done

But then you could do the same thing with NMAP, if you have it installed.

$ nmap -sP 192.168.1-255

And if you are not command line comfortable there are tools for PC’s, Mac’s, Linux etc out there. Just search google for ping sweep applications.

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Genesis Framework

Genesis Framework for WordPress

Studiopress Themes

Scribble Theme - A Beautiful Frame For Your WordPress Website

Advertisements