Solved

Writing a script for ping command

Posted on 2000-04-13
5
313 Views
Last Modified: 2013-12-23
I need a script, which can be ping my terminals automaticaly, when I write on the screen only the terminals name.
At the sample
Terminal 1 = x.x.x.x
     .
     .
terminal n = y.y.y.y
(Becouse my IP adresses are confidential,you can write like these.
 
0
Comment
Question by:ayildirim
[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
  • 3
5 Comments
 

Expert Comment

by:saile01
ID: 2715044
yours terminals have a static or dynamic ip address ?
0
 

Author Comment

by:ayildirim
ID: 2715316
static
0
 
LVL 3

Accepted Solution

by:
cbo120897 earned 100 total points
ID: 2715326
Try this batch:


---------------------------------------
@echo off
rem security ping
rem use: secping Tx
rem where Tx ist resolved to a IP-Adresse
rem ---------------------
rem the command who find the IP an make a ping
rem
for /f "tokens=1-2 delims= " %%a in ('type secping.bat ^| find "%1 " /I') do ping %%b
rem
rem ---------------------
rem
rem the database
rem
goto :END
T00 10.45.191.0
T01 10.45.191.1
T02 10.45.191.2
T03 10.45.191.3
T04 10.45.191.4
T05 10.45.191.5
T06 10.45.191.6
T07 10.45.191.7
T08 10.45.191.8
T09 10.45.191.9
T10 10.45.191.10
:END
---------------------------------------
In the batchfile you must define your terminals. But during the ping you can see the confidential addresses!

cbo

0
 
LVL 3

Expert Comment

by:cbo120897
ID: 2715331
Name the batch secure.bat and call ist like:

secping T09

cbo
0
 
LVL 3

Expert Comment

by:cbo120897
ID: 2715334
No, no name it secping.bat :-)
0

Featured Post

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.

Question has a verified solution.

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

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…
A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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…

707 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