Page 1 of 1

ping scan LAN network

Posted: Sun May 19, 2024 11:50 am
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 ?

Re: ping scan LAN network

Posted: Sun May 19, 2024 12:14 pm
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