From 46e4b31a8a57e9af1be2cdbc0c67c153ec9cd9b3 Mon Sep 17 00:00:00 2001 From: Andrej Kozemcak Date: Mon, 16 May 2016 15:46:18 +0200 Subject: Add new test for IP4 over IP6 and IP6 over IP4 Change-Id: Icc411c22f041c447d595cb158102675f4055a7de Signed-off-by: Andrej Kozemcak --- tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh (limited to 'tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh') diff --git a/tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh b/tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh new file mode 100644 index 0000000..3da810e --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/lisp_ip6o4.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +function ping_lisp6 { + sudo ip netns exec vppns1 ping6 -c 15 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 +" + +post_curl "add-mapping" ${ODL_ADD_CONFIG1_6o4} +post_curl "add-mapping" ${ODL_ADD_CONFIG2_6o4} + +ping_lisp6 + +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 + +post_curl "update-mapping" ${ODL_REPLACE_CONFIG2_6o4} + +ping_lisp6 -- cgit 1.2.3-korg