TCL Script to ping a number of IPs
July 8th, 2009
This is a handy TCL scipt if you need to ping lots of IP addresses. If your router supports TCL you can:
Enable TCL on router: R1#tclsh
Quit TCL: R1#tclquit
TCL SCRIPT FOLLOWS:
foreach address {
10.1.1.2
10.1.1.3
10.1.3.1
172.16.1.1
172.31.1.1
192.168.1.1
192.168.5.5
192.168.9.9
192.168.13.13
192.168.17.17
192.168.21.21
192.168.15.25
192.168.100.1
192.168.200.1
192.168.200.5
192.168.200.9
192.168.200.13
192.168.200.17
192.168.200.21
192.168.200.15
192.168.100.2
} { ping $address }
(NB: note dollar sign after ping above)
Enable TCL on router:
R1#tclsh
Quit TCL:
R1#tclquit