Solved

ping a group of computers

Posted on 1998-10-03
9
289 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
  • 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:Bing CISM / CISSP
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
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
ID: 1563323
BlackMan's comment should be the answer. Hmm, it looks such command only can be done on NT system.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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:Bing CISM / CISSP
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:Bing CISM / CISSP
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
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 discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now