Ping and Traceroute to MULTIPLE IP ADDRESSES directly from CISCO or HP switches

Note: From enable mode or user view (in case of comware devices), run ping or traceroute scripts below. If you want to test that an image supports tclsh (Tool Command Language Shell), you can run the tclsh command. If tclsh is supported, you will get into device(tcl)# mode. If it's not, you will get an error message. You can run tclquit to exit from the tclsh mode. =========================================== ping tcl script for IOS and comware devices =========================================== tclsh foreach address { 10.10.10.29 10.10.10.30 10.10.10.35 10.10.11.1 10.10.12.1 } { ping $address } tclquit tclsh foreach address { 192.168.121.2 192.168.121.3 192.168.121.4 } { ping $address } tclquit ====================================== tracert tcl script for comware devices ====================================== tclsh foreach address { 10.10.10.30 10.10.10.35 10.10.11.1 10.10.12.1 } { tracert $address } tclquit ========================================= traceroute tcl script for IOS devices ========================================= tclsh foreach address { 192.168.121.2 192.168.121.3 192.168.121.4 } { traceroute $address } tclquit #devnet #ccna #tcl #cisco