Commit 7be84563 authored by Ondřej Zajíček's avatar Ondřej Zajíček

Cleanup in test scripts

parent 0670a4b8
......@@ -8,7 +8,18 @@ touch rc/misc-at{d1,o1,f1,n1,d2}-{4,6}-conf
declare -a MACH=( d1 o1 f1 n1 d2 )
declare -a TOK=( {d1,o1,f1,n1,d2}-{4,6} )
declare -A IPA=( [d1]=10.55.0.1 [o1]=10.55.0.2 [f1]=10.55.0.3 [n1]=10.55.0.4 [d2]=10.55.0.5 )
declare -A SR=( [d1-4]="10.56.1.0/24 via 10.55.1.2" [o1-4]="10.56.2.0/24 via 10.55.1.6" [f1-4]="10.56.3.0/24 via 10.55.1.10" [n1-4]="10.56.4.0/24 via 10.55.1.14" [d2-4]="10.56.5.0/24 via 10.55.1.18" [d1-6]="fd01:56:0::/64 via fd01:55::2" [o1-6]="fd01:56:2::/64 via fd01:55::6" [f1-6]="fd01:56:4::/64 via fd01:55::10" [n1-6]="fd01:56:6::/64 via fd01:55::14" [d2-6]="fd01:56:8::/64 via fd01:55::18" )
declare -A SR=( \
[d1-4]="10.56.1.0/24 via 10.55.1.10" \
[o1-4]="10.56.2.0/24 via 10.55.2.10" \
[f1-4]="10.56.3.0/24 via 10.55.3.10" \
[n1-4]="10.56.4.0/24 via 10.55.4.10" \
[d2-4]="10.56.5.0/24 via 10.55.5.10" \
[d1-6]="fd01:56:1::/64 via fd01:55:1::10" \
[o1-6]="fd01:56:2::/64 via fd01:55:2::10" \
[f1-6]="fd01:56:3::/64 via fd01:55:3::10" \
[n1-6]="fd01:56:4::/64 via fd01:55:4::10" \
[d2-6]="fd01:56:5::/64 via fd01:55:5::10" \
)
function cf() {
local -a AR
......@@ -66,6 +77,9 @@ EOF
done
cfc <<EOF
protocol bfd {
}
protocol ospf {
import all;
export all;
......@@ -95,17 +109,19 @@ template bgp bc {
}
protocol bgp from bc {
neighbor 10.55.1.5 as 65123;
neighbor 10.55.2.1 as 65123;
}
protocol bgp from bc {
neighbor 10.55.1.9 as 65123;
neighbor 10.55.3.1 as 65123;
}
protocol bgp from bc {
neighbor 10.55.1.13 as 65123;
neighbor 10.55.4.1 as 65123;
}
protocol bgp from bc {
neighbor 10.55.1.17 as 65123;
neighbor 10.55.5.1 as 65123;
}
EOF
......@@ -120,7 +136,7 @@ protocol bgp {
}
template bgp bc {
local fd01:55::1 as 65123;
local fd01:55:1::1 as 65123;
rr client;
export all;
table b6;
......@@ -129,16 +145,16 @@ template bgp bc {
}
protocol bgp from bc {
neighbor fd01:55::5 as 65123;
neighbor fd01:55:2::1 as 65123;
}
protocol bgp from bc {
neighbor fd01:55::9 as 65123;
neighbor fd01:55:3::1 as 65123;
}
protocol bgp from bc {
neighbor fd01:55::13 as 65123;
neighbor fd01:55:4::1 as 65123;
}
protocol bgp from bc {
neighbor fd01:55::17 as 65123;
neighbor fd01:55:5::1 as 65123;
}
EOF
......@@ -146,7 +162,7 @@ EOF
cf o1-4 -- cat <<EOF
table b;
protocol bgp {
local 10.55.1.5 as 65123;
local 10.55.2.1 as 65123;
neighbor 10.55.1.1 as 65123;
import all;
table b;
......@@ -158,8 +174,8 @@ EOF
cf o1-6 -- cat <<EOF
table b;
protocol bgp {
local fd01:55::5 as 65123;
neighbor fd01:55::1 as 65123;
local fd01:55:2::1 as 65123;
neighbor fd01:55:1::1 as 65123;
import all;
table b;
igp table master;
......@@ -170,7 +186,7 @@ EOF
cf f1-4 -- cat <<EOF
table b;
protocol bgp {
local 10.55.1.9 as 65123;
local 10.55.3.1 as 65123;
neighbor 10.55.1.1 as 65123;
import filter { if net ~ 64.0.0.0/7 then accept; reject; };
table b;
......@@ -182,8 +198,8 @@ EOF
cf f1-6 -- cat <<EOF
table b;
protocol bgp {
local fd01:55::9 as 65123;
neighbor fd01:55::1 as 65123;
local fd01:55:3::1 as 65123;
neighbor fd01:55:1::1 as 65123;
import all;
table b;
igp table master;
......@@ -194,7 +210,7 @@ EOF
cf n1-4 -- cat <<EOF
table b;
protocol bgp {
local 10.55.1.13 as 65123;
local 10.55.4.1 as 65123;
neighbor 10.55.1.1 as 65123;
import filter { if net ~ 64.0.0.0/7 then accept; reject; };
table b;
......@@ -206,8 +222,8 @@ EOF
cf n1-6 -- cat <<EOF
table b;
protocol bgp {
local fd01:55::13 as 65123;
neighbor fd01:55::1 as 65123;
local fd01:55:4::1 as 65123;
neighbor fd01:55:1::1 as 65123;
import all;
table b;
igp table master;
......@@ -218,7 +234,7 @@ EOF
cf d2-4 -- cat <<EOF
table b;
protocol bgp {
local 10.55.1.17 as 65123;
local 10.55.5.1 as 65123;
neighbor 10.55.1.1 as 65123;
import filter { if net ~ 64.0.0.0/7 then accept; reject; };
table b;
......@@ -230,8 +246,8 @@ EOF
cf d2-6 -- cat <<EOF
table b;
protocol bgp {
local fd01:55::17 as 65123;
neighbor fd01:55::1 as 65123;
local fd01:55:5::1 as 65123;
neighbor fd01:55:1::1 as 65123;
import all;
table b;
igp table master;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment