diff options
author | Tibor Frank <tifrank@cisco.com> | 2017-06-20 13:57:08 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-06-29 12:17:28 +0000 |
commit | 6721e7f09aa95bff6622068332a3f56afad9c87b (patch) | |
tree | 37ef7f40e53f740a62830ab46142aa87342dc56b /tests/vpp/func/ip4_tunnels | |
parent | 859157b5db45927c7b4bb0b2d575e68805777a86 (diff) |
CSIT-687: Directory structure reorganization
Change-Id: I772c9e214be2461adf58124998d272e7d795220f
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Diffstat (limited to 'tests/vpp/func/ip4_tunnels')
15 files changed, 2329 insertions, 0 deletions
diff --git a/tests/vpp/func/ip4_tunnels/gre/eth2p-ethip4gre-ip4base-func.robot b/tests/vpp/func/ip4_tunnels/gre/eth2p-ethip4gre-ip4base-func.robot new file mode 100644 index 0000000000..a4e7dbbbb0 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/gre/eth2p-ethip4gre-ip4base-func.robot @@ -0,0 +1,306 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/overlay/gre.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +| Force Tags | VM_ENV | HW_ENV | 3_NODE_DOUBLE_LINK_TOPO | SKIP_VPP_PATCH +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *GREoIPv4 test cases* +| ... +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes; TG-DUT1-DUT2-TG 3-node circular topology with single +| ... | links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-GRE-IPv4-ICMPv4 on DUT1-DUT2, +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for routing over GRE tunnel; Eth-IPv4-ICMPv4 +| ... | on TG_if1-DUT, Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT for GREoIPv4 +| ... | encapsulation and decapsulation verification. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4 routing +| ... | and static routes. GREoIPv4 tunnel is configured between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are +| ... | sent in both directions by TG on links to DUT1 and DUT2; GREoIPv4 +| ... | encapsulation and decapsulation are verified separately by TG; on +| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC2784. + +*** Variables *** +| ${net1_address}= | 192.168.0.0 +| ${net1_host_address}= | 192.168.0.100 +| ${net1_gw_address}= | 192.168.0.1 +| ${net2_address}= | 192.168.2.0 +| ${net2_host_address}= | 192.168.2.100 +| ${net3_address}= | 192.168.3.0 +| ${net3_host_address}= | 192.168.3.100 +| ${net2_gw_address}= | 192.168.2.1 +| ${dut1_ip_address}= | 192.168.1.1 +| ${dut2_ip_address}= | 192.168.1.2 +| ${dut1_gre_ip}= | 172.16.0.1 +| ${dut2_gre_ip}= | 172.16.0.2 +| ${dut_tun0_ip1}= | 172.16.0.1 +| ${dut_tun0_ip2}= | 172.16.0.2 +| ${dut_tun1_ip1}= | 172.16.1.1 +| ${dut_tun1_ip2}= | 172.16.1.2 +| ${dut1_lo_address}= | 10.0.0.1 +| ${tun0_dst}= | 10.0.0.2 +| ${tun1_dst}= | 10.0.0.3 +| ${prefix}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 route over GREoIPv4 tunnel between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-GRE-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure GREoIPv4 tunnel with IPv4 routes towards each other. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across +| | ... | both DUTs and GRE tunnel between them; verify IPv4 headers on +| | ... | received packets are correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| | 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 Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${net1_gw_address} | ${prefix} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_ip_address} | ${prefix} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${net2_gw_address} | ${prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_ip_address} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_ip_address} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${net2_host_address} +| | ... | ${tg_to_dut2_mac} +| | ${dut1_gre_interface} | ${dut1_gre_index}= +| | ... | When Create GRE tunnel interface and set it up +| | ... | ${dut1_node} | ${dut1_ip_address} | ${dut2_ip_address} +| | ${dut2_gre_interface} | ${dut2_gre_index}= +| | ... | And Create GRE tunnel interface and set it up +| | ... | ${dut2_node} | ${dut2_ip_address} | ${dut1_ip_address} +| | And Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} +| | ... | ${dut2_node} | ${dut2_gre_index} | ${dut2_gre_ip} | ${prefix} +| | And Vpp Route Add | ${dut1_node} | ${net2_address} | ${prefix} +| | ... | ${dut2_gre_ip} | ${dut1_gre_index} +| | Then Send packet and verify headers | ${tg_node} +| | ... | ${net1_host_address} | ${net2_host_address} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} + +| TC02: DUT encapsulates IPv4 into GREoIPv4 tunnel - GRE header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure +| | ... | GREoIPv4 tunnel with IPv4 route towards TG. [Ver] Make TG send +| | ... | non-encapsulated ICMPv4 Echo Req to DUT; verify TG received +| | ... | GREoIPv4 encapsulated packet is correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | ${dut1_gre_interface} | ${dut1_gre_index}= +| | ... | When Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_ip_address} | ${dut2_ip_address} +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} +| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} +| | ... | ${dut2_gre_ip} | ${dut1_gre_index} +| | Then Send ICMPv4 and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${net1_host_address} | ${net2_host_address} +| | ... | ${dut1_ip_address} | ${dut2_ip_address} + +| TC03: DUT decapsulates IPv4 from GREoIPv4 tunnel - IPv4 header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure +| | ... | GREoIPv4 tunnel towards TG. [Ver] Make TG send ICMPv4 Echo Req +| | ... | encapsulated into GREoIPv4 towards VPP; verify TG received IPv4 +| | ... | de-encapsulated packet is correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${net1_host_address} +| | ... | ${tg_to_dut_if1_mac} +| | ${dut1_gre_interface} | ${dut1_gre_index}= +| | ... | When Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_ip_address} | ${dut2_ip_address} +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} +| | Then Send GRE and check received ICMPv4 header +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} +| | ... | ${net2_host_address} | ${net1_host_address} +| | ... | ${dut2_ip_address} | ${dut1_ip_address} + +| TC04: DUT encapsulates IPv4 into GREoIPv4 different tunnels - GRE header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two +| | ... | GRE tunnels with loopback's source address. Destination address of +| | ... | tunnels are routed via next hop address of DUT's to TG if2, where +| | ... | should be only GRE encapsulated packets. Each tunnel has IPv4 address +| | ... | and configured prefix routed through the tunnel. [Ver] Make TG send +| | ... | non-encapsulated ICMPv4 Echo Req to DUT; verify TG received GREoIPv4 +| | ... | encapsulated packet is correct for each tunnel. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} +| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | ${dut1_gre0_interface} | ${dut1_gre0_index}= +| | ... | When Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} +| | ${dut1_gre1_interface} | ${dut1_gre1_index}= +| | ... | And Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} +| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} +| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} +| | ... | ${dut_tun0_ip2} | ${dut1_gre0_index} +| | And Vpp Route Add | ${dut_node} | ${net3_address} | ${prefix} +| | ... | ${dut_tun1_ip2} | ${dut1_gre1_index} +| | Then Send ICMPv4 and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${net1_host_address} | ${net2_host_address} +| | ... | ${dut1_lo_address} | ${tun0_dst} +| | And Send ICMPv4 and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${net1_host_address} | ${net3_host_address} +| | ... | ${dut1_lo_address} | ${tun1_dst} + +| TC05: DUT re-encapsulates IPv4 GRE into other GRE tunnel - GRE header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two +| | ... | GRE tunnels with loopback's source address. Destination address of +| | ... | tunnels are routed via next hop address of DUT's to TG if2, where +| | ... | should be only GRE encapsulated packets. Each tunnel has IPv4 address +| | ... | and configured prefix routed through the tunnel. [Ver] Make TG send +| | ... | encapsulated IPv4 UDP to DUT; Encapsulated IP source is behind +| | ... | configured tunnel same as destination; verify TG received GREoIPv4 +| | ... | encapsulated packet is correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} +| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | ${dut1_gre0_interface} | ${dut1_gre0_index}= +| | ... | When Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} +| | ${dut1_gre1_interface} | ${dut1_gre1_index}= +| | ... | And Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} +| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} +| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} +| | ... | ${dut_tun0_ip2} | ${dut1_gre0_index} +| | And Vpp Route Add | ${dut_node} | ${net3_address} | ${prefix} +| | ... | ${dut_tun1_ip2} | ${dut1_gre1_index} +| | Then Send GRE and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${dut1_lo_address} | ${tun0_dst} +| | ... | ${net3_host_address} | ${net2_host_address} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${tun1_dst} | ${dut1_lo_address} + +| TC06: DUT do not process GRE with wrong tunnel destination IP +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two +| | ... | GRE tunnels with loopback's source address. Destination address of +| | ... | tunnels are routed via next hop address of DUT's to TG if2, where +| | ... | should be only GRE encapsulated packets. On DUT's to TG if1 interface +| | ... | is configured test destination host MAC address. [Ver] Make TG send +| | ... | GRE encapsulated ICMPv4 Echo Req to DUT; verify TG received +| | ... | de-capsulated packet is correct, then send packet with wrong tunnel +| | ... | destination address. [Ref] RFC2784. +| | ... | +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} +| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${net1_host_address} +| | ... | ${tg_to_dut_if1_mac} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | ${dut1_gre0_interface} | ${dut1_gre0_index}= +| | ... | When Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} +| | ${dut1_gre1_interface} | ${dut1_gre1_index}= +| | ... | And Create GRE tunnel interface and set it up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} +| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} +| | Then Send GRE and check received ICMPv4 header +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} +| | ... | ${net2_host_address} | ${net1_host_address} +| | ... | ${tun0_dst} | ${dut1_lo_address} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send GRE and check received ICMPv4 header | +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} +| | ... | ${net2_host_address} | ${net1_host_address} +| | ... | ${tun0_dst} | ${dut1_ip_address} diff --git a/tests/vpp/func/ip4_tunnels/lisp/api-crud-lisp-func.robot b/tests/vpp/func/ip4_tunnels/lisp/api-crud-lisp-func.robot new file mode 100644 index 0000000000..118d657515 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/api-crud-lisp-func.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2016 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.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.LispUtil +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/interfaces.robot +| Resource | resources/libraries/robot/overlay/lisp_api.robot +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/api/lisp_api_resources.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 | *API test cases* +| ... +| ... | *[Top] Network Topologies:* DUT1 1-node topology. +| ... | *[Enc] Packet Encapsulations:* None. +| ... | *[Cfg] DUT configuration:* DUT1 gets configured with all LISP +| ... | parameters. +| ... | *[Ver] Verification:* DUT1 operational data gets verified following +| ... | configuration. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| ${locator_set_num}= | 3 + +*** Test Cases *** + +| TC01: DUT can enable and disable LISP +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP enable/disable API; On \ +| | ... | DUT1 enable LISP. [Ver1] Check DUT1 if LISP is enabled. [Cfg2] +| | ... | Then disable LISP. [Ver2] Check DUT1 if LISP is disabled. [Ref] +| | ... | RFC6830. +| | When Enable LISP | ${nodes['DUT1']} +| | Then LISP should be enabled | ${nodes['DUT1']} | ${lisp_status} +| | When Disable LISP | ${nodes['DUT1']} +| | Then LISP Should be disabled | ${nodes['DUT1']} | ${lisp_status} + +| TC02: DUT can add and delete locator_set +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \ +| | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1 +| | ... | configured locator_set and locator are correct. [Cfg2] Then +| | ... | remove locator_set and locator. [Ver2] check DUT1 locator_set +| | ... | and locator are removed. [Ref] RFC6830. +| | Given Generate LISP locator_set data +| | ... | ${nodes['DUT1']} | ${locator_set_num} +| | And Enable LISP | ${nodes['DUT1']} +| | When Configure LISP locator_set data | ${nodes['DUT1']} +| | Then LISP locator_set shpuld be configured correctly | ${nodes['DUT1']} +| | When Delete all LISP locator_set from VPP | ${nodes['DUT1']} +| | Then LISP locator_set should be unset | ${nodes['DUT1']} + +| TC03: DUT can add, reset and delete locator_set +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \ +| | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1 +| | ... | locator_set and locator are correct. [Cfg2] Then reset +| | ... | locator_set and set it again. [Ver2] Check DUT1 locator_set and +| | ... | locator are correct. [Cfg3] Then remove locator_set and locator. +| | ... | [Ver3] Check DUT1 all locator_set and locators are removed. +| | ... | [Ref] RFC6830. +| | Given Lisp locator_set data use for test reset locator_set are prepared +| | ... | ${nodes['DUT1']} | ${locator_set_num} +| | And Enable LISP | ${nodes['DUT1']} +| | When Configure LISP locator_set data | ${nodes['DUT1']} +| | Then LISP locator_set shpuld be configured correctly | ${nodes['DUT1']} +| | When Delete all LISP locator_set from VPP | ${nodes['DUT1']} +| | Then LISP locator_set should be unset | ${nodes['DUT1']} + +| TC04: DUT can add and delete eid address +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP eid API; on DUT1 \ +| | ... | configure LISP eid IP address. [Ver1] Check DUT1 configured data +| | ... | is correct. [Cfg2] Remove configured data. [Ver2] Check DUT1 all +| | ... | eid IP addresses are removed. [Ref] RFC6830. +| | Given Enable LISP | ${nodes['DUT1']} +| | When Configure LISP eid address | ${nodes['DUT1']} | ${eid_table} +| | Then LISP eid address should be set correctly to eid table +| | ... | ${nodes['DUT1']} | ${eid_table_vat} +| | When Delete all LISP eid address from VPP | ${nodes['DUT1']} | ${eid_table} +| | Then LISP eid table should be empty | ${nodes['DUT1']} + +| TC05: DUT can add and delete LISP map resolver address +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP map resolver address \ +| | ... | API; on DUT1 configure LISP map resolver address. [Ver1] Check +| | ... | DUT1 configured data is correct. [Cfg2] Remove configured data. +| | ... | [Ver2] Check DUT1 all map resolver addresses are removed. [Ref] +| | ... | RFC6830. +| | Given Enable LISP | ${nodes['DUT1']} +| | When Configure LISP map resolver address | ${nodes['DUT1']} | ${map_resolver} +| | Then LISP map resolver address should be configured correctly +| | ... | ${nodes['DUT1']} | ${map_resolver} +| | When Delete all LISP map resolver address from VPP +| | ... | ${nodes['DUT1']} | ${map_resolver} +| | Then LISP map resolver address should be empty | ${nodes['DUT1']} 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 new file mode 100644 index 0000000000..ae9485c3b8 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-ip4base-func.robot @@ -0,0 +1,124 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +# 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 Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} +| | ... | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${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 Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${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-ethip4lisp-l2bdbasemaclrn-func.robot b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..98602fc45f --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lisp-l2bdbasemaclrn-func.robot @@ -0,0 +1,95 @@ +# Copyright (c) 2016 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.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.L2Util +| Resource | resources/libraries/robot/shared/traffic.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/ip/ip4.robot +| Resource | resources/libraries/robot/overlay/l2lisp.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/l2/l2_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Set up functional test +| ... +| Test Teardown | Tear down 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-ICMPv4-LISPGpe-IP4 +| ... | *[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: Route IPv4 packet through LISP with Bridge Domain setup. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4-LISPGpe-IP4 +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. Also\ +| | ... | configure BD and assign it to LISP VNI. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP tunnel between them; verify IPv4, Ether 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 Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} +| | When Create L2 BD | ${dut1_node} | ${vpp_bd_id} +| | And Add Interface To L2 BD | ${dut1_node} | ${dut1_to_tg} | ${vpp_bd_id} +| | And Create L2 BD | ${dut2_node} | ${vpp_bd_id} +| | And Add Interface To L2 BD | ${dut2_node} | ${dut2_to_tg} | ${vpp_bd_id} +| | And Configure L2 LISP on DUT | ${dut1_node} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${lisp_dut_settings} +| | And Configure L2 LISP on DUT | ${dut2_node} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${lisp_dut_settings} +| | Then Send packet and verify headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_if1_mac} | ${tg_if2_mac} +| | ... | ${tg_to_dut2} | ${tg_if1_mac} | ${tg_if2_mac} +| | And Send packet and verify headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_if2_mac} | ${tg_if1_mac} +| | ... | ${tg_to_dut1} | ${tg_if2_mac} | ${tg_if1_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 new file mode 100644 index 0000000000..90a0ae1599 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4base-func.robot @@ -0,0 +1,104 @@ +# Copyright (c) 2016 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.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.VhostUser +| Resource | resources/libraries/robot/shared/traffic.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/ip/ip4.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/vm/qemu.robot +| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot +| Resource | resources/libraries/robot/overlay/lispgpe.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 Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${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. +| | ... +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | 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-ip4basevrf-func.robot b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot new file mode 100644 index 0000000000..f41be5fecc --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot @@ -0,0 +1,109 @@ +# Copyright (c) 2016 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.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.VhostUser +| Resource | resources/libraries/robot/shared/traffic.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/ip/ip4.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/vm/qemu.robot +| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot +| Resource | resources/libraries/robot/overlay/lispgpe.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 and VRF is enabled +| | [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 - vrf, 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 Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} +| | And Add IP Neighbors +| | And Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | 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} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | 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. +| | ... +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | 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 new file mode 100644 index 0000000000..7e97aca29e --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-func.robot @@ -0,0 +1,120 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Resource | resources/libraries/robot/overlay/lispgpe.robot +| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot +| Resource | resources/libraries/robot/vm/qemu.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.VPPUtil +# 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 Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4} +| | ... | ${dut1_node} | ${dut1_to_tg} +| | ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4} +| | ... | ${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} +| | When Change LISP Configuration | ${dut1_node} | ${dut2_node} +| | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac} +| | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut2_to_dut1_ip6o4_reconf} | ${dut_prefix6o4} +| | ... | ${dut1_ip6o4_static_adjacency} +| | ... | ${dut1_ip6o4_static_adjacency_reconf} +| | 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. +| | ... +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} +| | ... | ${tg_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot new file mode 100644 index 0000000000..668e870ff0 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot @@ -0,0 +1,110 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Resource | resources/libraries/robot/overlay/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Resource | resources/libraries/robot/overlay/lispgpe.robot +| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot +| Resource | resources/libraries/robot/vm/qemu.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.VPPUtil +# 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 LISP 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 LISP GPE tunnel using physical interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-lispgpe-ip4 - vrf, phy2lisp +| | ... | Make TG send ICMPv4 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 Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ip6=${TRUE} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ip6=${TRUE} +| | And Add IP Neighbors +| | And Configure IP addresses on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut_prefix6o4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} +| | 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_ip6o4_eid} | ${dut2_ip6o4_eid} +| | ... | ${dut1_ip6o4_static_adjacency} +| | ... | ${dut2_ip6o4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | 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. +| | ... +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} +| | ... | ${tg_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot b/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot new file mode 100644 index 0000000000..378accb922 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot @@ -0,0 +1,209 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/ip/ip6.robot +| Resource | resources/libraries/robot/ip/map.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *Lightweight 4 over 6 test cases* +| ... +| ... | LW4o6 is a subset of MAP-E, with per-subscriber rules. It uses the +| ... | same tunneling mechanism and configuration as MAP-E. It does not use +| ... | embedded address bits. +| ... +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG_if1-DUT, +| ... | Eth-IPv6-IPv4-UDP on TG_if2_DUT. +| ... | *[Cfg] DUT configuration:* DUT1 is configured as lwAFTR. +| ... | *[Ver] TG verification:* Test UDP ICMP Echo Request in IPv4 are +| ... | sent to lwAFTR and are verified by TG for correctness their +| ... | encapsulation in IPv6 src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7596 RFC7597. + +*** Variables *** +| ${dut_ip4}= | 10.0.0.1 +| ${dut_ip6}= | 2001:0::1 +| ${tg_ip6}= | 2001:0::2 +| ${ipv4_prefix_len}= | 24 +| ${ipv6_prefix_len}= | 64 + +| ${lw_ipv4_pfx}= | 20.0.0.1/32 +| ${lw_ipv6_pfx}= | 2001:1::/64 +| ${lw_ipv6_src}= | 2001:1::1 +| ${lw_psid_length}= | ${8} +| ${lw_psid_offset}= | ${6} +| ${lw_rule_psid}= | ${52} +| ${lw_rule_ipv6_dst}= | 2001:1::2 +| ${lw_rule_2_psid}= | ${22} +| ${lw_rule_2_ipv6_dst}= | 2001:1::3 +| ${test_ipv4_inside}= | 20.0.0.1 +| ${test_ipv4_outside}= | 10.0.0.100 +# test_port depends on psid, length, offset +| ${test_port}= | ${1232} +| ${test_icmp_id}= | ${1232} +| ${test_2_port}= | ${6232} + +*** Test Cases *** +| TC01: Encapsulate IPv4 into IPv6. IPv6 dst depends on IPv4 and UDP destination +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv4-UDP on TG_if1-DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. +| | ... | [Cfg] On DUT1 configure Map domain and Map rule. +| | ... | [Ver] Make TG send non-encapsulated UDP to DUT; verify TG received +| | ... | IPv4oIPv6 encapsulated packet is correct. +| | ... | [Ref] RFC7596 RFC7597 +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add IP Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add +| | ... | ${dut_node} | ${lw_rule_ipv6_dst} | 128 +| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | Then Send IPv4 UDP and check headers for lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${test_ipv4_inside} | ${test_ipv4_outside} +| | ... | ${test_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${lw_rule_ipv6_dst} | ${lw_ipv6_src} + +TC02: Encapsulate IPv4 ICMP into IPv6. IPv6 dst depends on IPv4 addr and ICMP ID +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP +| | ... | on TG_if2_DUT. +| | ... | [Cfg] On DUT1 configure Map domain and Map rule. +| | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received +| | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 +| | ... | destination based on ICMP Identifier field. +| | ... | [Ref] RFC7596 section 8.1 +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add IP Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add +| | ... | ${dut_node} | ${lw_rule_ipv6_dst} | 128 +| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | Then Send IPv4 ICMP and check headers for lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${test_ipv4_inside} | ${test_ipv4_outside} +| | ... | ${test_icmp_id} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${lw_rule_ipv6_dst} | ${lw_ipv6_src} + +TC03: Decapsulate IPv4 UDP from IPv6. +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv4-UDP on TG_if1-DUT. +| | ... | [Cfg] On DUT1 configure Map domain and Map rule. +| | ... | [Ver] Make TG send encapsulated UDP to DUT; verify TG received +| | ... | IPv4 non-encapsulated packet is correct. +| | ... | [Ref] RFC7596 RFC7597 +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add Arp on DUT +| | ... | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${test_ipv4_outside} +| | ... | ${tg_to_dut_if1_mac} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | Then Send IPv4 UDP in IPv6 and check headers for lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${lw_ipv6_src} | ${lw_rule_ipv6_dst} +| | ... | ${test_ipv4_outside} | ${test_ipv4_inside} | ${test_port} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} + +TC04: Hairpinning of traffic between two lwB4 +| | [Documentation] +| | ... | [Top] DUT1-TG. +| | ... | [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. +| | ... | [Cfg] On DUT1 configure Map domain and two Map rules. +| | ... | [Ver] Make TG send encapsulated UDP to DUT; verify TG received +| | ... | encapsulated packet is correct. +| | ... | [Ref] RFC7596 RFC7597 +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add IP Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add +| | ... | ${dut_node} | ${lw_rule_2_ipv6_dst} | 128 +| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_2_psid} +| | ... | ${lw_rule_2_ipv6_dst} +| | Then Send IPv4 UDP in IPv6 and check headers for lightweight hairpinning +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if2_mac} +| | ... | ${lw_ipv6_src} | ${lw_rule_ipv6_dst} +| | ... | ${test_ipv4_inside} | ${test_ipv4_inside} +| | ... | ${test_2_port} | ${test_port} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${lw_rule_2_ipv6_dst} | ${lw_ipv6_src} diff --git a/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot b/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot new file mode 100644 index 0000000000..95e61db654 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot @@ -0,0 +1,483 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/ip/ip6.robot +| Resource | resources/libraries/robot/ip/map.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +| Variables | resources/test_data/softwire/map_e_domains.py | ${5} +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | SKIP_VPP_PATCH +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *Test for Basic mapping rule for MAP-E*\ +| ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the +| ... | nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1. +| ... | Eth-IPv6-IPv4-UDP on TG-to-DUT-if2. +| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG +| ... | interface and IPv6 address on second DUT-to-TG interface. MAP-E domain +| ... | is configured in test template based on test parameters. +| ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to +| ... | destination in MAP domain. IPv6 packets with encapsulated IPv4 are +| ... | received on TG interface. +| ... | *[Ref] Applicable standard specifications:* RFC7597. + + +*** Variables *** +| ${dut_ip4}= | 10.0.0.1 +| ${dut_ip6}= | 2001:0::1 +| ${dut_ip4_gw}= | 10.0.0.2 +| ${dut_ip6_gw}= | 2001:0::2 +| ${ipv4_prefix_len}= | 24 +| ${ipv6_prefix_len}= | 64 +| ${ipv6_br_src}= | 2001:db8:ffff::1 +| ${ipv4_outside}= | 1.0.0.1 + + +*** Test Cases *** +| TC01: BMR, then an IPv4 prefix is assigned +| | [Documentation] +| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ +| | ... | IPv4 prefix length + ea bits length < 32 (o + r < 32) +| | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32 +| | ... +| | ... | Arguments: +| | ... +| | ... | - ipv4_pfx +| | ... | - ipv6_pfx +| | ... | - ipv6_src +| | ... | - ea_bit_len +| | ... | - psid_offset +| | ... | - psid_len +| | ... | - ipv4_dst +| | ... | - dst_port +| | ... | - expected_ipv6_dst +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Set up functional test | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |=================|===============|================|============|=============|==========|================|==========|==================================| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | +# |=================|===============|================|============|=============|==========|================|==========|==================================| +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a000::14a0:0:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a900::14a9:0:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c0::14a9:c000:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9::14a9:c900:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:d000:0:14a9:c9d0:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${23} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:da00:0:14a9:c9da:0 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:d000::14a9:c9d0:0 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${7} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:da00::14a9:c9da:0 | + + +| TC02: BMR, full IPv4 address is to be assigned +| | [Documentation] +| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ +| | ... | IPv4 prefix length + ea bits length == 32 (o + r == 32) +| | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32 +| | ... +| | ... | Arguments: +| | ... +| | ... | - ipv4_pfx +| | ... | - ipv6_pfx +| | ... | - ipv6_src +| | ... | - ea_bit_len +| | ... | - psid_offset +| | ... | - psid_len +| | ... | - ipv4_dst +| | ... | - dst_port +| | ... | - expected_ipv6_dst +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Set up functional test | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|===============|================|============|=============|==========|================|==========|==================================| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | +# |===================|===============|================|============|=============|==========|================|==========|==================================| +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:db00:0:14a9:c9db:0 | +| | 20.160.0.0/12 | 2001:db8::/32 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:9c9d:b000:0:14a9:c9db:0 | +| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:c9db::14a9:c9db:0 | +| | 20.169.200.0/22 | 2001:db8::/32 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:76c0::14a9:c9db:0 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:db00::14a9:c9db:0 | +| | 20.169.201.208/28 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:b000::14a9:c9db:0 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8::14a9:c9db:0 | +| | 20.0.0.0/8 | 2001:db8::/40 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9:c9db:0:14a9:c9db:0 | +| | 20.160.0.0/12 | 2001:db8::/44 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:9:c9db:0:14a9:c9db:0 | +| | 20.169.0.0/16 | 2001:db8::/48 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:0:c9db:0:14a9:c9db:0 | +| | 20.169.200.0/22 | 2001:db8::/54 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:0:1db:0:14a9:c9db:0 | + + +| TC03: BMR, shared IPv4 address is to be assigned +| | [Documentation] +| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ +| | ... | IPv4 prefix length + ea bits length > 32 (o + r > 32) +| | ... | ip6_prefix < 64, ip4_prefix <= 32 +| | ... +| | ... | Arguments: +| | ... +| | ... | - ipv4_pfx +| | ... | - ipv6_pfx +| | ... | - ipv6_src +| | ... | - ea_bit_len +| | ... | - psid_offset +| | ... | - psid_len +| | ... | - ipv4_dst +| | ... | - dst_port +| | ... | - expected_ipv6_dst +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Set up functional test | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|===============|================|============|=============|==========|================|==========|===================================| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | +# |===================|===============|================|============|=============|==========|================|==========|===================================| +| | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:3400::14a9:c9db:34 | + +| | 20.0.0.0/8 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:a9:c9db:3400:0:14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9:db34::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db:3400::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:34::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:3400::14a9:c9db:34 | + +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:db34:0:14a9:c9db:34 | +| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:c9db:3400:0:14a9:c9db:34 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/24 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9:db34::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/24 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db:3400::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/16 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db34::14a9:c9db:34 | + +| | 20.160.0.0/12 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${5} | 20.169.201.219 | ${1232} | 2001:db8:9c9d:b300:0:14a9:c9db:6 | +| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:c9db:3400:0:14a9:c9db:34 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | + +| | 20.169.192.0/20 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${5} | 20.169.201.219 | ${1232} | 2001:db8:9db3::14a9:c9db:6 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | + +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${12} | ${6} | ${4} | 20.169.201.219 | ${1232} | 2001:db8:db30::14a9:c9db:3 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${12} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | + + +| TC04: End user IPv6 prefix is 64 +| | [Documentation] +| | ... | Supported End-User IPv6 prefix length is 64 bit. +| | ... +| | ... | Arguments: +| | ... +| | ... | - ipv4_pfx +| | ... | - ipv6_pfx +| | ... | - ipv6_src +| | ... | - ea_bit_len +| | ... | - psid_offset +| | ... | - psid_len +| | ... | - ipv4_dst +| | ... | - dst_port +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Set up functional test | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|=========================|================|============|=============|==========|================|==========| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | +# |===================|=========================|================|============|=============|==========|================|==========| +| | 20.0.0.0/8 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 20.169.201.208/28 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8} | ${5} | ${4} | 20.169.201.219 | ${3280} | +| | 20.0.0.0/8 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 20.169.201.219/32 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | + + +| TC05: IPv4 prefix is 0 +| | [Tags] | EXPECTED_FAILING +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Set up functional test | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|=========================|================|============|=============|==========|================|==========| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | +# |===================|=========================|================|============|=============|==========|================|==========| +| | 0.0.0.0/0 | 2001:db8:0000::/40 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001:db8:0000::/40 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001:d00::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | + + +| TC06: Multiple domain and check with traffic script IPv4 source IPv6 destination +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ +| | ... | file. +| | ... | [Ver] Send IPv4 to destination in configured domain and receive IPv6\ +| | ... | packet. +| | ... | [Ref] RFC7597. +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | :FOR | ${domain_set} | IN | @{domain_sets} +| | | When Map Add Domain | ${dut_node} | @{domain_set} +| | :FOR | ${ip_set} | IN | @{ip_sets} +| | | ${ipv4}= | Get From List | ${ip_set} | 0 +| | | ${ipv6}= | Get From List | ${ip_set} | 1 +| | | ${port}= | Get From List | ${ip_set} | 2 +| | | ${ipv6_br}= | Get From List | ${ip_set} | 3 +| | | Then Send IPv4 UDP And Check Headers For Lightweight 4over6 +| | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | | ... | ${dut_to_tg_if1_mac} | ${ipv4} | ${ipv4_outside} | ${port} +| | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${ipv6} | ${ipv6_br} +| | | And Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6 +| | | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} | ${ipv6_br} | ${ipv6} +| | | ... | ${ipv4_outside} | ${ipv4} | ${port} | ${tg_to_dut_if1_mac} +| | | ... | ${dut_to_tg_if1_mac} + + +| TC07: Multiple domain and check with traffic script IPv6 source IPv6 destination +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ +| | ... | file. +| | ... | [Ver] Send IPv4 encapsulated in IPv6. Source and destination are from\ +| | ... | configured domains. Check if VPP translate IPv6 addresses. +| | ... | [Ref] RFC7597. +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | :FOR | ${domain_set} | IN | @{domain_sets} +| | | When Map Add Domain | ${dut_node} | @{domain_set} +| | ${ip_set_A}= | Get From List | ${ip_sets} | 0 +| | ${ip_set_B}= | Get From List | ${ip_sets} | 1 +| | ${ipv6_br}= | Get From List | ${ip_set_A} | 3 +| | ${port_A}= | Get From List | ${ip_set_A} | 2 +| | ${port_B}= | Get From List | ${ip_set_B} | 2 +| | ${ipv6_A}= | Get From List | ${ip_set_A} | 1 +| | ${ipv6_B}= | Get From List | ${ip_set_B} | 1 +| | ${ipv4_A}= | Get From List | ${ip_set_A} | 0 +| | ${ipv4_B}= | Get From List | ${ip_set_B} | 0 +| | Then Send IPv4 UDP In IPv6 And Check Headers For Lightweight Hairpinning +| | ... | ${tg_node} | ${tg_to_dut_if2} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_br} | ${ipv6_A} +| | ... | ${ipv4_B} | ${ipv4_A} +| | ... | ${port_B} | ${port_A} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_B} | ${ipv6_br} + + +| TC08: Encapsulate IPv4 ICMP into IPv6 +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP\ +| | ... | on TG_if2_DUT. +| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ +| | ... | file. +| | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received\ +| | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 destination\ +| | ... | based on ICMP Identifier field. +| | ... | [Ref] RFC7597 section 8.2. +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | :FOR | ${domain_set} | IN | @{domain_sets} +| | | When Map Add Domain | ${dut_node} | @{domain_set} +| | ${ip_set_A}= | Get From List | ${ip_sets} | 0 +| | ${ipv4_A}= | Get From List | ${ip_set_A} | 0 +| | ${ipv6_A}= | Get From List | ${ip_set_A} | 1 +| | ${icmp_id_A}= | Get From List | ${ip_set_A} | 2 +| | ${ipv6_br}= | Get From List | ${ip_set_A} | 3 +| | Then Send IPv4 ICMP And Check Headers For Lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${ipv4_A} | ${ipv4_outside} +| | ... | ${icmp_id_A} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_A} | ${ipv6_br} + + +| TC09: Repeated ip neighbor command doesnt put FIB to broken state +| | [Documentation] | +| | ... | Original issue described in https://jira.fd.io/browse/VPP-312. +| | ... | [Top] TG=DUT1. +| | ... | [Cfg] IP address are set on interfaces, ip neighbor multiple times +| | ... | [Ver] FIB is not in broken state. The steps are add route, \ +| | ... | check with traffic then add same route +| | ... | again and check with traffic script. +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | When Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | Then Check MAP Configuration With Traffic Script +| | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} +| | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 +| | When Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | Then Check MAP Configuration With Traffic Script +| | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} +| | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 + + +| Bug: VPP-318 +| | [Tags] | EXPECTED_FAILING +| | [Documentation] | qlen < psid length +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Set interfaces in 2-node circular topology up +| | And Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | Then Run Keyword And Expect Error | Unable to add map domain * +| | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32 +| | ... | ${ipv6_br_src} | ${20} | ${6} | ${8} + + +*** Keywords *** +| Set Interfaces IP Addresses And Routes +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Set interfaces in 2-node circular topology up +| | Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2} +| | ... | resolve_attempts=${NONE} | count=${NONE} +| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | Vpp Route Add | ${dut_node} | ${ipv4_outside} | 32 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} + +| Check MAP Configuration With Traffic Script +| | [Documentation] +| | ... | Used as a test case template.\ +| | ... | Configure MAP-E domain with given parameters, with traffic script send +| | ... | UDP in IPv4 packet to given UDP destination port and IP destination +| | ... | address and check if correctly received IPv6 packet. Vice versa send +| | ... | IPv6 packet and check if received IPv4 packet with correct source +| | ... | address. +| | ... | The MAP domain is deleted in teardown. +| | ... | The expected IPv6 address is compared with computed IPv6 address. +| | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len} +| | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port} +| | ... | ${expected_ipv6_dst}=${EMPTY} +| | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx} +| | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len} +| | ${computed_ipv6_dst}= | Compute IPv6 Map Destination Address +| | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset} +| | ... | ${psid_len} | ${ipv4_dst} | ${dst_port} +| | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}" +| | ... | Set Variable | ${computed_ipv6_dst} +| | ... | ELSE | Set Variable | ${expected_ipv6_dst} +| | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}" +| | ... | IP Addresses Should Be Equal +| | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst} +| | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst} +| | Check Encapsulation With Traffic Script +| | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} +| | Check Decapsulation With Traffic Script +| | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port} +| | [Teardown] | Run Keywords +| | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND +| | ... | Show Packet Trace On All DUTs | ${nodes} | AND +| | ... | Clear Packet Trace On All DUTs | ${nodes} | AND +| | ... | Verify VPP PID in Teardown + +| Check Encapsulation With Traffic Script +| | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} +| | Send IPv4 UDP And Check Headers For Lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside} +| | ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_dst} | ${ipv6_br_src} + +| Check Decapsulation With Traffic Script +| | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port} +| | Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${ipv6_br_src} | ${ipv6_ce_addr} +| | ... | ${ipv4_outside} | ${ipv4_inside} | ${port} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} diff --git a/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot b/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot new file mode 100644 index 0000000000..89ff28af38 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot @@ -0,0 +1,135 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/ip/ip6.robot +| Resource | resources/libraries/robot/ip/map.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Run Keywords | Set up functional test +| ... | AND | Set interfaces IP addresses and routes +| Test Teardown | Tear down functional test +| Documentation | *Test for Basic mapping rule for MAP-T*\ +| ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the +| ... | nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1. +| ... | Eth-IPv6-UDP on TG-to-DUT-if2. +| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG +| ... | interface and IPv6 address on second DUT-to-TG interface. MAP-T domain +| ... | is configured in test template based on test parameters. +| ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to +| ... | destination in MAP domain. IPv6 packets with translated IPv4 addresses +| ... | are received on TG interface. +| ... | *[Ref] Applicable standard specifications:* RFC7599 + + +*** Variables *** +| ${dut_ip4}= | 10.0.0.1 +| ${dut_ip6}= | 2001:0::1 +| ${dut_ip4_gw}= | 10.0.0.2 +| ${dut_ip6_gw}= | 2001:0::2 +| ${ipv4_prefix_len}= | 24 +| ${ipv6_prefix_len}= | 64 +| ${ipv6_br_src}= | 2001:db8:ffff::/96 + + +*** Test Cases *** +| TC01: MAP-T test +| | [Documentation] | +| | ... | Test to check map-t address translation. +| | ... +| | ... | Arguments: +| | ... +| | ... | - ipv4_pfx +| | ... | - ipv6_dst_pfx +| | ... | - ipv6_src_pfx +| | ... | - ea_bit_len +| | ... | - psid_offset +| | ... | - psid_len +| | ... | - ipv4_src +| | ... | - ipv4_dst +| | ... | - dst_port +| | ... +| | [Template] | Check MAP-T configuration with traffic script +# |===================|===============|================|============|=============|==========|===========|================|==========| +# | ipv4_pfx | ipv6_dst_pfx | ipv6_src_pfx | ea_bit_len | psid_offset | psid_len | ipv4_src | ipv4_dst | dst_port | +# |===================|===============|================|============|=============|==========|===========|================|==========| +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${40} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | +| | 20.0.0.0/8 | 2001:db8::/40 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | +#| | 20.169.201.0/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${6} | ${8} | 100.0.0.1 | 20.169.201.219 | ${1232} | +#| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${6} | ${8} | 100.0.0.1 | 20.169.201.219 | ${1232} | + + +*** Keywords *** +| Set interfaces IP addresses and routes +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Set interfaces in 2-node circular topology up +| | Configure IP addresses on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2} +| | ... | resolve_attempts=${NONE} | count=${NONE} +| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} | ${dut_to_tg_if1} +| | ... | resolve_attempts=${NONE} | count=${NONE} +| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} + +| Check MAP-T configuration with traffic script +| | [Documentation] | +| | ... | Used as a test case template.\ +| | ... | Configure MAP-T domain with given parameters, with traffic script send +| | ... | UDP in IPv4 packet to given UDP destination port and IP destination +| | ... | address and check if correctly received IPv6 packet with translated +| | ... | source and destination addresses. Vice versa send IPv6 packet and +| | ... | check if received IPv4 packet with correct source and destination +| | ... | addresses. +| | ... | The MAP domain is deleted in teardown. +| | [Arguments] | ${ipv4_pfx} | ${ipv6_dst_pfx} | ${ipv6_src_pfx} +| | ... | ${ea_bit_len} | ${psid_offset} | ${psid_len} +| | ... | ${ipv4_outside} | ${ipv4_inside} | ${dst_port} +| | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} +| | ... | ${ipv6_dst_pfx} | ${ipv6_src_pfx} | ${ea_bit_len} | ${psid_offset} +| | ... | ${psid_len} | ${TRUE} +| | ${ipv6_ce_addr}= | Compute IPv6 map destination address +| | ... | ${ipv4_pfx} | ${ipv6_dst_pfx} | ${ea_bit_len} | ${psid_offset} +| | ... | ${psid_len} | ${ipv4_inside} | ${dst_port} +| | ${ipv6_br_addr}= | Compute IPv6 map source address +| | ... | ${ipv6_src_pfx} | ${ipv4_outside} +# Check translation from v4 to v6 with traffic script +| | Send IPv4 UDP and check IPv6 headers for MAP-T +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${ipv4_inside} | ${ipv4_outside} | ${dst_port} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_ce_addr} | ${ipv6_br_addr} +# Check translation from v6 to v4 with traffic script +| | Send IPv6 UDP and check IPv4 headers for MAP-T +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${ipv6_br_addr} | ${ipv6_ce_addr} +| | ... | ${dst_port} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${ipv4_outside} | ${ipv4_inside} +| | [Teardown] | Run Keywords +| | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND +| | ... | Show packet trace on all DUTs | ${nodes} | AND +| | ... | Clear packet trace on all DUTs | ${nodes} | AND +| | ... | Verify VPP PID in Teardown diff --git a/tests/vpp/func/ip4_tunnels/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot b/tests/vpp/func/ip4_tunnels/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..e4c8c25f0a --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot @@ -0,0 +1,74 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/overlay/vxlan.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *RFC7348 VXLAN: Bridge-domain with VXLAN over VLAN test cases* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology with +| ... | single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-dot1q-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with static MACs, MAC learning +| ... | enabled and Split Horizon Groups (SHG) depending on test case; VXLAN +| ... | tunnels are configured between L2BDs on 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:* RFC7348. + +*** Variables *** +| ${VNI}= | 23 +| ${BID}= | 23 +| ${VLAN}= | 10 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4oVLAN tunnels switch ICMPv4 between TG links +| | [Tags] | EXPECTED_FAILING +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on\ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure L2 bridge-domain (MAC learning enabled), each with one +| | ... | interface to TG and one VXLAN tunnel interface towards the other DUT +| | ... | over VLAN sub-interface. [Ver] Make TG send ICMPv4 Echo Req between +| | ... | two of its interfaces, verify all packets are received. [Ref] RFC7348. +| | 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 Create vlan interfaces for VXLAN | ${VLAN} +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | And Configure IP addresses and neighbors on interfaces +| | ... | ${dut1_node} | ${dut1s_vlan_name} | ${dut1s_vlan_index} +| | ... | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${VNI} +| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan} | up +| | And Add interfaces to L2BD | ${dut1_node} | ${BID} +| | ... | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${VNI} +| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan} | up +| | And Add interfaces to L2BD | ${dut2_node} | ${BID} +| | ... | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send ICMPv4 bidirectionally and verify received packets +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/vpp/func/ip4_tunnels/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot b/tests/vpp/func/ip4_tunnels/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..32014e5985 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot @@ -0,0 +1,78 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/overlay/vxlan.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Resource | resources/libraries/robot/vm/qemu.robot +| Resource | resources/libraries/robot/vm/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *Bridge-domain with VXLAN test cases - IPv4* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled; +| ... | VXLAN tunnels are configured between L2BDs on 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:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 +| ${vni_2}= | 35 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 +| ${bd_id3}= | 30 +| ${shg1}= | 1 +| ${shg2}= | 2 + +| ${ip4_addr1}= | 172.16.0.1 +| ${ip4_addr2}= | 172.16.0.2 +| ${ip4_prefix}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure two i/fs into L2BD with MAC learning. [Ver] Make TG +| | ... | verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 in +| | ... | both directions and are correct on receive. [Ref] RFC7348. +| | 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 +| | ${dut1_to_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2} +| | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1} +| | And Configure IP addresses and neighbors on interfaces | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} +| | And Add interfaces to L2BD | ${dut1_node} | ${bd_id1} +| | ... | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} +| | And Add interfaces to L2BD | ${dut2_node} | ${bd_id1} +| | ... | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send ICMPv4 bidirectionally and verify received packets +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/vpp/func/ip4_tunnels/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot b/tests/vpp/func/ip4_tunnels/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot new file mode 100644 index 0000000000..aa88be5731 --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot @@ -0,0 +1,66 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/overlay/vxlan.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Resource | resources/libraries/robot/l2/l2_xconnect.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *RFC7348 VXLAN: L2 cross-connect with VXLAN test cases* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | cross-connect (L2XC) switching; VXLAN tunnels are configured between +| ... | L2XCs on 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:* RFC7348. + +*** Variables *** +| ${VNI}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and VXLANoIPv4 tunnels switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | [Ref] RFC7348.DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On +| | ... | DUT1 and DUT2 configure L2 cross-connect (L2XC), each with one +| | ... | interface to TG and one VXLAN tunnel interface towards the other +| | ... | DUT. [Ver] Make TG send ICMPv4 Echo Req between two of its +| | ... | interfaces; verify all packets are received. [Ref] RFC7348. +| | 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 +| | ${dut1_to_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2} +| | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1} +| | And Configure IP addresses and neighbors on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${VNI} +| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} +| | And Configure L2XC | ${dut1_node} | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${VNI} +| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} +| | And Configure L2XC | ${dut2_node} | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send ICMPv4 bidirectionally and verify received packets +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/vpp/func/ip4_tunnels/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot b/tests/vpp/func/ip4_tunnels/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot new file mode 100644 index 0000000000..8fd608eada --- /dev/null +++ b/tests/vpp/func/ip4_tunnels/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot @@ -0,0 +1,200 @@ +# Copyright (c) 2016 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 +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/overlay/vxlan.robot +| Resource | resources/libraries/robot/l2/l2_traffic.robot +| Resource | resources/libraries/robot/vm/qemu.robot +| Resource | resources/libraries/robot/vm/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Set up functional test +| Test Teardown | Tear down functional test +| Documentation | *L2BD with SHG combined with VXLAN test cases - IPv4* +| ... +| ... | *[Top] Network topologies:* TG=DUT1=DUT2=TG 3-node circular topology +| ... | with double parallel links. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled +| ... | and Split Horizon Groups (SHG); VXLAN tunnels are configured +| ... | between L2BDs on 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:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 +| ${vni_2}= | 35 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 +| ${bd_id3}= | 30 +| ${shg1}= | 1 +| ${shg2}= | 2 + +| ${ip4_addr1}= | 172.16.0.1 +| ${ip4_addr2}= | 172.16.0.2 +| ${ip4_prefix}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in SHG switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2 +| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces +| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN +| | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure +| | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged +| | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make +| | ... | TG send ICMPv4 Echo Reqs between all four of its interfaces to be +| | ... | switched by DUT1 and DUT2; verify packets are not switched between +| | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1. +| | ... | [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path for 3-node BD-SHG test | ${nodes['TG']} +| | ... | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} +| | And Set interfaces in 3-node BD-SHG test up +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} +| | ... | ${ip4_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} +| | ... | ${ip4_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} +| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up +| | And Vpp Node Interfaces Ready Wait | ${dut1_node} +| | And Vpp Node Interfaces Ready Wait | ${dut2_node} +| | And Create bridge domain | ${dut1_node} | ${bd_id1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1} +| | ... | ${bd_id1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan1} +| | ... | ${bd_id1} | ${shg1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan2} +| | ... | ${bd_id1} | ${shg1} +| | And Create bridge domain | ${dut2_node} | ${bd_id2} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1} +| | ... | ${bd_id2} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan1} +| | ... | ${bd_id2} +| | And Create bridge domain | ${dut2_node} | ${bd_id3} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id3} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan2} +| | ... | ${bd_id3} +| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if1} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if2} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if1} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if2} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send ICMPv4 bidirectionally and verify received packets +| | | ... | ${tg_node} | ${tg_to_dut2_if1} +| | | ... | ${tg_to_dut2_if2} + +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in different SHGs switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2 +| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces +| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN +| | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2 +| | ... | configure two L2 bridge-domain (MAC learning enabled), each with one +| | ... | untagged interface to TG and one VXLAN interface towards the DUT1. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between all four of its interfaces +| | ... | to be switched by DUT1 and DUT2; verify packets are switched between +| | ... | all TG interfaces. [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Configure path for 3-node BD-SHG test | ${nodes['TG']} +| | ... | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} +| | And Set interfaces in 3-node BD-SHG test up +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} +| | ... | ${ip4_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} +| | ... | ${ip4_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} +| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up +| | And Vpp Node Interfaces Ready Wait | ${dut1_node} +| | And Vpp Node Interfaces Ready Wait | ${dut2_node} +| | And Create bridge domain | ${dut1_node} | ${bd_id1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1} +| | ... | ${bd_id1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan1} +| | ... | ${bd_id1} | ${shg1} +| | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan2} +| | ... | ${bd_id1} | ${shg2} +| | And Create bridge domain | ${dut2_node} | ${bd_id2} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1} +| | ... | ${bd_id2} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan1} +| | ... | ${bd_id2} +| | And Create bridge domain | ${dut2_node} | ${bd_id3} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id3} +| | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan2} +| | ... | ${bd_id3} +| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if1} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if2} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if1} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if2} +| | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node} +| | ... | ${tg_to_dut2_if1} +| | ... | ${tg_to_dut2_if2} |