This blog was originally started to better help me understand the technologies in the CCIE R&S blueprint; after completing the R&S track I have decided to transition the blog into a technology blog.

CCIE #29033

This blog will continue to include questions, troubleshooting scenarios, and references to existing and new technologies but will grow to include a variety of different platforms and technologies. Currently I have created over 185 questions/answers in regards to the CCIE R&S track!! Note: answers are in the comment field or within "Read More" section.

You can also follow me on twitter @FE80CC1E


Monday, April 26, 2010

Question 37

What is TCL script and how do you use it?
Provide an example.

1 comments:

Packets Analyzed said...

TCL - Tool Command Language. In privileged mode enter "tclsh" to enter interactive TCL shell. I will provide an example that pings all IP on a device. (remember you can add all IPs in a network).

Add the following interfaces

inter lo 0
ip address 10.1.1.1 255.255.255.0
ip address 10.1.2.1 255.255.255.0 secondary
ip address 10.1.3.1 255.255.255.0 secondary
ip address 10.1.4.1 255.255.255.0 secondary
ip address 10.1.5.1 255.255.255.0 secondary
ip address 10.1.6.1 255.255.255.0 secondary
ip address 10.1.7.1 255.255.255.0 secondary
ip address 10.1.8.1 255.255.255.0 secondary
ip address 10.1.10.1 255.255.255.0 secondary
inter lo 1
ip address 192.1.1.1 255.255.255.0
ip address 192.1.2.1 255.255.255.0 secondary
ip address 192.1.3.1 255.255.255.0 secondary
ip address 192.1.4.1 255.255.255.0 secondary
ip address 192.1.5.1 255.255.255.0 secondary
ip address 192.1.6.1 255.255.255.0 secondary
ip address 192.1.7.1 255.255.255.0 secondary
ip address 192.1.8.1 255.255.255.0 secondary
ip address 192.1.9.1 255.255.255.0 secondary

TCL Ping script - Copy and paste the script below in the tclsh. To enter TCLSH enter "tclsh" in privileged mode

foreach i {
10.1.1.1
10.1.2.1
10.1.3.1
10.1.4.1
10.1.5.1
10.1.6.1
10.1.7.1
10.1.8.1
10.1.10.1
192.1.1.1
192.1.2.1
192.1.3.1
192.1.4.1
192.1.5.1
192.1.6.1
192.1.7.1
192.1.8.1
192.1.9.1
} {ping $i}

Post a Comment