blob: 52768b259907da66d8a288486896af82be854a9c [file] [log] [blame]
Srikanth Vavilapalli0abf3f62015-02-24 21:27:43 -08001#!/bin/bash
2
3
4#all the address in this for loop should work
5
6# ping test between as2 and as3
7for ((i=0;i<10;i++)); do
8
9 #echo '------from 3.0.0.x to 4.0.1.'$j'------'
10
11 for ((j=0; j<10; ++j )) ; do
12 echo '3.0.'$i'.1 -> 4.0.'$j'.1'
13 ping -c 1 -w 1 -I 3.0.$i.1 4.0.$j.1 | grep 'from 4.0.'$j'.1'
14
15 done
16
17done
18for ((i=0;i<10;i++)); do
19
20 #echo '------from 3.0.0.x to 5.0.1.'$j'------'
21
22 for ((j=0; j<10; ++j )) ; do
23 echo '3.0.'$i'.1 -> 5.0.'$j'.1'
24 ping -c 1 -w 1 -I 3.0.$i.1 5.0.$j.1 | grep 'from 5.0.'$j'.1'
25
26 done
27
28done
29
30# ping test between as2 and as4
31for ((i=1;i<2;i++)); do
32 for ((prefix=101; prefix<=200; ++prefix)) ; do
33 for ((j=0; j<10; ++j )) ; do
34 echo '3.0.0.'$i' - > '$prefix'.0.'$j'.1'
35 ping -c 1 -w 1 -I 3.0.0.$i $prefix.0.$j.1 | grep 'from '$prefix'.0.'$j'.1'
36
37 done
38 done
39
40done
41