IT-Expert on Call

Experience has no substitute
Inexperience carries significant cost and risk
Use System Restore | Total Uninstall | Sync Your Outlook Folders | Prevent Data Loss | Kill spam
- - -
-
Information Technology for Home & Business Close Window

How can You quickly find all the used IP addresses on Your Internal network?

Instead of manually pinging all IP addresses on your LAN you can use this command:

Open Command Prompt and type:

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">>c:\ipaddresses.txt

The "-n 1" is for only 1 ping packet to be sent to each computer.

Change 192.168.0 to match you own Network ID.

This will ping all IP addresses on the 192.168.0.0 network segment and create a text file called IPADDRESSES.TXT in C:\, where it will list only the IP addresses that gave a reply.

You can also add a -a to the PING command to resolve all the responding IP addresses to HOST names, but doing so will cause the script to take a considerable time to finish:

FOR /L %i IN (1,1,254) DO ping -a -n 1 192.168.0.%i | FIND /i "Reply">>c:\ipaddresses.txt

Close Window
-
- - -

IT-Expert on Call Professionals are ready willing and able to expertly deploy it for you


Updated Wednesday 4 January, 2012 10:12 AM
Webmaster: David Mozer