08-07-2013 02:48 AM
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
Solved! Go to Solution.
08-13-2013 06:27 AM
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
08-13-2013 05:59 AM
Anybody help, please!
08-13-2013 06:27 AM
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
08-13-2013 06:43 AM
Appreciate your help Alexei!
Problem solved.
05-09-2015 04:37 PM
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
09-27-2018 08:42 AM
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:
!!!!!
09-27-2018 09:43 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide