[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ping a group of computers

Posted on 1998-10-03
9
Medium Priority
?
317 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 140 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

649 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