diff options
Diffstat (limited to 'tests/data_plane/vpp_lite_topo')
5 files changed, 47 insertions, 2 deletions
diff --git a/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py b/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py index 9bf2c15..864b486 100644 --- a/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py +++ b/tests/data_plane/vpp_lite_topo/scripts/cmd_mappings.py @@ -63,6 +63,7 @@ SimpleMapping('lisp_rloc_probe_state', 'one rloc-probe', 'one_rloc_probe_enable_ SimpleMapping('lisp_map_register_state', 'one map-register', 'one_map_register_enable_disable') SimpleMapping('lisp_stats', 'one statistics', 'one_stats_enable_disable') SimpleMapping('lisp_l2_arp', 'one l2 arp', 'one_add_del_l2_arp_entry') +SimpleMapping('lisp_ndp_entry', 'one ndp', 'one_add_del_ndp_entry') SimpleMapping('lisp_nsh_set_ls', 'one nsh-mapping', 'one_nsh_set_locator_set') SimpleMapping('ipsec_sad_add_del_entry', 'TODO', 'ipsec_sad_add_del_entry') diff --git a/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh b/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh index 8a1ac51..06f355b 100644 --- a/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh +++ b/tests/data_plane/vpp_lite_topo/test_driver/basic_no_odl.sh @@ -33,7 +33,7 @@ function test_basic_no_odl echo "set int ip address del host-intervpp2 6:0:3::2/64" | nc 0 5003 echo "set int ip address host-intervpp2 6:0:3::20/64" | nc 0 5003 - if [ ${3} == "switch_rlocs" ] ; then + if [ "${3}" == "switch_rlocs" ] ; then echo "lisp remote-mapping del vni 0 eid 6.0.2.0/24" | nc 0 5002 echo "lisp remote-mapping add vni 0 eid 6.0.2.0/24 rloc 6:0:3::20" | nc 0 5002 echo "lisp remote-mapping del vni 0 eid 6:0:2::0/64" | nc 0 5002 diff --git a/tests/data_plane/vpp_lite_topo/test_driver/ndp.sh b/tests/data_plane/vpp_lite_topo/test_driver/ndp.sh new file mode 100644 index 0000000..5280c67 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/test_driver/ndp.sh @@ -0,0 +1,33 @@ +source config.sh +source odl_utils.sh +source topologies/3_node_star.sh + +if [ "$1" == "clean" ] ; then + 3_node_star_topo_clean no_odl + exit 0 +fi + +if [[ $(id -u) != 0 ]]; then + echo "Error: run this as root." + exit 1 +fi + +function send_icmp_from_namespace +{ + ip netns exec "$1" "$2" -w 15 -c 1 "$3" +} + + +function test_neighbor_discovery +{ + 3_node_star_topo_setup no_odl no_arp + + maybe_pause + send_icmp_from_namespace vpp-ns5 "$1" "$2" + rc=$? + + maybe_pause + 3_node_star_topo_clean no_odl + print_status $rc "No ICMP response!" + exit $test_result +} diff --git a/tests/data_plane/vpp_lite_topo/tests/test_neighbor_solicitation_static.sh b/tests/data_plane/vpp_lite_topo/tests/test_neighbor_solicitation_static.sh new file mode 100755 index 0000000..fbea78d --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_neighbor_solicitation_static.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +VPP_LITE_CONF=`pwd`/../configs/vpp_lite_config/ndp + +source test_driver/ndp.sh + +test_neighbor_discovery ping6 "6:0:10::22" diff --git a/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh b/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh index d21732e..6b67a00 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh @@ -17,12 +17,13 @@ # + | | + 6.0.10.22 # 6.0.10.21 | VPP3 | 08:22:22:22:22:22 # 08:11:11:11:11:11 | | -# +-+----+-+ +# 6:0:10::21 +-+----+-+ # vpp6| |vpp4 # | | # | +6.0.2.2 # + 6:0:2::2 # 6.0.10.22 +# 6:0:10::22 # 08:22:22:22:22:22 # @@ -177,6 +178,7 @@ function 3_node_star_topo_setup bash -c " ip link set dev lo up ip addr add 6.0.10.21/24 dev veth_vpp5 + ip addr add 6:0:10::21/64 dev veth_vpp5 " ip link add veth_vpp6 type veth peer name vpp6 @@ -188,6 +190,7 @@ function 3_node_star_topo_setup bash -c " ip link set dev lo up ip addr add 6.0.10.22/24 dev veth_vpp6 + ip addr add 6:0:10::22/64 dev veth_vpp6 " ip link add veth_vpp7 type veth peer name vpp7 @@ -225,6 +228,7 @@ maybe_pause echo "* Selected configuration method: $CFG_METHOD" if [ "$CFG_METHOD" == "cli" ] ; then + sleep 1 echo "exec ${VPP_LITE_CONF}/vpp1.cli" | nc 0 5002 echo "exec ${VPP_LITE_CONF}/vpp2.cli" | nc 0 5003 echo "exec ${VPP_LITE_CONF}/vpp3.cli" | nc 0 5004 |