A simple TCL script can be invaluable for testing connectivity in the CCIE lab. It turns out that the 3550 and 3560 series of switches do NOT support TCL scripting:
3550:
sw3#sh ver | i IOS
Cisco IOS Software, C3550 Software (C3550-IPSERVICESK9-M), Version 12.2(25)SEE2,
RELEASE SOFTWARE (fc1)
sw3#t?
telnet terminal test traceroute tunnel <-no tcl
3560:
sw1#sh ver | i IOS
Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(25)SEE2,
RELEASE SOFTWARE (fc1)
sw1#t?
telnet terminal test traceroute tunnel <-no tcl
Since the switches used in the CCIE lab do not support TCL scripting, is it possible to set up an automated ping test similar to a TCL script on these devices? The answer is yes. We can use a macro to get the same functionality as a simple TCL ping script:
3550:
sw3(config-if)#do sh ip int br | e ass
Interface IP-Address OK? Method Status Protocol
Loopback0 100.0.0.100 YES manual up up
Loopback1 100.0.1.100 YES manual up up
Loopback2 100.0.2.100 YES manual up up
sw3(config-if)#macro name PING
Enter macro commands one per line. End with the character ‘@’.
do ping 100.0.0.100
do ping 100.0.1.100
do ping 100.0.2.100
@
sw3(config)#macro global apply PINGType escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.0.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.2.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms3560:
sw1(config-if)#do sh ip int br | e ass
Interface IP-Address OK? Method Status Protocol
Loopback0 10.0.0.100 YES manual up up
Loopback1 10.0.1.100 YES manual up up
Loopback2 10.0.2.100 YES manual up up
sw1(config-if)#macro name PING
Enter macro commands one per line. End with the character ‘@’.
do ping 10.0.0.100
do ping 10.0.1.100
do ping 10.0.2.100
@
sw1(config)#macro global apply PINGType escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.2.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
Cisco Documentation: