RE: Automating TCL script in routers

From: Brian Dennis (bdennis@internetworkexpert.com)
Date: Sun Dec 10 2006 - 02:03:24 ART


As far as reusing the script goes have you tried using a procedure?

Rack1R4#tclsh
Rack1R4(tcl)#proc ping_all {} {
+>foreach address {
+>192.168.1.1
+>192.168.2.2
+>192.168.3.3
+>} { ping $address} }

Rack1R4(tcl)#ping_all

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/120/120
ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms
Rack1R4(tcl)#
Rack1R4(tcl)#ping_all

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 116/118/120
ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/59/60 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/59/60 ms
Rack1R4(tcl)#

 
Brian Dennis, CCIE4 #2210 (R&S/ISP-Dial/Security/SP)
bdennis@internetworkexpert.com
 
Internetwork Expert, Inc.
http://www.InternetworkExpert.com
Toll Free: 877-224-8987
Direct: 775-745-6404 (Outside the US and Canada)

 

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Radioactive Frog
Sent: Saturday, December 09, 2006 3:28 PM
To: Cisco certification
Subject: Automating TCL script in routers

Hi Gang,

Is it possible to automate a TCL script in Cisco Routers?
For example:

If I saved in router and should run after every 10 minutes?

Frog.



This archive was generated by hypermail 2.1.4 : Tue Jan 02 2007 - 07:50:37 ART