#for ip in $(seq 1 254); do
ping -c1 -w1 192.168.1.$ip>/dev/null && echo “192.168.1.$ip is UP”
done
This will ping each computer on the 192.168.1.x subnet one time, with a one second interval between pings. The output should be something like
192.168.1.1 UP192.168.1.17 UP
192.168.1.24 UP
------------------ OR
# netdiscover -r 192.168.0.0/24
# fping -g 192.168.1.0/24
# nmap -sP -n $ip
(replace eth0 with your NIC):
# sudo arp-scan -I eth0 -l
No comments:
Post a Comment