I tried a simple bash loop with ping but for a /24 subnetwork, it takes roughly 5 minutes to check all hosts…
for ip in $(seq 1 254); do ping -c 1 192.169.1.$ip>/dev/null [ $? -eq 0 ] && echo "192.169.1.$ip UP" || : done
It works and the only dependency is your shell but It certainly is not nice and far away from the best solution to solve the problem.
I installed nmap and ran the following command:
nmap -sP 192.169.1.0/24
For newer versions of nmap you can also use sn instead
nmap -sn 192.169.1.0/24
It took only a couple of seconds for all hosts to respond compared to a couple of minutes looping ping instead!
If your firewall does not allow ICMP echo requests your network participants will not respond to a ping request even though they are up. You might want to consider opening your firewall to ICMP requests for local networks only if your host is also available publicly. 02/10/2016