Solved

ping a group of computers

Posted on 1998-10-03
9
305 Views
Last Modified: 2013-12-23
how i can ping a range of ip addresses ( for example between 150.66.87.10 and 150.66.87.200 )?
0
Comment
Question by:eyad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 

Accepted Solution

by:
twine earned 70 total points
ID: 1563320
You may try and play with the following batch files.  They work fine for me but you may have to play with them to make them work with anything less than 100.  

Name this pingall.bat replace with the first 3 octs of your domain. This also assumes that you will get "Reply" for a good reply

@echo off
:START
call add.bat
ping 127.0.0.%H%%T%%D% | find "Reply" > nul
if not errorlevel 1 echo %H%%T%%D% >> GoodPing.txt
if %H%%T%%D%==254 goto DONE
goto START
:DONE


Call this add.bat and put in the same directory.

:: ADD.BAT
:: Increments a three digit number
:: Works by comparing each digit
:: H=hundreds, T=tens, D=digits
@echo off
if [%H%]==[] set H=1
if [%T%]==[] set T=0
if [%D%]==[] set D=0
:DIGITS
if %D%==9 goto TENS
if %D%==8 set D=9
if %D%==7 set D=8
if %D%==6 set D=7
if %D%==5 set D=6
if %D%==4 set D=5
if %D%==3 set D=4
if %D%==2 set D=3
if %D%==1 set D=2
if %D%==0 set D=1
goto DONE
:TENS
set D=0
if %T%==9 goto HUNDREDS
if %T%==8 set T=9
if %T%==7 set T=8
if %T%==6 set T=7
if %T%==5 set T=6
if %T%==4 set T=5
if %T%==3 set T=4
if %T%==2 set T=3
if %T%==1 set T=2
if %T%==0 set T=1
goto DONE
:HUNDREDS
set T=0
if %H%==9 set H=0
if %H%==8 set H=9
if %H%==7 set H=8
if %H%==6 set H=7
if %H%==5 set H=6
if %H%==4 set H=5
if %H%==3 set H=4
if %H%==2 set H=3
if %H%==1 set H=2
if %H%==0 set H=1
goto DONE
:DONE
echo %H%%T%%D%


You may strip the HUNDREDS off for the first 89 and then use the full format for all over 100.  Play with it and see what you think.

0
 
LVL 37

Expert Comment

by:bbao
ID: 1563321
It looks the proposed answer cannot do ping from 150.66.87.10 to 150.66.87.200 as the asker mentioned.
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1563322
How about FOR /L %A IN (10,1,200) DO PING 150.66.87.%A

Do a HELP FOR in a command box to get the FOR syntax..
0
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 37

Expert Comment

by:bbao
ID: 1563323
BlackMan's comment should be the answer. Hmm, it looks such command only can be done on NT system.
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1563324
That's right, Extended For is only on NT, but then, this is NT Networking :-)
0
 
LVL 37

Expert Comment

by:bbao
ID: 1563325
BlackMan, do you notice that NT's help does not include any information on Extended For. Does original version of NT4 support it? Maybe only with SP3, I think.
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1563326
I've used it since the initial build of NT 4, even NT 3.51 has some of the functions..
0
 
LVL 37

Expert Comment

by:bbao
ID: 1563327
Ping all? :)))

for /l %i in (0,1,255) do for /l %j in (0,1,255) do for /l %k in (0,1,255) do for /l %l in (0,1,255) do ping %i.%j.%k.%l
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1563328
:-)
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question