summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data_plane/vpp_lite_topo')
-rw-r--r--tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh45
-rw-r--r--tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh45
-rwxr-xr-xtests/data_plane/vpp_lite_topo/lisp_test.sh28
3 files changed, 115 insertions, 3 deletions
diff --git a/tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh b/tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh
new file mode 100644
index 0000000..f25e8ec
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/lisp_6_remote_mapping.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+function ping_lisp6 {
+ sudo ip netns exec vppns1 ping6 -c 10 6:0:2::2
+ if [ $? -ne 0 ] ; then
+ echo "Can not ping other machine"
+ exit -1
+ fi
+}
+
+sudo ip netns exec vppns1 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6:0:1::2/64 dev veth_vpp1
+ ip route add 6:0:2::0/64 via 6:0:1::1
+"
+
+sudo ip netns exec vppns2 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6:0:2::2/64 dev veth_vpp2
+ ip route add 6:0:1::0/64 via 6:0:2::1
+"
+
+ping_lisp6
+
+expect << EOF
+spawn telnet localhost 5003
+expect -re ".*>"
+send "set int ip address del host-intervpp2 6:0:3::2/64\r"
+expect -re ".*>"
+send "set int ip address host-intervpp2 6:0:3::20/64\r"
+expect -re ".*>"
+EOF
+
+expect << EOF
+spawn telnet localhost 5002
+expect -re ".*>"
+send "lisp remote-mapping del vni 0 deid 6:0:2::0/64 seid 6:0:1::0/64 rloc 6:0:3::2\r"
+expect -re ".*>"
+send "lisp remote-mapping add vni 0 deid 6:0:2::0/64 seid 6:0:1::0/64 rloc 6:0:3::20\r"
+expect -re ".*>"
+EOF
+
+ping_lisp6
diff --git a/tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh b/tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh
new file mode 100644
index 0000000..3ee6f07
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/lisp_remote_mapping.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+function ping_lisp {
+ sudo ip netns exec vppns1 ping -c 10 6.0.2.2
+ if [ $? -ne 0 ] ; then
+ echo "Can not ping other machine"
+ exit -1
+ fi
+}
+
+sudo ip netns exec vppns1 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.1.2/24 dev veth_vpp1
+ ip route add 6.0.2.0/24 via 6.0.1.1
+"
+
+sudo ip netns exec vppns2 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.2.2/24 dev veth_vpp2
+ ip route add 6.0.1.0/24 via 6.0.2.1
+"
+
+ping_lisp
+
+expect << EOF
+spawn telnet localhost 5003
+expect -re ".*>"
+send "set int ip address del host-intervpp2 6.0.3.2/24\r"
+expect -re ".*>"
+send "set int ip address host-intervpp2 6.0.3.20/24\r"
+expect -re ".*>"
+EOF
+
+expect << EOF
+spawn telnet localhost 5002
+expect -re ".*>"
+send "lisp remote-mapping del vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.2\r"
+expect -re ".*>"
+send "lisp remote-mapping add vni 0 deid 6.0.2.0/24 seid 6.0.1.0/24 rloc 6.0.3.20\r"
+expect -re ".*>"
+EOF
+
+ping_lisp
diff --git a/tests/data_plane/vpp_lite_topo/lisp_test.sh b/tests/data_plane/vpp_lite_topo/lisp_test.sh
index 9e3070e..7f01f5a 100755
--- a/tests/data_plane/vpp_lite_topo/lisp_test.sh
+++ b/tests/data_plane/vpp_lite_topo/lisp_test.sh
@@ -1,12 +1,14 @@
#!/usr/bin/env bash
if [ "$1" == "-h" ] || [ "$1" == "-help" ] ; then
- echo "lisp_test.sh [ip4] [ip6] [ip4_ip6] [4o6] [6o4]"
+ echo "lisp_test.sh [ip4] [ip6] [ip4_ip6] [4o6] [6o4] [remote] [remote6]"
echo " ip4 - test ip4 topology"
echo " ip6 - test ip6 topology"
echo " ip4_ip6 - test ip4 and ip6 topology"
echo " 4o6 - test ip4 over ip6"
echo " 6o4 - test ip6 over ip4"
+ echo " remote - test statick mapping, whit out ODL"
+ echo " remote6 - test statick mapping for IPv6, whit out ODL"
exit 0
fi
@@ -58,8 +60,10 @@ sudo ip netns del vppns1 &> /dev/null
sudo ip netns del vppns2 &> /dev/null
sudo ip netns del intervppns &> /dev/null
-curl -X DELETE http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database/ \
- -u ${ODL_USER}:${ODL_PASSWD}
+if [ "$1" != "remote" ] && [ "$1" != "remote6" ] ; then
+ curl -X DELETE http://${ODL_IP}:${ODL_PORT}/restconf/config/odl-mappingservice:mapping-database/ \
+ -u ${ODL_USER}:${ODL_PASSWD}
+fi
if [ "$1" == "clean" ] ; then
exit 0;
@@ -123,6 +127,16 @@ if [ "$1" == "6o4" ] ; then
VPP2_CONF="vpp2_6o4.conf"
fi
+if [ "$1" == "remote" ] ; then
+ VPP1_CONF="vpp1_remote.conf"
+ VPP2_CONF="vpp2_remote.conf"
+fi
+
+if [ "$1" == "remote6" ] ; then
+ VPP1_CONF="vpp1_6_remote.conf"
+ VPP2_CONF="vpp2_6_remote.conf"
+fi
+
# start vpp1 and vpp2 in separate chroot
sudo $VPP_LITE_BIN \
unix { log /tmp/vpp1.log cli-listen \
@@ -161,4 +175,12 @@ if [ "$1" == "6o4" ] ; then
source lisp_ip6o4.sh
fi
+if [ "$1" == "remote" ] ; then
+ source lisp_remote_mapping.sh
+fi
+
+if [ "$1" == "remote6" ] ; then
+ source lisp_6_remote_mapping.sh
+fi
+
echo "Success"