RE: Ping scripts for routers.

From: Wayne Hines (wayneh@DataNetDev.com.au)
Date: Thu Nov 27 2003 - 23:33:44 GMT-3


If you can tcl from a desktop/server, this is a handy extension that will
allow you to ping all interfaces from each router. Even if you can't do it
from the desktop, just remove the references to files and keep the rsh
commands.

First do the following from your terminal server

send *
conf t
ip rcmd rsh-enable
!if running tcl on cisco [voice enabled] box
ip rcmd remote-host cisco 172.16.30.9 cisco

!if running tcl on a desktop/server
ip rcmd remote-host Administrator 172.16.30.93 Administrator
end

then run the script
set f "e:\\temp\\test2.txt"
file delete $f
foreach i {
172.16.101.1
 172.16.102.1
 172.16.103.1
 172.16.104.1
 172.16.105.1
 172.16.106.1
 172.16.107.1
 172.16.120.1
} {
set x [open $f a]
puts $x "****************R$i***********************"
puts $x "****************R$i***********************"
close $x

rsh $i sh ip route >>$f
rsh $i sh fram map >>$f
rsh $i sh ip bgp >>$f
rsh $i sh ip bgp s >>$f
rsh $i sh ip ospf n >>$f
rsh $i sh ip eigrp n >>$f
rsh $i sh isis to >>$f
rsh $i sh ntp stat >>$f
rsh $i sh ntp a >>$f
foreach j {
 172.16.10.1
 172.16.10.2
 172.16.10.3
 172.16.10.4
 172.16.101.1
 172.16.102.1
 172.16.103.1
 172.16.104.1
 172.16.105.1
 172.16.106.1
 172.16.110.1
 172.16.120.1
 172.16.25.2
 172.16.25.5
 172.16.30.20
 172.16.30.9
 172.16.34.3
 172.16.34.4
 172.16.34.7
 172.16.36.3
 172.16.36.6
 172.16.51.10
 172.16.51.5
 172.16.61.1
 172.16.61.6
 172.16.107.1
 7.7.7.7
} {rsh $i ping $j >> $f}
}

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
Yasser Aly
Sent: Monday, 17 November 2003 21:04
To: Paul.Casey@o2.com; ccielab@groupstudy.com
Subject: Re: Ping scripts for routers.

>From GroupStudy archives " Posted via Kristof Ulrix "

You can use the tcl shell commands:

tclsh
foreach pl {
128.200.1.1
133.10.0.1
133.10.0.2
} {ping $pl}

>From: "Casey, Paul (6822)" <Paul.Casey@o2.com>
>Reply-To: "Casey, Paul (6822)" <Paul.Casey@o2.com>
>To: ccielab@groupstudy.com
>Subject: Ping scripts for routers.
>Date: Mon, 17 Nov 2003 09:05:29 +0000
>
>Hello,
>
>Can someone tell me how to test all my local interfaces on a router with a
>ping script.
>How would I go about doing this...!!
>
>Thanks in advance.
>
>
>***************************************************************************
*************
>
>This E-mail is from O2. The E-mail and any files
>transmitted with it are confidential and may also be privileged and
>intended
>solely for the use of the individual or entity to whom they are addressed.
>Any unauthorised direct or indirect dissemination, distribution or copying
>of this message and any attachments is strictly prohibited. If you have
>received the E-mail in error please notify postmaster@O2.com or
> telephone ++ 353 1 6095000.
>
>***************************************************************************
**************
>
>_______________________________________________________________________
>Please help support GroupStudy by purchasing your study materials from:
>http://shop.groupstudy.com
>
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Fri Dec 12 2003 - 12:29:19 GMT-3