Ping





Fast ping time

From the command prompt, type....

for /l %i in (1,1,254) do @ping 192.168.1.%i -w 10 -n 1 | find "Reply"

This will ping all addresses from 192.168.1.1 to 192.168.1.254 one time each, wait 10ms for a reply (more than enough time on a local network) and show only the addresses that replied.

Variables:

  • Change the IP address after @ping to reflect your network's IP range.
  • Syntax for for /l is (start,step,end) if you want to change the range to scan.
  • The -w 10 tells it to only wait 10 ms for a reply before moving on. If your network is slow you will have to increase this value or take it out all together, although this will make it very slow.
  • The vertical line character before find is typed as shift-\ on the Windows keyboard.

Also, note that the Windows find is case sensitive, so make sure you capitalize "Reply" or you won't get any output. Optionally you can just type "eply" and it will automatically add the capital R in the response.

Longer ping time

This is the same as above, with the -w variable changed to allow a 100ms reply window.

for /l %i in (1,1,254) do @ping 192.168.1.%i -w 100 -n 1 | find "Reply"

This will ping all addresses from 192.168.1.1 to 192.168.1.254 one time each, wait 100ms for a reply and show only the addresses that replied.