ping scan LAN network

Post Reply
mister_v
Posts: 139
Joined: Sat Jun 20, 2009 5:42 pm

ping scan LAN network

Post by mister_v »

Is there an easy way to scan the network for all computers?
like ping, but not do all the 254 ip's by hand ?
Chris
Site Admin
Posts: 129
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

Re: ping scan LAN network

Post by Chris »

Excellent tools are nmap and fping

Code: Select all

nmap -sP 192.168.1.1/24

Code: Select all

fping -a -r 0 -g 192.168.1.1/24
But if you don't want to install a new tools,
you can try with the default ping.

Code: Select all

for i in {1..254}; do (ping -vc 1 -t 4 192.168.1.$i); done
Or, if you want a clearer output, add grep:

Code: Select all

for i in {1..254}; do (ping -vc 1 -t 4 192.168.1.$i) | grep "bytes from"; done
Post Reply