cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4525
Views
5
Helpful
6
Replies

IOS-XR reachability-check TCL script

eterebizh
Level 1
Level 1

Hi there,

I'm currently playing with TCL scripts to prepare for my CCIE lab exam. The main purpose I'm gonna use them is to

check the reachability within ISP IGP domain and/or L3VPN domain.

Currently I'm facing the following issue: I'm unable to specify the source address used to run ping:

% tclsh

foreach address {

2010::2

2010::3

2010::4

2010::5

2010::6

2010::7

} { ping $address source lo0

}

% % Invalid parameter(s)

child process exited abnormally

Can somebody kindly help me out to modify the script so that ping is sourced from conifgured interface?

Thanks in advance

1 Accepted Solution

Accepted Solutions

try this. Note, you have to set your source address:

set loop0 2010::1

foreach address {

2010::2

2010::3

2010::4

2010::5

2010::6

2010::7

} { ping6 -S $loop0 $address

}

Regards,

/A

View solution in original post

6 Replies 6

eterebizh
Level 1
Level 1

Anybody help, please!

try this. Note, you have to set your source address:

set loop0 2010::1

foreach address {

2010::2

2010::3

2010::4

2010::5

2010::6

2010::7

} { ping6 -S $loop0 $address

}

Regards,

/A

Appreciate your help Alexei!

Problem solved.

Hi 

Saw this  interesting note about TCL if you want to Ping inside a VRF we can´t find any vrf gear only in Ping6 ?

is there no support for ping inside a vrf with TCL script with ipv4

/Ola

You can do that in TCLSH, here an example using the -R option:

 

you need to use the -R option for the vrf in tclshell:

 

RP/0/RSP0/CPU0:A9K-BNG#sh route vrf RED

 

A    20.1.1.1/32 is directly connected, 00:21:36, Bundle-Ether100.30.pppoe673

 

RP/0/RSP0/CPU0:A9K-BNG#run tclsh

% ping -S Lo10 vrf RED 20.1.1.1

% Invalid parameter(s)

child process exited abnormally

% ping -R RED 20.1.1.1 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:

!!!!!

You can use ping -R to set vrf

 

run tclsh

foreach IP {

10.3.3.3

10.5.5.5

} { ping -R some_vrf -c 2 -s Lo1010 $IP}

exit

CCIE # 27552 (R&S)
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: