Cisco TCL Ping


IOS:

tclsh
 foreach address {
  10.11.11.1
  10.11.11.2
  10.11.11.3
  10.11.11.4
  10.11.11.5
  10.11.11.6
  10.11.11.7
  10.11.11.8
  10.11.11.9
} { ping $address re 10 source loo0 si 1500
}
tclquit


Nexus NX-OS:

tclsh
 foreach address {
  10.11.11.1
  10.11.11.2
  10.11.11.3
  10.11.11.4
  10.11.11.5
  10.11.11.6
  10.11.11.7
  10.11.11.8
  10.11.11.9
} {cli ping $address source 10.99.230.253
}
tclquit


IOS XR:

run tclsh
foreach address {
10.11.11.1
10.11.11.2
10.11.11.3
10.11.11.4
10.11.11.5
10.11.11.6
10.11.11.7
10.11.11.8
10.11.11.9
} {ping $address }
tclquit

The run level translation that is required to generate the TCL scripts can be identified using the IOS XR “describe” syntax:

RP/4/RP0/CPU0:ios#describe ping 192.168.1.1 source Loopback0

Spawn the process:
                    ping -p 0xf -z 0xa -s Loopback0 192.168.1.1

RP/5/RP0/CPU0:ios#

It should be noted, IOS XR always expects the run level command syntax, never the global syntax which you are familiar with from the CLI.

run tclsh
foreach address {
10.11.11.1
10.11.11.2
10.11.11.3
10.11.11.4
10.11.11.5
10.11.11.6
10.11.11.7
10.11.11.8
10.11.11.9
} { ping -p 0xf -z 0xa -s Loopback0 $address }
tclquit

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *