From aafa2efa63b891e85ff13255691aae4909bc503c Mon Sep 17 00:00:00 2001 From: Nidhy Date: Sat, 31 Aug 2019 12:53:12 +0000 Subject: [PATCH] LISP: 3-node (func) to 2-node (dev) converstion Change-Id: I0fbe4d9ef1b30a1ac1382ea43b5b52aeb8a7d39f Signed-off-by: Nidhy --- docs/tag_documentation.rst | 20 +++ resources/libraries/robot/overlay/lisp.robot | 153 +++++++++++++++++++++ resources/libraries/robot/overlay/lispgpe.robot | 2 +- resources/libraries/robot/shared/default.robot | 8 ++ resources/libraries/robot/shared/traffic.robot | 138 +++++++++++++++++++ resources/test_data/lisp/lisp.py | 93 +++++++++++++ resources/traffic_scripts/lisp/lisp_check.py | 18 ++- resources/traffic_scripts/lisp/lispgpe_check.py | 18 ++- .../lisp/eth2p-ethip4lisp-ip4base-dev.robot | 82 +++++++++++ .../lisp/eth2p-ethip4lispgpe-ip4base-dev.robot | 83 +++++++++++ .../lisp/eth2p-ethip4lispgpe-ip6base-dev.robot | 85 ++++++++++++ .../lisp/eth2p-ethip6lispgpe-ip4base-dev.robot | 84 +++++++++++ .../lisp/eth2p-ethip6lispgpe-ip6base-dev.robot | 83 +++++++++++ tests/vpp/func/ip4_tunnels/__init__.robot | 12 -- .../lisp/eth2p-ethip4lisp-ip4base-func.robot | 129 ----------------- .../lisp/eth2p-ethip4lispgpe-ip4base-func.robot | 107 -------------- .../lisp/eth2p-ethip4lispgpe-ip6base-func.robot | 110 --------------- tests/vpp/func/ip6_tunnels/__init__.robot | 12 -- .../lisp/eth2p-ethip6lispgpe-ip4base-func.robot | 99 ------------- .../lisp/eth2p-ethip6lispgpe-ip6base-func.robot | 106 -------------- 20 files changed, 858 insertions(+), 584 deletions(-) create mode 100644 resources/libraries/robot/overlay/lisp.robot create mode 100644 resources/test_data/lisp/lisp.py create mode 100644 tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-dev.robot create mode 100644 tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-dev.robot create mode 100644 tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot create mode 100644 tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot create mode 100644 tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-dev.robot delete mode 100644 tests/vpp/func/ip4_tunnels/__init__.robot delete mode 100644 tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-func.robot delete mode 100644 tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-func.robot delete mode 100644 tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-func.robot delete mode 100644 tests/vpp/func/ip6_tunnels/__init__.robot delete mode 100644 tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-func.robot delete mode 100644 tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-func.robot diff --git a/docs/tag_documentation.rst b/docs/tag_documentation.rst index 5c68858bfa..5646cd0781 100644 --- a/docs/tag_documentation.rst +++ b/docs/tag_documentation.rst @@ -464,6 +464,26 @@ Encapsulation Tags All test cases with LISP-GPE. +.. topic:: LISP_IP4o4 + + All test cases with LISP_IP4o4. + +.. topic:: LISPGPE_IP4o4 + + All test cases with LISPGPE_IP4o4. + +.. topic:: LISPGPE_IP6o4 + + All test cases with LISPGPE_IP6o4. + +.. topic:: LISPGEP_IP4o6 + + All test cases with LISPGPE_IP4o6. + +.. topic:: LISPGPE_IP6o6 + + All test cases with LISPGPE_IP6o6. + .. topic:: VXLAN All test cases with Vxlan. diff --git a/resources/libraries/robot/overlay/lisp.robot b/resources/libraries/robot/overlay/lisp.robot new file mode 100644 index 0000000000..826cc3a7b1 --- /dev/null +++ b/resources/libraries/robot/overlay/lisp.robot @@ -0,0 +1,153 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.LispSetup.LispAdjacency +| Library | resources.libraries.python.LispSetup.LispEidTableMap +| Library | resources.libraries.python.LispSetup.LispLocalEid +| Library | resources.libraries.python.LispSetup.LispLocator +| Library | resources.libraries.python.LispSetup.LispLocatorSet +| Library | resources.libraries.python.LispSetup.LispRemoteMapping +| Resource | resources/libraries/robot/shared/default.robot + +*** Keywords *** +| Configure topology for IPv4 LISP testing +| | [Documentation] | Setup topology for IPv4 LISP testing. +| | ... +| | ... | *Example:* +| | ... | \| Configure topology for IPv4 LISP testing \| +| | ... +| | Set interfaces in path up +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip4} | ${ip4_plen} +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip4} | ${ip4_plen} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if1} | ${src_ip4} | ${tg_if1_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${dst_ip4} | ${tg_if2_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip4} | ${tg_if2_mac} + +| Configure topology for IPv6 LISP testing +| | [Documentation] | Setup topology fo IPv6 LISP testing. +| | ... +| | ... | *Example:* +| | ... | \| Configure topology for IPv6 LISP testing \| +| | ... +| | Set interfaces in path up +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip6} | ${ip6_plen} +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip6} | ${ip6_plen} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if1} | ${src_ip6} | ${tg_if1_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${dst_ip6} | ${tg_if2_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip6} | ${tg_if2_mac} + +| Configure LISP in 2-node circular topology +| | [Documentation] | Configure LISP topology in 2-node circular topology. +| | ... +| | ... | *Arguments:* +| | ... | - dut1 - DUT1 node. Type: dictionary +| | ... | - dut1_if - DUT1 node interface. Type: string +| | ... | - dut1_int_index - DUT1 node interface index. Type: integer +| | ... | - locator_set - Locator set values. Type: dictionary +| | ... | - dut1_eid - DUT1 node eid address. Type: dictionary +| | ... | - dut1_static_adjacency - DUT1 static adjacency. Type: dictionary +| | ... | - is_gpe - To enable GPE. Other than zero to enable Type: integer +| | ... | - vni_table - vni table Eid Table Mapping Type: integer +| | ... | - vrf_table - vrf table Eid Table Mapping Type: integer +| | ... +| | ... | *Return:* +| | ... | - No value returned +| | ... +| | ... | *Example:* +| | ... | \| Configure LISP in 2-node circular topology \ +| | ... | \| ${dut1} \| ${interface_name} \ +| | ... | \| None \| ${locator_set} \| ${dut1_eid} \ +| | ... | \| ${dut1_static_adjacency} \| +| | ... +| | [Arguments] +| | ... | ${dut1} | ${dut1_if} | ${dut1_int_index} +| | ... | ${locator_set} | ${dut1_eid} +| | ... | ${dut1_static_adjacency} +| | ... | ${is_gpe}=0 +| | ... | ${vni_table}=0 | ${vrf_table}=0 +| | ... +# DUT1 settings: +| | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None +| | ... | Get Interface Sw Index | ${dut1} | ${dut1_if} +| | ... | ELSE | Set Variable | ${dut1_int_index} +| | Enable Lisp | ${dut1} +| | Run keyword if | ${is_gpe} != 0 +| | ... | Enable Lisp GPE | ${dut1} +| | Vpp Add Lisp Locator Set | ${dut1} | ${locator_set['locator_name']} +| | Vpp Add Lisp Locator | ${dut1} | ${locator_set['locator_name']} +| | ... | ${dut1_int_index} | ${locator_set['priority']} +| | ... | ${locator_set['weight']} +| | Run keyword if | ${is_gpe} != 0 +| | ... | Vpp Lisp Eid Table Mapping | ${dut1} +| | ... | ${vni_table} +| | ... | vrf=${vrf_table} +| | Vpp Add Lisp Local Eid | ${dut1} | ${dut1_eid['locator_name']} +| | ... | ${dut1_eid['vni']} | ${dut1_eid['eid']} | ${dut1_eid['prefix']} +| | Vpp Add Lisp Remote Mapping | ${dut1} | ${dut1_static_adjacency['vni']} +| | ... | ${dut1_static_adjacency['deid']} +| | ... | ${dut1_static_adjacency['prefix']} +| | ... | ${dut1_static_adjacency['seid']} +| | ... | ${dut1_static_adjacency['prefix']} +| | ... | ${dut1_static_adjacency['rloc']} +| | Vpp Add Lisp Adjacency | ${dut1} | ${dut1_static_adjacency['vni']} +| | ... | ${dut1_static_adjacency['deid']} +| | ... | ${dut1_static_adjacency['prefix']} +| | ... | ${dut1_static_adjacency['seid']} +| | ... | ${dut1_static_adjacency['prefix']} + +| Configure topology for IPv6 LISPoIP4 testing +| | [Documentation] | Setup topology fo IPv6 LISPoIPV4 testing. +| | ... +| | ... | *Example:* +| | ... | \| Configure topology for IPv6 LISPoIP4 testing \| +| | ... +| | Set interfaces in path up +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip6} | ${ip6_plen} +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip4} | ${ip4_plen} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if1} | ${src_ip6} | ${tg_if1_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${dst_ip6} | ${tg_if2_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip4} | ${tg_if2_mac} + +| Configure topology for IPv4 LISPoIP6 testing +| | [Documentation] | Setup topology fo IPv4 LISPoIPV6 testing. +| | ... +| | ... | *Example:* +| | ... | \| Configure topology for IPv4 LISPoIP6 testing \| +| | ... +| | Set interfaces in path up +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if1} | ${dut_if1_ip4} | ${ip4_plen} +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${dut1_if2} | ${dut_if2_ip6} | ${ip6_plen} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if1} | ${src_ip4} | ${tg_if1_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${dst_ip4} | ${tg_if2_mac} +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | ${tg_if2_ip6} | ${tg_if2_mac} diff --git a/resources/libraries/robot/overlay/lispgpe.robot b/resources/libraries/robot/overlay/lispgpe.robot index d5115d8242..5c611a56a9 100644 --- a/resources/libraries/robot/overlay/lispgpe.robot +++ b/resources/libraries/robot/overlay/lispgpe.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. +# Copyright (c) 2019 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 3da2026ba6..8985bd2434 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -26,6 +26,10 @@ | Library | resources.libraries.python.Cop | Library | resources.libraries.python.DUTSetup | Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.IPv6Util +| Library | resources.libraries.python.NodePath | Library | resources.libraries.python.Namespaces | Library | resources.libraries.python.PapiHistory | Library | resources.libraries.python.SchedUtils @@ -49,6 +53,9 @@ | Resource | resources/libraries/robot/l2/l2_xconnect.robot | Resource | resources/libraries/robot/l2/tagging.robot | Resource | resources/libraries/robot/overlay/srv6.robot +| Resource | resources/libraries/robot/overlay/lisp.robot +| Resource | resources/libraries/robot/overlay/lispgpe.robot +| Resource | resources/libraries/robot/overlay/lisp_api.robot | Resource | resources/libraries/robot/performance/performance_configuration.robot | Resource | resources/libraries/robot/performance/performance_limits.robot | Resource | resources/libraries/robot/performance/performance_utils.robot @@ -59,6 +66,7 @@ | Resource | resources/libraries/robot/shared/suite_setup.robot | Resource | resources/libraries/robot/shared/test_teardown.robot | Resource | resources/libraries/robot/shared/test_setup.robot +| Resource | resources/libraries/robot/shared/testing_path.robot | Resource | resources/libraries/robot/shared/traffic.robot | Resource | resources/libraries/robot/shared/vm.robot diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot index dc3cc054b2..294d0a7deb 100644 --- a/resources/libraries/robot/shared/traffic.robot +++ b/resources/libraries/robot/shared/traffic.robot @@ -886,3 +886,141 @@ | | ${args}= | Set Variable If | "${r_tunnel}" == "${None}" | ${args} | | ... | ${args} --dst_tun ${r_tunnel} | | Run Traffic Script On Node | ipsec.py | ${node} | ${args} + +| Send packet and verify LISP encap +| | [Documentation] | Send ICMP packet to DUT out one interface and receive\ +| | ... | a LISP encapsulated packet on the other interface. +| | ... +| | ... | *Arguments:* +| | ... +| | ... | _NOTE:_ Arguments are based on topology: +| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) +| | ... +| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary +| | ... | - src_ip - IP of source interface (TG-if1). Type: string +| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string +| | ... | - tx_src_port - Interface of TG-if1. Type: string +| | ... | - tx_src_mac - MAC address of TG-if1. Type: string +| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string +| | ... | - rx_port - Interface of TG-if1. Type: string +| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string +| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string +| | ... | - src_rloc - configured RLOC source address. Type: string +| | ... | - dst_rloc - configured RLOC destination address. Type: string +| | ... +| | ... | *Return:* +| | ... | - No value returned +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \ +| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \ +| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \ +| | ... | \| 10.0.1.2 \| +| | ... +| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} +| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} +| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc} +| | ... +| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port} +| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} +| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac +| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac +| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip} +| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name} +| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc} +| | Run Traffic Script On Node | lisp/lisp_check.py | ${tg_node} +| | ... | ${args} + +| Send packet and verify LISP GPE encap +| | [Documentation] | Send ICMP packet to DUT out one interface and receive\ +| | ... | a LISP-GPE encapsulated packet on the other interface. +| | ... +| | ... | *Arguments:* +| | ... +| | ... | _NOTE:_ Arguments are based on topology: +| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) +| | ... +| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary +| | ... | - src_ip - IP of source interface (TG-if1). Type: string +| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string +| | ... | - tx_src_port - Interface of TG-if1. Type: string +| | ... | - tx_src_mac - MAC address of TG-if1. Type: string +| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string +| | ... | - rx_port - Interface of TG-if1. Type: string +| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string +| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string +| | ... | - src_rloc - configured RLOC source address. Type: string +| | ... | - dst_rloc - configured RLOC destination address. Type: string +| | ... +| | ... | *Return:* +| | ... | - No value returned +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Send packet and verify LISP GPE encap \| ${nodes['TG']} \ +| | ... | \| 10.0.0.1 \| 32.0.0.1 \ +| | ... | \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \ +| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \ +| | ... | \| 10.0.1.1 \| 10.0.1.2 \| +| | ... +| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} | +| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} +| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc} +| | ... +| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port} +| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} +| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac +| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac +| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip} +| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name} +| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc} +| | Run Traffic Script On Node | lisp/lispgpe_check.py | ${tg_node} +| | ... | ${args} + +| Send packet and verify LISPoTunnel encap +| | [Documentation] | Send ICMP packet to DUT out one interface and receive\ +| | ... | a LISP encapsulated packet on the other interface. +| | ... +| | ... | *Arguments:* +| | ... +| | ... | _NOTE:_ Arguments are based on topology: +| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) +| | ... +| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary +| | ... | - src_ip - IP of source interface (TG-if1). Type: string +| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string +| | ... | - tx_src_port - Interface of TG-if1. Type: string +| | ... | - tx_src_mac - MAC address of TG-if1. Type: string +| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string +| | ... | - rx_port - Interface of TG-if1. Type: string +| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string +| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string +| | ... | - src_rloc - configured RLOC source address. Type: string +| | ... | - dst_rloc - configured RLOC destination address. Type: string +| | ... | - ot_mode - overlay tunnel mode. Type: string +| | ... +| | ... | *Return:* +| | ... | - No value returned +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \ +| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \ +| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \ +| | ... | \| 10.0.1.2 \| +| | ... +| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} +| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} +| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc} | ${ot_mode} +| | ... +| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port} +| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} +| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac +| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac +| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip} +| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name} +| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc} +| | ... | --ot_mode | ${ot_mode} +| | Run Traffic Script On Node | lisp/lispgpe_check.py | ${tg_node} +| | ... | ${args} diff --git a/resources/test_data/lisp/lisp.py b/resources/test_data/lisp/lisp.py new file mode 100644 index 0000000000..4539f8208d --- /dev/null +++ b/resources/test_data/lisp/lisp.py @@ -0,0 +1,93 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Test variables of lisp and lispgpe (ip4/ip6) encapsulation test suite.""" + +# Lisp default global value +locator_name = 'tst_locator' + +# Test configuration data +tg_if1_ip4= '6.0.0.2' +tg_if2_ip4= '6.0.1.2' +dut_if1_ip4= '6.0.0.1' +dut_if2_ip4= '6.0.1.1' +tg_if2_ip6= '6:0:1::2' +dut_if2_ip6= '6:0:1::1' +ip4_plen= 24 +src_ip4= '6.0.0.2' +dst_ip4= '6.0.2.2' +src_rloc4= dut_if2_ip4 +dst_rloc4= tg_if2_ip4 +src_rloc6= dut_if2_ip6 +dst_rloc6= tg_if2_ip6 + +#IP6 over IP4 LISP configuration data +tg_if1_ip6= '6::2' +dut_if1_ip6= '6:0:0::1' +src_ip6= '6::2' +dst_ip6= '6:0:2::2' +ip6_plen=64 + +# Lisp default locator_set value +duts_locator_set = {'locator_name': locator_name, + 'priority': 1, + 'weight': 1} + +# IPv4 Lisp static mapping configuration + +dut1_to_tg_ip4_static_adjacency = {'vni': 0, + 'deid': '6.0.2.0', + 'seid': '6.0.0.0', + 'rloc': '6.0.1.2', + 'prefix': 24} + +dut1_ip4_eid = {'locator_name': locator_name, + 'vni': 0, + 'eid': '6.0.0.0', + 'prefix': 24} + +# IPv6 Lisp static mapping configuration + +dut1_to_tg_ip6_static_adjacency = {'vni': 0, + 'deid': '6:0:2::0', + 'seid': '6:0:0::0', + 'rloc': '6:0:1::2', + 'prefix': 64} + +dut1_ip6_eid = {'locator_name': locator_name, + 'vni': 0, + 'eid': '6:0:0::0', + 'prefix': 64} + + +#IPv6 over IPv4 LISP mapping +dut1_ip6o4_static_adjacency = {'vni': 0, + 'deid': '6:0:2::0', + 'seid': '6:0:0::0', + 'rloc': '6.0.1.2', + 'prefix': 64} +dut1_ip6o4_eid = {'locator_name': locator_name, + 'vni': 0, + 'eid': '6:0:0::0', + 'prefix': 64} + +#IPv4 over IPv6 LISP mapping +dut1_ip4o6_static_adjacency = {'vni': 0, + 'deid': '6.0.2.0', + 'seid': '6.0.0.0', + 'rloc': '6:0:1::2', + 'prefix': 24} +dut1_ip4o6_eid = {'locator_name': locator_name, + 'vni': 0, + 'eid': '6.0.0.0', + 'prefix': 24} diff --git a/resources/traffic_scripts/lisp/lisp_check.py b/resources/traffic_scripts/lisp/lisp_check.py index 5e1a835b74..9937de8077 100755 --- a/resources/traffic_scripts/lisp/lisp_check.py +++ b/resources/traffic_scripts/lisp/lisp_check.py @@ -72,7 +72,8 @@ def main(): args = TrafficScriptArg( ['tg_src_mac', 'tg_dst_mac', 'src_ip', 'dst_ip', 'dut_if1_mac', - 'dut_if2_mac', 'src_rloc', 'dst_rloc']) + 'dut_if2_mac', 'src_rloc', 'dst_rloc'], + ['ot_mode']) tx_src_mac = args.get_arg('tg_src_mac') tx_dst_mac = args.get_arg('dut_if1_mac') @@ -84,6 +85,7 @@ def main(): dst_rloc = args.get_arg("dst_rloc") tx_if = args.get_arg('tx_if') rx_if = args.get_arg('rx_if') + ot_mode = args.get_arg('ot_mode') rxq = RxQueue(rx_if) txq = TxQueue(tx_if) @@ -124,9 +126,17 @@ def main(): ip = ether.payload - if not isinstance(ip, ip_format): - raise RuntimeError( - "Not an IP packet received {0}".format(ip.__repr__())) + if ot_mode == '6to4': + if not isinstance(ip, IP): + raise RuntimeError( + "Not an IP packet received {0}".format(ip.__repr__())) + elif ot_mode == '4to6': + if not isinstance(ip, IP6): + raise RuntimeError( + "Not an IP packet received {0}".format(ip.__repr__())) + elif not isinstance(ip, ip_format): + raise RuntimeError( + "Not an IP packet received {0}".format(ip.__repr__())) lisp = ether.getlayer(lisp_layer) if not lisp: diff --git a/resources/traffic_scripts/lisp/lispgpe_check.py b/resources/traffic_scripts/lisp/lispgpe_check.py index 7979b6ced9..d4de8635d7 100755 --- a/resources/traffic_scripts/lisp/lispgpe_check.py +++ b/resources/traffic_scripts/lisp/lispgpe_check.py @@ -96,7 +96,8 @@ def main(): args = TrafficScriptArg( ['tg_src_mac', 'tg_dst_mac', 'src_ip', 'dst_ip', 'dut_if1_mac', - 'dut_if2_mac', 'src_rloc', 'dst_rloc']) + 'dut_if2_mac', 'src_rloc', 'dst_rloc'], + ['ot_mode']) tx_src_mac = args.get_arg('tg_src_mac') tx_dst_mac = args.get_arg('dut_if1_mac') @@ -108,6 +109,7 @@ def main(): dst_rloc = args.get_arg("dst_rloc") tx_if = args.get_arg('tx_if') rx_if = args.get_arg('rx_if') + ot_mode = args.get_arg('ot_mode') rxq = RxQueue(rx_if) txq = TxQueue(tx_if) @@ -146,9 +148,17 @@ def main(): ip = ether.payload - if not isinstance(ip, ip_format): - raise RuntimeError( - "Not an IP packet received {0}".format(ip.__repr__())) + if ot_mode == '6to4': + if not isinstance(ip, IP): + raise RuntimeError( + "Not an IP packet received {0}".format(ip.__repr__())) + elif ot_mode == '4to6': + if not isinstance(ip, IPv6): + raise RuntimeError( + "Not an IP packet received {0}".format(ip.__repr__())) + elif not isinstance(ip, ip_format): + raise RuntimeError( + "Not an IP packet received {0}".format(ip.__repr__())) lisp = ether.getlayer(LispGPEHeader).underlayer if not lisp: diff --git a/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-dev.robot b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-dev.robot new file mode 100644 index 0000000000..db5b3227d4 --- /dev/null +++ b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-dev.robot @@ -0,0 +1,82 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| ... +# Import configuration and test data: +| Variables | resources/test_data/lisp/lisp.py +| ... +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY +| ... | NIC_Virtual | IP4FWD | LISP_IP4o4 +| ... +| Suite Setup | Setup suite single link | scapy +| Test Setup | Setup test +| Test Teardown | Tear down test | packet_trace +| ... +| Test Template | Local Template +| ... +| Documentation | *ip4-lisp-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node\ +| ... | circular topology with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4\ +| ... | on DUT1-TG, Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing\ +| ... | over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is\ +| ... | configured between DUT1 and TG2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ +| ... | are sent by TG on if1 link to DUT1; on receive TG verifies\ +| ... | packets for correctness and their IPv4 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${nic_name}= | virtual +| ${overhead}= | ${54} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] On DUT1 configure LISP.\ +| | ... +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer. Type: integer +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | ... +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | ... +| | Set Test Variable | \${frame_size} +| | ... +| | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq} +| | And Add PCI devices to all DUTs +| | And Set Max Rate And Jumbo And Handle Multi Seg +| | And Apply startup configuration on all VPP DUTs | with_trace=${True} +| | When Configure topology for IPv4 LISP testing +| | And Configure LISP in 2-node circular topology +| | ... | ${dut1} | ${dut1_if2} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} +| | ... | ${dut1_to_tg_ip4_static_adjacency} +| | Then Send packet and verify LISP encap +| | ... | ${tg} | ${tg_if1_ip4} | ${dst_ip4} +| | ... | ${tg_if1} | ${tg_if1_mac} | ${dut1_if1_mac} +| | ... | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac} +| | ... | ${src_rloc4} | ${dst_rloc4} + +*** Test Cases *** +| tc01-46B-ethip4lisp-ip4base-dev +| | [Tags] | 46B +| | frame_size=${46} | phy_cores=${0} diff --git a/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-dev.robot b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-dev.robot new file mode 100644 index 0000000000..f4b2cb50c1 --- /dev/null +++ b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-dev.robot @@ -0,0 +1,83 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| ... +# Import configuration and test data: +| Variables | resources/test_data/lisp/lisp.py +| ... +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY +| ... | NIC_Virtual | IP4FWD | LISPGPE_IP4o4 +| ... +| Suite Setup | Setup suite single link | scapy +| Test Setup | Setup test +| Test Teardown | Tear down test | packet_trace +| ... +| Test Template | Local Template +| ... +| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node\ +| ... | circular topology with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPv4-ICMPv4\ +| ... | on DUT1-TG, Eth-IPv4-ICMPv4 on TG-DUTn for IPv4\ +| ... | routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and TG(if2) are configured\ +| ... | with IPv4 routing and static routes. LISPoIPv4 tunnel is\ +| ... | configured between DUT1 and TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ +| ... | are sent in TG->DUT(if1); On receive TG(if2) verifies packets\ +| ... | for correctness and their IPv4 src-addr, dst-addr and\ +| ... | MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${nic_name}= | virtual +| ${overhead}= | ${54} +| ${is_gpe}= | ${1} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] On DUT1 configure LISP. +| | ... +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer. Type: integer +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | ... +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | ... +| | Set Test Variable | \${frame_size} +| | ... +| | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq} +| | And Add PCI devices to all DUTs +| | And Set Max Rate And Jumbo And Handle Multi Seg +| | And Apply startup configuration on all VPP DUTs | with_trace=${True} +| | When Configure topology for IPv4 LISP testing +| | And Configure LISP in 2-node circular topology +| | ... | ${dut1} | ${dut1_if2} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} +| | ... | ${dut1_to_tg_ip4_static_adjacency} | ${is_gpe} +| | Then Send packet and verify LISP GPE encap +| | ... | ${tg} | ${tg_if1_ip4} | ${dst_ip4} +| | ... | ${tg_if1} | ${tg_if1_mac} | ${dut1_if1_mac} +| | ... | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac} +| | ... | ${src_rloc4} | ${dst_rloc4} + +*** Test Cases *** +| tc01-46B-ethip4lispgpe-ip4base-dev +| | [Tags] | 46B +| | frame_size=${46} | phy_cores=${0} diff --git a/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot new file mode 100644 index 0000000000..402bfbfee2 --- /dev/null +++ b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot @@ -0,0 +1,85 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| ... +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/lisp.py +| ... +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY +| ... | NIC_Virtual | IP4FWD | LISPGPE_IP6o4 +| ... +| Suite Setup | Setup suite single link | scapy +| Test Setup | Setup test +| Test Teardown | Tear down test | packet_trace +| ... +| Test Template | Local Template +| ... +| Documentation | *ip4-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG(if1)-DUT1-TG(if2) 2-node\ +| ... | circular topology with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPv6-ICMPv6\ +| ... | on DUT1-TG(if2),Eth-IPv6-ICMPv6 on TG-DUTn for IPv6\ +| ... | routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and TG(if2) are configured\ +| ... | with IPv6 routing and static routes. LISPoIPv4 tunnel is\ +| ... | configured between DUT1 and TG(if2). +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ +| ... | are sent in if1 by TG on links to DUT1; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${nic_name}= | virtual +| ${overhead}= | ${54} +| ${ot_mode}= | 6to4 +| ${is_gpe}= | ${1} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] On DUT1 configure LISPGPE\ +| | ... +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer. Type: integer +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | ... +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | ... +| | Set Test Variable | \${frame_size} +| | ... +| | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq} +| | And Add PCI devices to all DUTs +| | And Set Max Rate And Jumbo And Handle Multi Seg +| | And Apply startup configuration on all VPP DUTs | with_trace=${True} +| | When Configure topology for IPv6 LISPoIP4 testing +| | And Vpp All RA Suppress Link Layer | ${nodes} +| | And Configure LISP in 2-node circular topology +| | ... | ${dut1} | ${dut1_if2} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} +| | ... | ${dut1_ip6o4_static_adjacency} | ${is_gpe} +| | Then Send packet and verify LISPoTunnel encap +| | ... | ${tg} | ${tg_if1_ip6} | ${dst_ip6} +| | ... | ${tg_if1} | ${tg_if1_mac} | ${dut1_if1_mac} +| | ... | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac} +| | ... | ${src_rloc4} | ${dst_rloc4} | ${ot_mode} + +*** Test Cases *** +| tc01-62B-ethip4lispgpe-ip6base-dev +| | [Tags] | 62B +| | frame_size=${62} | phy_cores=${0} diff --git a/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot b/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot new file mode 100644 index 0000000000..084f8c694a --- /dev/null +++ b/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot @@ -0,0 +1,84 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| ... +# Import configuration and test data: +| Variables | resources/test_data/lisp/lisp.py +| ... +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY +| ... | NIC_Virtual | IP6FWD | LISPGPE_IP4o6 +| ... +| Suite Setup | Setup suite single link | scapy +| Test Setup | Setup test +| Test Teardown | Tear down test | packet_trace +| ... +| Test Template | Local Template +| ... +| Documentation | *ip6-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular\ +| ... | topology with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISPGPE-IPv4-ICMPv4\ +| ... | on DUT1-TG, Eth-IPv4-ICMPv4 on TG-DUTn for IPv6 routing\ +| ... | over LISPoIPv6 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and TG(if2) are configured\ +| ... | with IPv6 routing and static routes. LISPoIPv6 tunnel is\ +| ... | configured between DUT1 and TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are\ +| ... | sent in TG->DUT(if1); On receive TG(if2) verifies packets for\ +| ... | correctness and their IPv4 src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${nic_name}= | virtual +| ${overhead}= | ${54} +| ${ot_mode}= | 4to6 +| ${is_gpe}= | ${1} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] On DUT1 configure LISP.\ +| | ... +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer. Type: integer +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | ... +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | ... +| | Set Test Variable | \${frame_size} +| | ... +| | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq} +| | And Add PCI devices to all DUTs +| | And Set Max Rate And Jumbo And Handle Multi Seg +| | And Apply startup configuration on all VPP DUTs | with_trace=${True} +| | When Configure topology for IPv4 LISPoIP6 testing +| | And Vpp All RA Suppress Link Layer | ${nodes} +| | And Configure LISP in 2-node circular topology +| | ... | ${dut1} | ${dut1_if2} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4o6_eid} +| | ... | ${dut1_ip4o6_static_adjacency} | ${is_gpe} +| | Then Send packet and verify LISPoTunnel encap +| | ... | ${tg} | ${tg_if1_ip4} | ${dst_ip4} +| | ... | ${tg_if1} | ${tg_if1_mac} | ${dut1_if1_mac} +| | ... | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac} +| | ... | ${src_rloc6} | ${dst_rloc6} | ${ot_mode} + +*** Test Cases *** +| tc01-46B-ethip6lispgpe-ip4base-dev +| | [Tags] | 46B +| | frame_size=${46} | phy_cores=${0} diff --git a/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-dev.robot b/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-dev.robot new file mode 100644 index 0000000000..e2b74c2730 --- /dev/null +++ b/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-dev.robot @@ -0,0 +1,83 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| ... +# Import configuration and test data: +| Variables | resources/test_data/lisp/lisp.py +| ... +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY +| ... | NIC_Virtual | IP6FWD | LISPGPE_IP6o6 +| ... +| Suite Setup | Setup suite single link | scapy +| Test Setup | Setup test +| Test Teardown | Tear down test | packet_trace +| ... +| Test Template | Local Template +| ... +| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node\ +| ... | circular topology with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISPGPE-IPv6-ICMPv6\ +| ... | on DUT1-TG, Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing\ +| ... | over LISPoIPv6 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and TG(if2) are configured\ +| ... | with IPv6 routing and static routes. LISPoIPv6 tunnel is\ +| ... | configured between DUT1 and TG. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ +| ... | are sent in TG->DUT(if1); On receive TG(if2) verifies\ +| ... | packets for correctness and their IPv6 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${nic_name}= | virtual +| ${overhead}= | ${54} +| ${is_gpe}= | ${1} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] On DUT1 configure LISP. +| | ... +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer. Type: integer +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | ... +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | ... +| | Set Test Variable | \${frame_size} +| | ... +| | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq} +| | And Add PCI devices to all DUTs +| | And Set Max Rate And Jumbo And Handle Multi Seg +| | And Apply startup configuration on all VPP DUTs | with_trace=${True} +| | When Configure topology for IPv6 LISP testing +| | And Configure LISP in 2-node circular topology +| | ... | ${dut1} | ${dut1_if2} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} +| | ... | ${dut1_to_tg_ip6_static_adjacency} | ${is_gpe} +| | Then Send packet and verify LISP GPE encap +| | ... | ${tg} | ${tg_if1_ip6} | ${dst_ip6} +| | ... | ${tg_if1} | ${tg_if1_mac} | ${dut1_if1_mac} +| | ... | ${tg_if2} | ${dut1_if2_mac} | ${tg_if2_mac} +| | ... | ${src_rloc6} | ${dst_rloc6} + +*** Test Cases *** +| tc01-62B-ethip6lispgpe-ip6base-dev +| | [Tags] | 62B +| | frame_size=${62} | phy_cores=${0} diff --git a/tests/vpp/func/ip4_tunnels/__init__.robot b/tests/vpp/func/ip4_tunnels/__init__.robot deleted file mode 100644 index 501a130d68..0000000000 --- a/tests/vpp/func/ip4_tunnels/__init__.robot +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-func.robot b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-func.robot deleted file mode 100644 index a2d1da3e52..0000000000 --- a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-func.robot +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_traffic.robot -| Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down functional test -| ... -| Documentation | *IP AFI independent functional tests.* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ -| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv4 tunnel is\ -| ... | configured between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr,\ -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg1] On DUT1 and DUT2 configure IPv4 LISP static adjacencies. -| | ... | [Ver1] Make TG send ICMPv4 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Cfg2] Disable LISP. -| | ... | [Ver2] Verify packets are not received via LISP tunnel. -| | ... | [Cfg3] Re-enable LISP. -| | ... | [Ver3] Verify packets are received again via LISP tunnel. -| | ... | [Ref] RFC6830. -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut1_to_dut2_ip4} | ${prefix4} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} -| | ... | ${dut1_to_tg_ip4} | ${prefix4} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${dut2_to_dut1_ip4} | ${prefix4} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_tg} -| | ... | ${dut2_to_tg_ip4} | ${prefix4} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | And VPP Add IP Neighbor -| | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} | ${tg_to_dut2_mac} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} | ${tg_to_dut1_mac} -| | When Configure LISP topology in 3-node circular topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | Then Send packet and verify headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | When Disable Lisp | ${dut1_node} -| | Then Packet transmission from port to port should fail -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Packet transmission from port to port should fail -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | When Enable Lisp | ${dut1_node} -| | And Vpp Add Lisp Adjacency | ${dut1_node} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['vni']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['deid']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['seid']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']} -| | And Vpp Add Lisp Adjacency | ${dut2_node} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['vni']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['deid']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['seid']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']} -| | Then Wait Until Keyword Succeeds | 2x | 5s | Send packet and verify headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Wait Until Keyword Succeeds | 2x | 5s | Send packet and verify headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} diff --git a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-func.robot b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-func.robot deleted file mode 100644 index adde88ab4f..0000000000 --- a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-func.robot +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.topology.Topology -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.VPPUtil -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot -| Resource | resources/libraries/robot/overlay/lispgpe.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down LISP functional test -| ... -| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ -| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ -| ... | DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ -| ... | both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | And Add IP Neighbors -| | When Configure LISP GPE topology in 3-node circular topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | Then Send packet and verify headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs. -| | ... -| | VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} | ${tg_to_dut1_mac} -| | VPP Add IP Neighbor -| | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} | ${tg_to_dut2_mac} -| | VPP Add IP Neighbor | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} | ${dut2_to_dut1_mac} -| | VPP Add IP Neighbor | ${dut2_node} -| | ... | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} | ${dut1_to_dut2_mac} diff --git a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-func.robot b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-func.robot deleted file mode 100644 index ce8b910854..0000000000 --- a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-func.robot +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.VPPUtil -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot -| Resource | resources/libraries/robot/l2/l2_traffic.robot -| Resource | resources/libraries/robot/overlay/lispgpe.robot -| Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down functional test -| ... -| Documentation | *LISP static adjacency test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ -| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ -| ... | routing and static routes. LISPoIPv4 tunnel is configured\ -| ... | between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv6 src-addr,\ -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] On DUT1 and DUT2 configure IPv4 LISP static adjacencies. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP tunnel between them; verify IPv6 headers on received\ -| | ... | packets are correct. -| | ... | [Cfg2] Reconf LISP. -| | ... | [Ver2] Verify packets are received again via LISP tunnel. -| | ... | [Ref] RFC6830. -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} -| | ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_tg} -| | ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} -| | And Add IP Neighbors -| | And Vpp All RA Suppress Link Layer | ${nodes} -| | When Configure LISP topology in 3-node circular topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} -| | ... | ${dut1_ip6o4_static_adjacency} | ${dut2_ip6o4_static_adjacency} -| | Then Send packet and verify headers -| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers -| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs. -| | ... -| | VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} | ${tg_to_dut1_mac} -| | VPP Add IP Neighbor -| | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} | ${tg_to_dut2_mac} -| | VPP Add IP Neighbor | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} | ${dut2_to_dut1_mac} -| | VPP Add IP Neighbor | ${dut2_node} -| | ... | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} | ${dut1_to_dut2_mac} diff --git a/tests/vpp/func/ip6_tunnels/__init__.robot b/tests/vpp/func/ip6_tunnels/__init__.robot deleted file mode 100644 index 501a130d68..0000000000 --- a/tests/vpp/func/ip6_tunnels/__init__.robot +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-func.robot b/tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-func.robot deleted file mode 100644 index 06aec5f09a..0000000000 --- a/tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-func.robot +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_traffic.robot -| Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down functional test -| ... -| Documentation | *LISP static adjacency test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv4-ICMPv4 on\ -| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv6\ -| ... | tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv6 tunnel is configured\ -| ... | between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr,\ -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISPoIPv6 tunnel -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] On DUT1 and DUT2 configure IPv6 LISP static adjacencies. -| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP tunnel between them; verify IPv4 headers on received\ -| | ... | packets are correct. -| | ... | [Cfg2] Reconf LISP. -| | ... | [Ver2] Verify packets are received again via LISP tunnel. -| | ... | [Ref] RFC6830. -| | ... -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut1_to_dut2_ip4o6} | ${dut_prefix4o6} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} -| | ... | ${dut1_to_tg_ip4o6} | ${tg_prefix4o6} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${dut2_to_dut1_ip4o6} | ${dut_prefix4o6} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_tg} -| | ... | ${dut2_to_tg_ip4o6} | ${tg_prefix4o6} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4o6} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4o6} -| | VPP Add IP Neighbor -| | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4o6} | ${tg_to_dut2_mac} -| | VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4o6} | ${tg_to_dut1_mac} -| | And Vpp All RA Suppress Link Layer | ${nodes} -| | When Configure LISP topology in 3-node circular topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4o6_eid} | ${dut2_ip4o6_eid} -| | ... | ${dut1_ip4o6_static_adjacency} | ${dut2_ip4o6_static_adjacency} -| | Then Send packet and verify headers -| | ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers -| | ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} diff --git a/tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-func.robot b/tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-func.robot deleted file mode 100644 index 6b6d2a3311..0000000000 --- a/tests/vpp/func/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip6base-func.robot +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.topology.Topology -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.VPPUtil -| ... -| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot -| Resource | resources/libraries/robot/overlay/lispgpe.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Run Keywords | Set up functional test -| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} -| ... -| Test Teardown | Tear down LISP functional test -| ... -| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ -| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv6 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ -| ... | routing and static routes. LISPoIPv6 tunnel is configured between\ -| ... | DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ -| ... | both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} -| | And VPP Interface Set IP Address -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Add IP Neighbors -| | And Vpp All RA Suppress Link Layer | ${nodes} -| | When Configure LISP GPE topology in 3-node circular topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | Then Send packet and verify headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs. -| | ... -| | VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} | ${tg_to_dut1_mac} -| | VPP Add IP Neighbor -| | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} | ${tg_to_dut2_mac} -| | VPP Add IP Neighbor | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} | ${dut2_to_dut1_mac} -| | VPP Add IP Neighbor | ${dut2_node} -| | ... | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} | ${dut1_to_dut2_mac} -- 2.16.6