Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I perform a ping on the entire subnet 4

Status
Not open for further replies.

BugsySiegel

IS-IT--Management
Dec 18, 2001
6
US
I have been away too long. I know there's a way to ping my entire subnet to see who I get a reply from. I just don't remember how to do it. I thought all I had to do was ping the broadcast address (x.x.x.255), but when I do that, I get just the one reply. I don't get a reply from all connected nodes. What am I doing wrong?

Thanks in advance for answering such a stupid question.
 
That doesn't work. There doesn't seem to be a -b switch. Am I missing something?

Thanks
 
As you haven't stated what OS you are on, it's hard to help as ping varies. The above works fine on Linux.

//Daniel
 
There are some very nice programs that can tell you this information very easily like " Ping TOOL ". Most of these are freeware programs, I have found them to be very simple to use and read this kind of information. I know you do not need a program to read this info, But its so graphically nice & easy Why NOT?
 
Try this: In the command prompt -- c:\>FOR /L %i IN (1,1,20) DO ping -a 192.168.0.%i

above example will ping 192.168.0.1 to 192.168.0.20. giving the computer name and a reply.
 
I'm very sorry. I'm using Windows 2000 either server or professional.

I thought there was an old DOS command that allowed me to do this. Maybe not. Maybe it was only from the router I was able to do it.
 
Why don't you try my suggestion, I tested it on Win2k server.

Let's say you want to ping 192.168.0.1 to 192.168.0.255
From the command prompt:

c:\>FOR /L %i IN (1,1,255) DO ping -a 192.168.0.%i then Enter.

(1,1,255) - (start,step,end) and %i is the variable.
 
You are a Genius!! Where did you find this command string? I did try it earlier, but I couldn't get it to work. When you said you got it to work on W2K, I tried again and started dropping off characters at the beginning of the string until it worked. This is a keeper - Thank you very much!
 
Yeah the programs LIKE "PING TOOL", Run a similiar thing. Executed much faster with the tool. Also, It organizes the data and allows you to extract it to a text file.
 
You're welcome guys, but the command string is from the FOR statement usually used in a batch file. I experimented it until I got it correctly.

Keif:
If the "Ping Tool" is a utility then it should work better. Is it free?
 
I downloaded the P-Ping Tool and it's very difficult to use. I am having to input each IP address one at a time before I can do a ping on all of them. I have a /23 subnet which has 512 IP addresses. That's too much. I would rather have a tool where I put in the network address and the broadcast address and have it discover everything on its own. Maybe I'm doing it wrong - that's quite possible.

Thanks again to everyone who responded.
 
ricpinto,

Outstanding! That is a really cool piece of scripting.

Star for you bud!

Hewissa

MCSE, CCNA, CIW
 
Thanks for the * Hewissa.

Guys, finally I got it to be extracted to a file:

From the command prompt:

c:\>FOR /L %i IN (1,1,255) DO ping -a 192.168.0.%i>>ping.txt

(1,1,255) - (start,step,end)
%i - variable.
ping.txt - Resulting file.






 
Yeah, Ping TOOL is freeware. Try to find it on Downloads.com . Its a small download and a real useful utility!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top