1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/bash
ip_netns_a=2.2.2.1
ip_netns_b=2.2.2.2
source $(dirname $0)/generic-functions
clean_start
for type in ipvpn evpn; do
echo
echo "---------------------- $type --------------------"
echo
netnsa="tst${type}a"
netnsb="tst${type}b"
r_a ip netns delete $netnsa
r_a bagpipe-rest-attach --attach --port netns --network-type $type --vpn-instance-id $netnsa --ip $ip_netns_a
r_b ip netns delete $netnsb
r_b bagpipe-rest-attach --attach --port netns --network-type $type --vpn-instance-id $netnsb --ip $ip_netns_b
wait_ready
r_a ip netns exec $netnsa ping -c 3 -W 4 $ip_netns_b
# r_a bagpipe-rest-attach --detach --port netns --network-type $type --vpn-instance-id $netnsa --ip $ip_netns_a
# r_b bagpipe-rest-attach --detach --port netns --network-type $type --vpn-instance-id $netnsb --ip $ip_netns_b
done
echo
echo "---------------------- logs --------------------"
echo
r_both bagpipe-looking-glass logs
clean_stop
|