3 source topologies/rtr_two_iface.sh
6 # set odl config json file names; they are common among all rtr tests
7 ODL_CONFIG_FILE1="elp1.json"
8 ODL_CONFIG_FILE2="elp2.json"
10 if [ "$1" == "clean" ] ; then
15 if [[ $(id -u) != 0 ]]; then
16 echo "Error: run this as a root."
20 function test_rtr_two_iface {
23 if [ "$2" == "wait" ] ; then
24 read -p "press any key to continue .." -n1
30 if [ "$1" != "${1#*[0-9].[0-9]}" ]; then
31 ip netns exec vpp1-ns ping -w 20 -c 1 "${1}"
33 elif [ "$1" != "${1#*:[0-9a-fA-F]}" ]; then
34 ip netns exec vpp1-ns ping6 -w 20 -c 1 "${1}"
37 echo "Unrecognized IP format '$1'"
40 #ip netns exec vpp1-ns ping -w 15 -c 1 "${1}"
43 if [ "$2" == "wait" ] ; then
44 read -p "press any key to continue .." -n1
49 if [ $rc -ne 0 ] ; then
50 echo "Test failed: No ICMP response received within specified timeout limit!"