From: Lee Donald (Lee.Donald@bacs.co.uk)
Date: Fri Jun 11 2004 - 11:51:14 GMT-3
Excellent, thankyou. Someone with some detail.
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
Andrew Caslow
Sent: 11 June 2004 15:43
To: 'TiuN Hong Leng'; ccielab@groupstudy.com
Subject: RE: "full reachability" verification strategey in LAB exam!
Hong Leng,
Creating a TCL script on a Cisco router is an excellent tool to use to
test for "full reachability" within a network. The syntax that is
supplied below is correct and valid except for one minor exception, the
"Foreach" command is capitalized. As a result, the script will not run
correctly.
> Foreach i {
> 1.1.1.1
> 2.2.2.2
> 3.3.3.3
> } { ping $i }
Here is the output of the TCL script above with the "Foreach" command
capitalized:
r1#tclsh
r1(tcl)#Foreach i { <==== the "foreach" cmd is capitalized.
+>(tcl)#172.16.123.2
+>(tcl)#172.16.123.3
+>(tcl)#} { ping $i }
^
% Invalid input detected at '^' marker. <== ERROR
Here is the output of the TCL script above with the "foreach" command
not capitalized:
r1(tcl)#foreach i { <==== the "foreach" command not is capitalized.
+>(tcl)#172.16.123.2
+>(tcl)#172.16.123.3
+>(tcl)#} { ping $i }
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/20/20 ms
r1(tcl)#
SUCESSFUL OUTPUT!!!
The moral of the story: Be VERY sensitive to command case when typing in
any scripting commands whether it is TCL, PERL, BASH etc. It can make
the difference between the successful execution of a script or a
failure.
Regarding the question, "Do I have to use this script with every
interface IP address as source in every router?", this script lists the
destination IP addresses that the ping command at the end of the script
will use. In its current state, this script will ping only the addresses
listed in the script and only from the router that the script was
executed from. If you wanted to use this script as it is to test for
"full reachability" from each and every router within your domain, you
would need to run this script manually on each router.
You can easily enhance this script to allow it to run only once on a
single router, but yet have the script test for "full reachability" on
each router within your domain.
At NetMasterClass, we have published a Tech-Note on this very technique.
It details how you can perform this task. It involves writing an
enhanced version of the script above in conjunction with the
configuration of a few Berkeley r-commands (rcmd, rsh) on your Cisco
routers.
The Tech-Note can be downloaded at:
http://www.netmasterclass.net/site/lib.php#
The name of the Tech-Note is "Cisco IOS TCL and RCMD testing and
troubleshooting scripting" It is the 5th Tech-Note listed from the top
of the display.
In this Tech-Note, you will find a second TCL script that allows you to
automate the collection of all of the IP addresses within your domain as
well.
We strongly recommend to all our NMC students to use the techniques
described in this Tech-Note to test for "full reachability" in a CCIE
lab scenario. We call it "testing for universal connectivity to reach
the Golden Moment". The Golden Moment is the milestone in a CCIE lab
where you can reach all IP addresses within your pod from all devices.
The Golden Moment is usually attained after route redistribution is
performed.
Again, check out this Tech-Note. It should walk you through on a step by
step basis every thing you need to do to test for full reachability of
all IP addresses within a domain.
I you have any problems or questions about creating a "full
reachability" TCL script, please let us know.
HTH,
- Bruce Caslow CCIE #3139
NetMasterClass, LLC
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
TiuN Hong Leng
Sent: Friday, June 11, 2004 10:02 AM
To: Kinney Robert-RKINNEY1
Cc: 'Calton, Doug'; Richard Dumoulin; tycampbell@comcast.net; Dan;
ccielab@groupstudy.com
Subject: Re: "full reachability" verification strategey in LAB exam!
Hi,
Do I have to use this script with every interface IP address as source
in every router?
>
> Tclsh
> Foreach i {
> 1.1.1.1
> 2.2.2.2
> 3.3.3.3
> } { ping $i }
> Tclquit
This archive was generated by hypermail 2.1.4 : Sat Jul 03 2004 - 19:40:38 GMT-3