RE: TCL Scripts

From: jon (jon@storm.to)
Date: Wed Nov 16 2005 - 20:38:10 GMT-3


I read somewhere today that the version of TCL used does vary and that could
be something to do with this?

-----Original Message-----
From: Chula Bandara [mailto:chula_bandara@hotmail.com]
Sent: 16 November 2005 16:00
To: bsinclair@netmasterclass.net; InderpalS@mindscapeit.com;
ccielab@groupstudy.com
Subject: Re: TCL Scripts

Bob you are right , i see repies with debug ip icmp , but ping does not
display it to the telnet session.

 but still

} {puts [exec "ping $addr"]}

doesn't seems to work. i use 12.4(1a)

is there a way to get it displayed on the console.

  --------------------------------------------------------------------

  From: "Bob Sinclair" <bsinclair@netmasterclass.net>
  Reply-To: "Bob Sinclair" <bsinclair@netmasterclass.net>
  To: <InderpalS@mindscapeit.com>, <ccielab@groupstudy.com>
  Subject: Re: TCL Scripts
  Date: Wed, 16 Nov 2005 07:43:31 -0500
  Inder,

  It may be that the router is actually doing the pings, but is just
  not
  printing the results to the screen. You could test this with debug
  ip icmp on
  a target box. Try the version below. Seems to work on X8XX s.

  foreach addr {
  172.16.123.1
  172.16.123.2
  127.16.123.3
  } {puts [exec "ping $addr"]}

  HTH,

  Bob Sinclair
  CCIE #10427, CCSI 30427
  www.netmasterclass.net

  ----- Original Message -----
  From: InderpalS@mindscapeit.com
  To: ccielab@groupstudy.com
  Sent: Wednesday, November 16, 2005 6:57 AM
  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>

  _______________________________________________________________________
  Subscription information may be found at:
  http://www.groupstudy.com/list/CCIELab.html
  <http://www.groupstudy.com/list/CCIELab.html>
  11/16/2005 9:02:12 AM

  Disclaimer
 



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