Re: TCL & DOC CD

From: Con Spathas <ccie19226_at_googlemail.com>
Date: Thu, 17 Sep 2009 17:50:34 +0100

Some IOS don't like the simpler way...

For example 123-8T(11) this won't work:

R5(tcl)#foreach i {
+>150.1.1.1
+>150.1.2.2
+>150.1.4.4
+>150.1.5.5
+>} { ping $i re 1 ti 1 so lo0 }

R5(tcl)#

Just drops back to a prompt. However if I use:

R5(tcl)#foreach i {
+>150.1.1.1
+>150.1.2.2
+>150.1.4.4
+>150.1.5.5
+>} { puts [ exec "ping $i rep 1 tim 1 so lo0" ] }

Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 150.1.1.1, timeout is 1 seconds:
Packet sent with a source address of 150.1.5.5
!
Success rate is 100 percent (1/1), round-trip min/avg/max = 12/12/12 ms

etc etc.

Cheers.

On Wed, Sep 16, 2009 at 1:48 PM, Ryan West <rwest_at_zyedge.com> wrote:
> No, just do it a lot.
>
> Sometimes you'll see extra things like "put" in the script... that's not necessary. A simple TCL script like this will work each time.
>
> foreach i {
> 192.168.1.1
> 192.168.1.2
> } {ping $i re 3 ti 1}
>
> Rack1R1(tcl)#foreach i {
> +>192.168.1.1
> +>192.168.1.2
> +>} {ping $i re 3 ti 1}
>
> Type escape sequence to abort.
> Sending 3, 100-byte ICMP Echos to 192.168.1.1, timeout is 1 seconds:
> ...
> Success rate is 0 percent (0/3)
> Type escape sequence to abort.
> Sending 3, 100-byte ICMP Echos to 192.168.1.2, timeout is 1 seconds:
> ...
> Success rate is 0 percent (0/3)
>
> IMO, this is more than enough to verify your work and deals with the annoys self ping timeouts with FR.
>
> -ryan
>
> -----Original Message-----
> From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of 4g1vn
> Sent: Wednesday, September 16, 2009 8:40 AM
> To: ccielab_at_groupstudy.com
> Subject: TCL & DOC CD
>
> Group: Is there a quick refrence in the DOC CD for TCL scripts?
> Specifically, a ping script? Everytime I try to write one, I forget the
> syntax. :)
>
> --
> Shaun Gomez, CCNP ATSA ASP
> Network Engineer
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Thu Sep 17 2009 - 17:50:34 ART

This archive was generated by hypermail 2.2.0 : Sun Oct 04 2009 - 07:42:03 ART