Script for Ping for 10 routers in a mesh

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for Ping for 10 routers in a mesh
# 1  
Old 07-19-2011
Script for Ping for 10 routers in a mesh

Hello All,

I have 10 routers, and need to write a script so that each router pings each other and get the result in a file.

We need to further extract the min/avg/max result and write a script to put in a excel file.

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

Appreciate if someone can help on this. Thanks in advance

Last edited by radoulov; 07-19-2011 at 12:52 PM.. Reason: Code tags.
# 2  
Old 07-19-2011
let's say you have the routes available in a file called route_info

Then, you have to do something like this:

for host in `cat route_info`
ping "$host" -n4 >> op_ping.log

then serach for "min" and do the format and redirect to .csv file.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script failed with expect on cisco routers

Hi all, I use a bash script which use expect to connect throught ssh and run command on a cisco router. The ssh connection with expect work fine, but the first command on the cisco router failed, I try to run the command in error by hand and it work fine... :( the first part of the script... (2 Replies)
Discussion started by: bedomon
2 Replies

2. Infrastructure Monitoring

Script to configure few commands for a list of routers

Hi Can any one please guide me how can I configure a few commands for a few devices in file1.txt. username: user1 password: pass enable pass: ep file1.txt: I want to apply all the config lines for each device in file1.txt ... (0 Replies)
Discussion started by: sureshcisco
0 Replies

3. IP Networking

two routers

It is possible to connect wireless router that has 4 ethernet connections and WAN connection with regular router that has UPLINK and WAN and 4 ethernet ports? (9 Replies)
Discussion started by: kasia
9 Replies

4. IP Networking

UNIX Routers/VPN

There is a small company with 3 locations in Idaho. Currently they are using UNIX with multiplexors from 10 years ago. They would like to speed up their downloads and connection speeds but don't want to pay more than they are paying right now. They currently pay $200/mo. The main office is in... (4 Replies)
Discussion started by: Jodibaxter
4 Replies
Login or Register to Ask a Question