Solved

Writing a script for ping command

Posted on 2000-04-13
5
311 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
  • 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
Sometimes you might need to configure routing based not only on destination IP address, but also on a combination of destination IP address (or hostname) and destination port number. I will describe a method how to accomplish this with free tools. …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

837 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