Home
› Blog archive
› Ping entire subnet
Posted by Marius Voila
on March 31, 2010
in London, U.K .
— This post contains 67 words
Wrote a quick bash script to find which ip’s on our subnet return a ping.
#!/bin/bash
for ((i=1;i<=255;i+=1)); do
echo "Pinging 192.168.1.$i"
ping -c 5 -W 20 192.168.1.$i >> ping_log.txt
done
Or I just could’ve used nmap:
**nmap -sP 192.168.1.0/24**
[