3 source topologies/3_node_star.sh
5 ODL_CONFIG_FILE1="map1.json"
6 ODL_CONFIG_FILE2="map2.json"
8 if [ "$1" == "clean" ] ; then
13 if [[ $(id -u) != 0 ]]; then
14 echo "Error: run this as a root."
18 function send_ping_from_ns
20 ip netns exec "${1}" "${2}" -w 20 -c 1 "${3}"
21 assert_rc_ok $? 3_node_star_topo_clean "No ICMP Response!"
26 3_node_star_topo_setup
27 post_curl "add-mapping" "map3.json"
28 post_curl "add-mapping" "map4.json"
34 # send ping for first EID
35 send_ping_from_ns vpp-ns1 ${1} ${2}
37 # TODO assert counters
41 # send ping for second EID
42 send_ping_from_ns vpp-ns3 ${1} ${2}
46 # verify first tunnel still works
47 send_ping_from_ns vpp-ns1 ${1} ${2}
51 # verify second tunnel still works
52 send_ping_from_ns vpp-ns3 ${1} ${2}
56 3_node_star_topo_clean
57 print_status $rc "No ICM response!"
61 function test_src_dst_l2
63 3_node_star_topo_setup
64 post_curl "add-mapping" "map3.json"
65 post_curl "add-mapping" "map4.json"
71 # send ping for first EID
72 send_ping_from_ns vpp-ns5 ${1} ${2}
74 # TODO assert counters
78 # send ping for second EID
79 send_ping_from_ns vpp-ns8 ${1} ${2}
83 # verify first tunnel still works
84 send_ping_from_ns vpp-ns5 ${1} ${2}
88 # verify second tunnel still works
89 send_ping_from_ns vpp-ns8 ${1} ${2}
93 3_node_star_topo_clean
94 print_status $rc "No ICM response!"