Pages

TCL script to ping several routers

You can use a simple Tcl script to test connectivity between your devices:

















Write a Tcl script in a notepad.

foreach ipaddress {
192.168.1.1
192.168.2.1
172.23.23.1
172.23.24.1
10.1.1.1
10.1.2.1
} { ping $ipaddress }

From R1 type "tclsh" to enter Tcl shell. Enter the script and press enter.




























Be sure to type "tclquit" after the script has run.

keep a copy of the Tcl script in a text file so that you can just paste it into the router to test connectivity at any time.  The extra time it takes to create/modify the text file is much less than the time it would take to type “ping x.x.x.x” for each device.  You are also less likely to forget a device.