cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2376
Views
25
Helpful
4
Replies

How to ping repeat in tclsh ( IOS XR)

minhtetsan192
Level 1
Level 1

Dear All,

 

Now I'm facing a little funny issue. That is I don't know " How to ping repeat (500) in tclsh script On IOS XR. I need your suggestion urgently and I'm also have nothing experiment fo IOS XR router. Please fix my issue.

Best Regards,

Min Htet Sam

 

run tclsh
foreach address {
8.8.8.8
9.9.9.9
} { ping -s Lo0 -repeat 500 $address}

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

This is from my testing, it  was working IOS XR - test and let me know. change the source interface i use loopback1 here

 

% foreach IP {
1.1.1.1
8.8.8.8
} { ping -c 500 -s lo1 $IP}  

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

4 Replies 4

Hello,

 

what are you trying to do, ping both IP addresses 500 times ?

 

foreach ip {
8.8.8.8
9.9.9.9
} {
ping $ip repeat 500 timeout 1 }

Yes sir,

I want to ping all IP 500 times. Please check sir.

 

% foreach ip {
8.8.8.8
9.9.9.9
} {
ping $ip repeat 500 timeout 1 }
% Invalid parameter(s)
child process exited abnormally
%
%
%
%
%
%
% foreach ip {
8.8.8.8
9.9.9.9
} { ping $ip repeat 500 timeout 1 }
% Invalid parameter(s)
child process exited abnormally
%

 

 

 

 

 

 

balaji.bandi
Hall of Fame
Hall of Fame

This is from my testing, it  was working IOS XR - test and let me know. change the source interface i use loopback1 here

 

% foreach IP {
1.1.1.1
8.8.8.8
} { ping -c 500 -s lo1 $IP}  

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thanks, Sir. Now My issue was solved.

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

% foreach address {
8.8.8.8
9.9.9.9
} { ping -s Lo0 -c 500 $address}
Type escape sequence to abort.
Sending 500, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!
Success rate is 100 percent (500/500), round-trip min/avg/max = 1/2/9 ms
%

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++