RE: TCL Scripts

From: InderpalS@mindscapeit.com
Date: Wed Nov 16 2005 - 09:11:41 GMT-3


Thanks....Its surprising it doesn't work on my new router which is 1841 with
ios 12.4 but works on 1721 with ios 12.3

Any clues??

Thanks to everyone!!

Inder

-----Original Message-----
From: De Witt, Duane [mailto:duane.dewitt@siemens.com]
Sent: Wednesday, November 16, 2005 4:01 PM
To: Inderpal Singh, Mindscape IT; ccielab@groupstudy.com
Subject: RE: TCL Scripts

Try using this as a template:

tclsh
!
foreach address {
x.x.x.x
x.x.x.x
x.x.x.x
x.x.x.x
x.x.x.x
x.x.x.x
} {
ping $address
}

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
InderpalS@mindscapeit.com
Sent: 16 November 2005 01:57 PM
To: ccielab@groupstudy.com
Subject: FW: TCL Scripts

Hi, Looking for someone useful tips on the usage of tcl scripts. I used a
sample tcl script but it gave me no result. The sample of tcl script, igp
table and result is given below. My router is 1841 ios 12.4(1a)
 
Cheers,
inder

  _____

From: Niche [mailto:jackyliu419@gmail.com]
Sent: Wednesday, November 16, 2005 2:46 PM
To: Inderpal Singh, Mindscape IT
Subject: Re: TCL Scripts

Hi there,

Have you try to use the TCL script on testing the subnet 147.16.x.0?
It's
kinda strange cause the router accepted your script but didn't even
popped
out any result (even no ping unreachable). Try to post your question in
the
mailing list and see any shed some light as well, remember post your IOS
version and router model.

Cheers~
Jacky

On 11/16/05, InderpalS@mindscapeit.com
<mailto:InderpalS@mindscapeit.com>
<InderpalS@mindscapeit.com <mailto:InderpalS@mindscapeit.com> > wrote:

I got it Jacky. I was under the impression that the script is stored in
nvram once to enter it. Now i treid it on one router which has got all
required routes in routing but tcl script does not give any results.
 
My IGP table....
 
Gateway of last resort is not set
 
     4.0.0.0/32 <http://4.0.0.0/32> is subnetted, 1 subnets
O 4.4.4.4 <http://4.4.4.4> [110/65] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
     5.0.0.0/32 <http://5.0.0.0/32> is subnetted, 1 subnets
C 5.5.5.5 <http://5.5.5.5> is directly connected, Loopback1
     147.16.0.0/16 <http://147.16.0.0/16> is variably subnetted, 7
subnets,
2 masks
O E1 147.16.1.0/24 <http://147.16.1.0/24> [110/84] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
O 147.16.5.5/32 <http://147.16.5.5/32> [110/65] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
O E1 147.16.2.2/32 <http://147.16.2.2/32> [110/84] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
O E1 147.16.7.0/24 <http://147.16.7.0/24> [110/84] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
O E1 147.16.6.0/24 <http://147.16.6.0/24> [110/84] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
O E1 147.16.5.0/24 <http://147.16.5.0/24> [110/84] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
O E1 147.16.4.0/24 <http://147.16.4.0/24> [110/84] via 150.50.40.4
<http://150.50.40.4> , 00:00:43, Serial0/0/0
     150.50.0.0/16 <http://150.50.0.0/16> is variably subnetted, 10
subnets, 2 masks
 
 
Here is what I am doing.........
 
r5(tcl)#foreach addr {
+>(tcl)#5.5.5.5
+>(tcl)#4.4.4.4
+>(tcl)#6.6.6.6
+>(tcl)#} { ping $addr }
 
r5(tcl)#
 
I dont get any results...
 
Rgds, Inder
 

  _____

From: Niche [mailto:jackyliu419@gmail.com <mailto:jackyliu419@gmail.com>
]
Sent: Wednesday, November 16, 2005 12:16 PM

To: Inderpal Singh, Mindscape IT
Subject: Re: TCL Scripts

Hi there,

Have you test the script in your home lab or just use 2-3 routers to
test?
Actually there is no rocket-science inside, just create the script in
notepad, paste it in the each router, hit enter, then a bunch of ping
result
pop-up.

You don't need to type any additional command. The script has the
command
inside.

Try it first in a multiple routers environment then you will know.

Cheers~
Jacky

On 11/16/05, InderpalS@mindscapeit.com
<mailto:InderpalS@mindscapeit.com> <
InderpalS@mindscapeit.com <mailto:InderpalS@mindscapeit.com> > wrote:

Hi jacky,
 
Could you pls. write the steps I need to follow to ensure full
reachbility...First step...I enter TCL shell using "tclsh"
command...second
step...I type "ping" or ....?
 
thks, Inder

  _____

From: Niche [mailto:jackyliu419@gmail.com <mailto:jackyliu419@gmail.com>
]
Sent: Wednesday, November 16, 2005 11:49 AM

To: Inderpal Singh, Mindscape IT
Subject: Re: TCL Scripts

Hi there,

In the lab, there are 6 routers and polly each router has more than 3
interfaces with ip address. So with this script, you can ping from 1
router
to all the interfaces in all routers without typing the "ping x.x.x.x"
command like 100 times. Consider the full reachability means, that mean
you
have to do the ping check from each router point of view.

You save alot of time by doing this. Consider you need to do the check
at
least twice (after finish IGP and after reboot, at min. level)

Cheers~
Jacky

On 11/16/05, InderpalS@mindscapeit.com
<mailto:InderpalS@mindscapeit.com> <
InderpalS@mindscapeit.com <mailto:InderpalS@mindscapeit.com> > wrote:

Thanks....that works...I am able to apply the script but now I need to
know
how to use it for testing. I mean what commands can I use for testing
full
reachability. If its just a simple ping then why not use it from exec
mode.
 
Cheers
Inder

  _____

From: Niche [mailto:jackyliu419@gmail.com <mailto:jackyliu419@gmail.com>
]
Sent: Wednesday, November 16, 2005 10:09 AM
To: Inderpal Singh, Mindscape IT
Subject: Re: TCL Scripts

Hi there,

Try this,

foreach addr {
5.5.5.5 <http://5.5.5.5>
4.4.4.4 <http://4.4.4.4>
} { ping $addr }

Make sure you paste the whole script before you hit enter.

Cheers~
Jacky

On 11/16/05, InderpalS@mindscapeit.com
<mailto:InderpalS@mindscapeit.com>
<InderpalS@mindscapeit.com <mailto:InderpalS@mindscapeit.com> > wrote:

I pasted my router output below....I know I am doing something terribly
wrong. I just pasted the script from your earlier response which is as
below:-

 
r5(tcl)#foreach addr {
+>(tcl)#5.5.5.5
+>(tcl)#4.4.4.4
+>(tcl)#}
wrong # args: should be "foreach varList list ?varList list ...?
command"
r5(tcl)#
 
Thks,
Inder

  _____

From: Niche [mailto:jackyliu419@gmail.com <mailto:jackyliu419@gmail.com>
]
Sent: Wednesday, November 16, 2005 9:55 AM
To: Inderpal Singh, Mindscape IT
Subject: Re: TCL Scripts

Hi there,

Would you mind to send me the script that you wrote?

Cheers~
Jacky

On 11/16/05, InderpalS@mindscapeit.com
<mailto:InderpalS@mindscapeit.com>
<InderpalS@mindscapeit.com <mailto:InderpalS@mindscapeit.com> > wrote:

Hi Jacky,
 
I am really bad with scripting and may be doing something silly...I
tried
following and still it didn't work on 1841..
 
r5(tcl)#foreach addr {
+>(tcl)#5.5.5.5
+>(tcl)#4.4.4.4
+>(tcl)#}
wrong # args: should be "foreach varList list ?varList list ...?
command"
r5(tcl)#
 
 

  _____

From: Niche [mailto:jackyliu419@gmail.com <mailto:jackyliu419@gmail.com>
]
Sent: Wednesday, November 16, 2005 9:19 AM
To: Inderpal Singh, Mindscape IT
Cc: cciebfetzer@gmail.com <mailto:cciebfetzer@gmail.com> ;
ccielab@groupstudy.com <mailto:ccielab@groupstudy.com>
Subject: Re: TCL Scripts

Hi there,

Yes, from my lab experience, all routers (2600&3600) (except 3550) can
run
the tcl script,

Sample that I used in the lab,

tclsh
foreach addr {
1.1.1.1 <http://1.1.1.1>

2.2.2.2 <http://2.2.2.2>
x.x.x.x
} {ping $addr}

write this script on notepad, then paste it on each router for ping
check
then input "tclq" to make sure you return to normal command mode.

Find a router and try it once or twice, you will know. It's actually
pretty
easy to get used to it.

Cheers~
Jacky

On 11/16/05, InderpalS@mindscapeit.com
<mailto:InderpalS@mindscapeit.com> <
InderpalS@mindscapeit.com <mailto:InderpalS@mindscapeit.com> > wrote:

Hi Bryan,

Still can't get this....how do we actually make use of TCL scripts in
real
ccie lab for testing. Does tcl script run ona ll lab routers? Do we need
to
write entire script before we can use it?

Thanks for your help..
Inder

-----Original Message-----
From: Bryan Fetzer [mailto: cciebfetzer@gmail.com
<mailto:cciebfetzer@gmail.com> ]
Sent: Tuesday, November 15, 2005 7:10 PM
To: ccielab@groupstudy.com <mailto:ccielab@groupstudy.com>
Subject: Re: TCL Scripts

One such example that I am aware of:
http://www.internetworkexpert.com/resources/tclshrsh.htm
<http://www.internetworkexpert.com/resources/tclshrsh.htm>

Inderpal Singh wrote:

>Could someone shed some light on usage of TCL scripts to check / test
>configuration. May be some good url or few nice steps.
>
>Inder
>
>-----------------------------------------------------------------------
>-
>
>Don't just search. Find. MSN Search Check out the new MSN Search!
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
<http://www.groupstudy.com/list/CCIELab.html>



This archive was generated by hypermail 2.1.4 : Thu Dec 01 2005 - 09:12:07 GMT-3