TCL (Tool Command Language)

TCL is an open source scripting language. It is incorporated into cisco ios routers operating system and is available on many other vendors’ networking devices.

There are three primary reasons why network administrator should learn it. If network admins have a firm hand on tcl is definitely a VAS (Value Added Skill).

  1. Better Automation
  2. Increased Security
  3. Remote Command Line Applications

Example:

This tcl example will test connectivity between routers with ping command. The ping command is embedded inside this simple tcl script.

AccessServer#tclsh
AccessServer(tcl)#
AccessServer(tcl)#foreach address {
+>192.168.1.2
+>192.168.2.1
+>192.168.2.2
+>192.168.3.1
+>192.168.3.2
+>} { ping $address }

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/31/60 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/24/44 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 = 16/38/52 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/42/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/56/84 ms
AccessServer(tcl)#exit

AccessServer#

Resources:

TCL Home Page

Documentation and Demos

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s