3 source topologies/basic_topo.sh
5 if [ "$1" == "clean" ] ; then
10 if [[ $(id -u) != 0 ]]; then
11 echo "Error: run this as a root."
15 function test_basic_no_odl
17 basic_topo_setup no_odl
19 if [ "$3" == "wait" ] ; then
20 read -p "press any key to continue .." -n1
25 ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
26 if [ $? -ne 0 ] ; then
27 echo "No response received!"
28 basic_topo_clean no_odl
32 # change IP addresses of destination RLOC
33 echo "set int ip address del host-intervpp2 6.0.3.2/24" | nc 0 5003
34 echo "set int ip address host-intervpp2 6.0.3.20/24" | nc 0 5003
35 echo "set int ip address del host-intervpp2 6:0:3::2/24" | nc 0 5003
36 echo "set int ip address host-intervpp2 6:0:3::20/24" | nc 0 5003
38 echo "lisp remote-mapping del vni 0 eid 6.0.2.0/24 rloc 6.0.3.2" | nc 0 5002
39 echo "lisp remote-mapping add vni 0 eid 6.0.2.0/24 rloc 6.0.3.20" | nc 0 5002
41 ip netns exec vppns1 "${1}" -w 15 -c 1 "${2}"
44 if [ "$3" == "wait" ] ; then
45 read -p "press any key to continue .." -n1
50 basic_topo_clean no_odl
51 if [ $rc -ne 0 ] ; then
52 echo "Test failed: No ICMP response received within specified timeout limit!"