Finding All Hosts On the LAN - Windows/linux
Finding All Hosts On the LAN From Linux / Windows Workstation
Linux:
@ Root Prompt type:
for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done
Output:
192.168.1.1 UP 192.168.1.1 UP 192.168.1.2 UP 192.168.1.5 UP ...... ... .. 192.168.1.254 UP
Windows:
c:> for /L %I in (1,1,254) DO ping -w 30 -n1 192.168.1.%I | find "Reply"
or
FOR /L %i IN (1,1,254) DO ping --a --n 1 10.0.1.%i | FIND /I "Reply">> c:\lanipaddresses.txt
Comments
Post a Comment