From 58f678f923f497ea9678b3a6a1e908f08f083938 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Tue, 28 Mar 2017 15:31:04 +0200 Subject: Add L3 RTR test with EIDs in non-default VNI Change-Id: If5d35aff850ae03300a26258835d018f55793f7e Signed-off-by: Filip Tehlar --- .../configs/odl/rtr_single_iface/4o4_vni/elp1.json | 43 ++++++++++++++++++++++ .../configs/odl/rtr_single_iface/4o4_vni/elp2.json | 43 ++++++++++++++++++++++ .../rtr_single_iface/4o4_vni/vpp1.config | 9 +++++ .../rtr_single_iface/4o4_vni/vpp2.config | 8 ++++ .../rtr_single_iface/4o4_vni/vpp3.config | 8 ++++ .../tests/test_rtr_single_iface_4o4_vni.sh | 20 ++++++++++ 6 files changed, 131 insertions(+) create mode 100644 tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp1.json create mode 100644 tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp2.json create mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp1.config create mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp2.config create mode 100644 tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp3.config create mode 100755 tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4_vni.sh diff --git a/tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp1.json b/tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp1.json new file mode 100644 index 0000000..4f8d858 --- /dev/null +++ b/tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp1.json @@ -0,0 +1,43 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "virtual-network-id": 100, + "ipv4-prefix": "6.0.1.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ELP", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:explicit-locator-path-lcaf", + "explicit-locator-path": { + "hop": [ + { + "hop-id": "Hop 1", + "address": "6.0.3.3", + "lrs-bits": "lookup rloc-probe strict" + }, + { + "hop-id": "Hop 2", + "address": "6.0.3.1", + "lrs-bits": "lookup strict" + } + ] + } + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp2.json b/tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp2.json new file mode 100644 index 0000000..5a6ac9b --- /dev/null +++ b/tests/data_plane/configs/odl/rtr_single_iface/4o4_vni/elp2.json @@ -0,0 +1,43 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "virtual-network-id": 100, + "ipv4-prefix": "6.0.2.0/24" + }, + "LocatorRecord": [ + { + "locator-id": "ELP", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:explicit-locator-path-lcaf", + "explicit-locator-path": { + "hop": [ + { + "hop-id": "Hop 1", + "address": "6.0.3.3", + "lrs-bits": "lookup rloc-probe strict" + }, + { + "hop-id": "Hop 2", + "address": "6.0.3.2", + "lrs-bits": "lookup strict" + } + ] + } + } + } + ] + } + } +} diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp1.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp1.config new file mode 100644 index 0000000..9e00cf6 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp1.config @@ -0,0 +1,9 @@ +create_host_iface_vrf vpp1 6.0.1.1/24 100 +create_host_iface_vrf vpp3 6.0.2.1/24 200 +create_host_iface xtr1 6.0.3.1/24 + +lisp_state enable +lisp_eid_map_vrf 100 100 +lisp_locator_set_with_locator ls1 host-xtr1 1 1 +lisp_local_eid vni 100 eid 6.0.1.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp2.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp2.config new file mode 100644 index 0000000..cf2ec96 --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp2.config @@ -0,0 +1,8 @@ +create_host_iface_vrf vpp2 6.0.2.1/24 100 +create_host_iface xtr2 6.0.3.2/24 + +lisp_state enable +lisp_eid_map_vrf 100 100 +lisp_locator_set_with_locator ls1 host-xtr2 1 1 +lisp_local_eid vni 100 eid 6.0.2.0/24 locator-set ls1 +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp3.config b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp3.config new file mode 100644 index 0000000..560c8ec --- /dev/null +++ b/tests/data_plane/configs/vpp_lite_config/rtr_single_iface/4o4_vni/vpp3.config @@ -0,0 +1,8 @@ +create_host_iface xtr3 6.0.3.3/24 + +lisp_state enable +lisp_locator_set_with_locator ls1 host-xtr3 1 1 +lisp_pitr ls1 +lisp_eid_map_vrf 100 100 +lisp_remote_mapping vni 100 eid 6.0.0.0/16 action send-map-request +lisp_map_resolver 6.0.3.100 diff --git a/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4_vni.sh b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4_vni.sh new file mode 100755 index 0000000..dff9023 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/tests/test_rtr_single_iface_4o4_vni.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# +# Test for VPP LISP RTR functionality (4over4). +# +# IMPORTANT: This test needs to have ODL running with following config +# line in etc/custom.properties: +# lisp.elpPolicy = replace +# +# This test configures a topology of two XTRs and RTR. An ICMP request is +# sent from host1 behind first TR to the host2 behind the second TR. +# Both host and underlaying networks are IPv4. +# + +VPP_LITE_CONF=`pwd`"/../configs/vpp_lite_config/rtr_single_iface/4o4_vni" +ODL_CONFIG_DIR=`pwd`"/../configs/odl/rtr_single_iface/4o4_vni" + +source test_driver/rtr_single_iface.sh + +test_rtr_single_iface ping "6.0.2.2" -- cgit 1.2.3-korg