Friday, March 29, 2024
HomeNetworkingTCL Ping Script - IP With Ease

TCL Ping Script – IP With Ease


Community Administrator must carry out loads of repetitive actions in community like ping a number of IPs to examine their availability. These actions are time consuming and tiring too.

Excellent news!!

This all may be finished at one go.

TCL Ping Script Is The Reply

As from Cisco IOS 12.2(25), TCL scripting has been made a part of Cisco IOS. All one wants is the fundamentals – To entry the tcl command line in Cisco router challenge the “tclsh” command. For the TCL ping script simply modify the IP addresses what’s proven beneath and it ought to be good.

Observe: in beneath case, we are attempting to ping 5 IP addresses.

foreach tackle {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
} { places [ exec “ping $address” ] }

The phrase “tackle” right here is only a variable, you’ll be able to substitute this with something you need. Now lets attempt making use of this to the Cisco router.

R1(tcl)#foreach tackle {
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#} { places [ exec “ping $address” ]}Sort escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success price is one hundred pc (5/5), round-trip min/avg/max = 60/66/76 msType escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success price is one hundred pc (5/5), round-trip min/avg/max = 64/64/68 msType escape sequence to abort.
Sending 5, 100-byte ICMP Echos to three.3.3.3, timeout is 2 seconds:
!!!!!
Success price is one hundred pc (5/5), round-trip min/avg/max = 32/62/92 msType escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success price is one hundred pc (5/5), round-trip min/avg/max = 40/55/64 ms

Sort escape sequence to abort.
Sending 5, 100-byte ICMP Echos to five.5.5.5, timeout is 2 seconds:
!!!!!
Success price is one hundred pc (5/5), round-trip min/avg/max = 32/62/92 ms

That’s it!!!

Isn’t this straightforward and useful ? The truth is many CCIE candidates additionally use this script to avoid wasting on time.

One can do this on GNS3 or dynamips lab and take a look at the output. All the perfect !!!

Proceed Studying:

Distinction between IP Handle and Port Quantity

CISCO IOS/XR AND JUNOS COMMAND REFERENCE

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments