Tuesday, January 8, 2013

No Tclsh? No Problem!

I’m shocked and appalled to have just discovered my 3550’s don’t support scripting with tcl. Actually, the 3560’s don’t either. But, thanks to a posting on CCIE Pursuit Blog a macro can be used to substitute a tcl ping script. The macro needs to be run in global configuration mode so you’ll need to include the ‘do’ statement.

  DLS1(config)#macro name TEST
  Enter macro commands one per line. End with the character '@'.
  do ping 172.16.1.1
  do ping 172.16.1.101
  @

  DLS1(config)#macro global apply TEST
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
  !!!!!
  Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 172.16.1.101, timeout is 2 seconds:
  !!!!!

  DLS1#show parser macro name TEST
  Macro name : TEST
  Macro type : customizable
  do ping 172.16.1.1
  do ping 172.16.1.101
 

Tcl: Tool Command Language
More Info: Cisco IOS Scripting with Tcl

------------------------------------------------------------------
1: http://cciepursuit.wordpress.com/2007/08/27/ping-test-on-355060-switches/
2: http://www.cisco.com/en/US/docs/ios/12_3t/12_3t2/feature/guide/gt_tcl.html

No comments:

Post a Comment