The TCL ping script

      No Comments on The TCL ping script

So I’ve been doing a lot of CCIE study labbing lately and it’s become rather apparent that the only way to verify IPv4 unicast connectivity is to use TCL scripts on the routers.  Its really pretty easy.  I generally crank the scripts out in notepad and then paste them into the router.  One might look like this…

foreach address { } {ping $address}

Then all you need to do is enter the TCL shell by typing ‘tclsh’ at the enable prompt.  Then just paste your script in…


Exit drops your back out of the TCL shell and back to the normal enable prompt.  I initially found that I was having issues with the scripts because of my lack of spaces.  You NEED a space after the first line variable (address) and one in-between the two brackets separating the last IP and the ping command (…107.7} {ping…). 

While this appears to work well on the routers, the switches (at least the ones for the v4 lab) don’t appear to have the TCL shell.  Must find another solution for those… Edit – Apparently you use macros on the switch, see example below…


Leave a Reply

Your email address will not be published. Required fields are marked *