«

May 22

TCL Script: Ping

 

Difficulty Rating: 
Practical use case:

To see what has connectivity in the network

 

Scenario:

IGP and EGP routing protocols have converged and are stable.

You now want to perform end-to-end connectivity testing to check for faults using ping (or traceroute)

 

Instructions:
  1. On each device run the command #show ip alias. This will list all IP addresses configured on the device.
    TCCL-Script - Ping - 1
  2. Select all IP addresses listed to copy them on each device. This can normally be done on most common terminal emulation programs by holding down the ALT key before making a selection. This will build up a list of every IP address in your network.
  3. Enter the TCL Shell on the device by running the command #tclsh.
  4. Enter the following command in the TCL Shell:
    foreach address {
  5. Paste in all the addresses from all devices in the network that have been copied
  6. Enter the following commands in the TCL Shell:
    } {ping $address}
    TCCL-Script - Ping - 2
  7. This will now ping all IP’s in the $address array with the default ping settings.
  8. Note: You can change ping command parameters such as specifying a source address, repeat count etc. After the “ping $address” add “source <source address>

 

 

 

Leave a Reply