Pages

Thursday, February 5, 2015

TCLSH scripting for CCIE Study

I learned this from INE training videos, taught by Brian McGahan. A lot of people already share this out publicly. I mainly post this here to serve as my permanent notebook for my study


In a lab where I have 10 IPs I need to ping from 10 different routers, a tclsh script really speed up the process. I created the below script in Notepad

tclsh
foreach var {
192.1.1.1
192.1.1.2
192.1.1.3
192.1.1.4
192.1.1.5
192.1.1.6
192.1.1.7
192.1.1.8
192.1.1.9
192.1.1.10
} {ping $var
}

You can replace "ping" with "traceroute". Remember to enter "tclquit" once you're done.

Another note, notice the location of the brackets, this is the only syntax that actually works for me.

Have fun!