From 82392d2a6dcfde01bb49c85526edeab7d0cefc50 Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Wed, 25 Jan 2017 20:26:53 +0100 Subject: Remove _base from test suite dir names Change-Id: I4168dc077d2d1a9a9ae9dce4bf17da1be9a1d61d Signed-off-by: Jan Gelety --- bootstrap.sh | 2 +- .../eth2p-ethip4-ip4base-copblklistbase-func.robot | 92 ++++ .../eth2p-ethip4-ip4base-copwhlistbase-func.robot | 92 ++++ .../eth2p-ethip6-ip6base-copblklistbase-func.robot | 101 ++++ .../eth2p-ethip6-ip6base-copwhlistbase-func.robot | 101 ++++ .../eth2p-ethip4-ip4base-copblklistbase-func.robot | 92 ---- .../eth2p-ethip4-ip4base-copwhlistbase-func.robot | 92 ---- .../eth2p-ethip6-ip6base-copblklistbase-func.robot | 101 ---- .../eth2p-ethip6-ip6base-copwhlistbase-func.robot | 101 ---- .../iacl/eth2p-eth-l2xcbase-iaclbase-func.robot | 144 +++++ .../iacl/eth2p-ethip4-ip4base-iaclbase-func.robot | 524 +++++++++++++++++++ .../iacl/eth2p-ethip6-ip6base-iaclbase-func.robot | 577 +++++++++++++++++++++ .../eth2p-eth-l2xcbase-iaclbase-func.robot | 144 ----- .../eth2p-ethip4-ip4base-iaclbase-func.robot | 524 ------------------- .../eth2p-ethip6-ip6base-iaclbase-func.robot | 577 --------------------- tests/func/ipv4/eth2p-ethip4-ip4base-func.robot | 138 +++++ .../ipv4/eth2p-ethip4-ip4base-ip4arp-func.robot | 82 +++ .../ipv4/eth2p-ethip4-ip4base-ip4ecmp-func.robot | 74 +++ .../eth2p-ethip4-ip4base-ip4proxyarp-func.robot | 156 ++++++ .../func/ipv4_base/eth2p-ethip4-ip4base-func.robot | 138 ----- .../eth2p-ethip4-ip4base-ip4arp-func.robot | 82 --- .../eth2p-ethip4-ip4base-ip4ecmp-func.robot | 74 --- .../eth2p-ethip4-ip4base-ip4proxyarp-func.robot | 156 ------ tests/func/ipv6/eth2p-ethip6-ip6base-func.robot | 120 +++++ .../ipv6/eth2p-ethip6-ip6base-ip6ecmp-func.robot | 73 +++ .../ipv6/eth2p-ethip6-ip6base-ip6ra-func.robot | 107 ++++ .../func/ipv6_base/eth2p-ethip6-ip6base-func.robot | 120 ----- .../eth2p-ethip6-ip6base-ip6ecmp-func.robot | 73 --- .../eth2p-ethip6-ip6base-ip6ra-func.robot | 107 ---- ...2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot | 110 ++++ .../func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot | 90 ++++ ...2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot | 154 ++++++ .../func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot | 86 +++ .../l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot | 93 ++++ ...2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot | 110 ---- .../l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot | 90 ---- ...2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot | 154 ------ .../l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot | 86 --- .../eth4p-eth-l2bdbasemaclrn-l2shg-func.robot | 93 ---- .../eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot | 95 ++++ tests/func/l2xc/eth2p-eth-l2xcbase-func.robot | 78 +++ .../eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot | 95 ---- tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot | 78 --- 43 files changed, 3088 insertions(+), 3088 deletions(-) create mode 100644 tests/func/cop/eth2p-ethip4-ip4base-copblklistbase-func.robot create mode 100644 tests/func/cop/eth2p-ethip4-ip4base-copwhlistbase-func.robot create mode 100644 tests/func/cop/eth2p-ethip6-ip6base-copblklistbase-func.robot create mode 100644 tests/func/cop/eth2p-ethip6-ip6base-copwhlistbase-func.robot delete mode 100644 tests/func/cop_base/eth2p-ethip4-ip4base-copblklistbase-func.robot delete mode 100644 tests/func/cop_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot delete mode 100644 tests/func/cop_base/eth2p-ethip6-ip6base-copblklistbase-func.robot delete mode 100644 tests/func/cop_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot create mode 100644 tests/func/iacl/eth2p-eth-l2xcbase-iaclbase-func.robot create mode 100644 tests/func/iacl/eth2p-ethip4-ip4base-iaclbase-func.robot create mode 100644 tests/func/iacl/eth2p-ethip6-ip6base-iaclbase-func.robot delete mode 100644 tests/func/iacl_base/eth2p-eth-l2xcbase-iaclbase-func.robot delete mode 100644 tests/func/iacl_base/eth2p-ethip4-ip4base-iaclbase-func.robot delete mode 100644 tests/func/iacl_base/eth2p-ethip6-ip6base-iaclbase-func.robot create mode 100644 tests/func/ipv4/eth2p-ethip4-ip4base-func.robot create mode 100644 tests/func/ipv4/eth2p-ethip4-ip4base-ip4arp-func.robot create mode 100644 tests/func/ipv4/eth2p-ethip4-ip4base-ip4ecmp-func.robot create mode 100644 tests/func/ipv4/eth2p-ethip4-ip4base-ip4proxyarp-func.robot delete mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-func.robot delete mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4arp-func.robot delete mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot delete mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot create mode 100644 tests/func/ipv6/eth2p-ethip6-ip6base-func.robot create mode 100644 tests/func/ipv6/eth2p-ethip6-ip6base-ip6ecmp-func.robot create mode 100644 tests/func/ipv6/eth2p-ethip6-ip6base-ip6ra-func.robot delete mode 100644 tests/func/ipv6_base/eth2p-ethip6-ip6base-func.robot delete mode 100644 tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot delete mode 100644 tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ra-func.robot create mode 100644 tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot create mode 100644 tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot create mode 100644 tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot create mode 100644 tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot create mode 100644 tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot delete mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot delete mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot delete mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot delete mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot delete mode 100644 tests/func/l2bd_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot create mode 100644 tests/func/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot create mode 100644 tests/func/l2xc/eth2p-eth-l2xcbase-func.robot delete mode 100644 tests/func/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot delete mode 100644 tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot diff --git a/bootstrap.sh b/bootstrap.sh index f123729647..4db84345e0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -33,7 +33,7 @@ VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" -TEST_GROUPS=("l2bd_base,dhcp,gre,honeycomb,l2xc_base,lisp,softwire" "cop_base,telemetry,ipsec,ipv6_base,rpf,tap,vrf" "fds,iacl_base,ipv4_base,policer,vlan,vxlan") +TEST_GROUPS=("l2bd,dhcp,gre,honeycomb,l2xc,lisp,softwire" "cop,telemetry,ipsec,ipv6,rpf,tap,vrf" "fds,iacl,ipv4,policer,vlan,vxlan") SUITE_PATH="tests.func" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/tests/func/cop/eth2p-ethip4-ip4base-copblklistbase-func.robot b/tests/func/cop/eth2p-ethip4-ip4base-copblklistbase-func.robot new file mode 100644 index 0000000000..37e55c0666 --- /dev/null +++ b/tests/func/cop/eth2p-ethip4-ip4base-copblklistbase-func.robot @@ -0,0 +1,92 @@ +# 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.Trace +| Library | resources.libraries.python.Cop +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Variables | resources/libraries/python/IPv4NodeAddress.py | ${nodes} +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *COP Security IPv4 Blacklist Tests* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 on all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and +| ... | static routes. COP security black-lists are applied on DUT1 ingress +| ... | interface from TG. DUT2 is configured with L2XC. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in +| ... | one direction by TG on link to DUT1; on receive TG verifies packets for +| ... | correctness and drops as applicable. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tg_node}= | ${nodes['TG']} +| ${dut1_node}= | ${nodes['DUT1']} +| ${dut2_node}= | ${nodes['DUT2']} + +| ${dut1_if1_ip}= | 192.168.1.1 +| ${dut1_if2_ip}= | 192.168.2.1 +| ${dut1_if1_ip_GW}= | 192.168.1.2 +| ${dut1_if2_ip_GW}= | 192.168.2.2 + +| ${test_dst_ip}= | 32.0.0.1 +| ${test_src_ip}= | 16.0.0.1 + +| ${cop_dut_ip}= | 16.0.0.0 + +| ${ip_prefix}= | 24 +| ${nodes_ipv4_addresses}= | ${nodes_ipv4_addr} + +| ${fib_table_number}= | 1 + +*** Test Cases *** +| TC01: DUT drops IPv4 pkts with COP blacklist set with IPv4 src-addr +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 \ +| | ... | configure interface IPv4 addresses and routes in the main +| | ... | routing domain, add COP blacklist on interface to TG with IPv4 +| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 +| | ... | xconnect. [Ver] Make TG send ICMPv4 Echo Req on its interface to +| | ... | DUT1; verify no ICMPv4 Echo Req pkts are received. [Ref] +| | Given Path for 3-node testing is set +| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} +| | And Vpp Route Add | ${dut1_node} +| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} +| | And Add fib table | ${dut1_node} +| | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | drop +| | When COP Add whitelist Entry +| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number} +| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} +| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop/eth2p-ethip4-ip4base-copwhlistbase-func.robot b/tests/func/cop/eth2p-ethip4-ip4base-copwhlistbase-func.robot new file mode 100644 index 0000000000..eb8be688d9 --- /dev/null +++ b/tests/func/cop/eth2p-ethip4-ip4base-copwhlistbase-func.robot @@ -0,0 +1,92 @@ +# 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.Trace +| Library | resources.libraries.python.Cop +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Variables | resources/libraries/python/IPv4NodeAddress.py | ${nodes} +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *COP Security IPv4 Whitelist Tests* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 on all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and +| ... | static routes. COP security white-lists are applied on DUT1 ingress +| ... | interface from TG. DUT2 is configured with L2XC. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in +| ... | one direction by TG on link to DUT1; on receive TG verifies packets for +| ... | correctness and drops as applicable. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tg_node}= | ${nodes['TG']} +| ${dut1_node}= | ${nodes['DUT1']} +| ${dut2_node}= | ${nodes['DUT2']} + +| ${dut1_if1_ip}= | 192.168.1.1 +| ${dut1_if2_ip}= | 192.168.2.1 +| ${dut1_if1_ip_GW}= | 192.168.1.2 +| ${dut1_if2_ip_GW}= | 192.168.2.2 + +| ${test_dst_ip}= | 32.0.0.1 +| ${test_src_ip}= | 16.0.0.1 + +| ${cop_dut_ip}= | 16.0.0.0 + +| ${ip_prefix}= | 24 +| ${nodes_ipv4_addresses}= | ${nodes_ipv4_addr} + +| ${fib_table_number}= | 1 + +*** Test Cases *** +| TC01: DUT permits IPv4 pkts with COP whitelist set with IPv4 src-addr +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 \ +| | ... | configure interface IPv4 addresses and routes in the main +| | ... | routing domain, add COP whitelist on interface to TG with IPv4 +| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 +| | ... | xconnect. [Ver] Make TG send ICMPv4 Echo Req on its interface to +| | ... | DUT1; verify received ICMPv4 Echo Req pkts are correct. [Ref] +| | Given Path for 3-node testing is set +| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} +| | And Vpp Route Add | ${dut1_node} +| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} +| | And Add fib table | ${dut1_node} +| | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | local +| | When COP Add whitelist Entry +| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number} +| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} +| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop/eth2p-ethip6-ip6base-copblklistbase-func.robot b/tests/func/cop/eth2p-ethip6-ip6base-copblklistbase-func.robot new file mode 100644 index 0000000000..7511dfe31b --- /dev/null +++ b/tests/func/cop/eth2p-ethip6-ip6base-copblklistbase-func.robot @@ -0,0 +1,101 @@ +# 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.Trace +| Library | resources.libraries.python.Cop +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes} +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *COP Security IPv6 Blacklist Tests* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 on all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and +| ... | static routes. COP security black-lists are applied on DUT1 ingress +| ... | interface from TG. DUT2 is configured with L2XC. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in +| ... | one direction by TG on link to DUT1; on receive TG verifies packets for +| ... | correctness and drops as applicable. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tg_node}= | ${nodes['TG']} +| ${dut1_node}= | ${nodes['DUT1']} +| ${dut2_node}= | ${nodes['DUT2']} + +| ${dut1_if1_ip}= | 3ffe:62::1 +| ${dut1_if2_ip}= | 3ffe:63::1 +| ${dut1_if1_ip_GW}= | 3ffe:62::2 +| ${dut1_if2_ip_GW}= | 3ffe:63::2 + +| ${dut2_if1_ip}= | 3ffe:72::1 +| ${dut2_if2_ip}= | 3ffe:73::1 + +| ${test_dst_ip}= | 3ffe:64::1 +| ${test_src_ip}= | 3ffe:61::1 + +| ${cop_dut_ip}= | 3ffe:61:: + +| ${ip_prefix}= | 64 + +| ${nodes_ipv6_addresses}= | ${nodes_ipv6_addr} + +| ${fib_table_number}= | 1 + +*** Test Cases *** +| TC01: DUT drops IPv6 pkts with COP blacklist set with IPv6 src-addr +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 \ +| | ... | configure interface IPv6 addresses and routes in the main +| | ... | routing domain, add COP blacklist on interface to TG with IPv6 +| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 +| | ... | xconnect. [Ver] Make TG send ICMPv6 Echo Req on its interface to +| | ... | DUT1; verify no ICMPv6 Echo Req pkts are received. [Ref] +| | Given Path for 3-node testing is set +| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix} +| | And Add IP Neighbor +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} +| | And Add IP Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} +| | And Vpp Route Add | ${dut1_node} +| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | And Add fib table | ${dut1_node} +| | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | drop +| | When COP Add whitelist Entry +| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${fib_table_number} +| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} +| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop/eth2p-ethip6-ip6base-copwhlistbase-func.robot b/tests/func/cop/eth2p-ethip6-ip6base-copwhlistbase-func.robot new file mode 100644 index 0000000000..f75f4d0dea --- /dev/null +++ b/tests/func/cop/eth2p-ethip6-ip6base-copwhlistbase-func.robot @@ -0,0 +1,101 @@ +# 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.Trace +| Library | resources.libraries.python.Cop +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes} +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *COP Security IPv6 Whitelist Tests* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 on all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and +| ... | static routes. COP security white-lists are applied on DUT1 ingress +| ... | interface from TG. DUT2 is configured with L2XC. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in +| ... | one direction by TG on link to DUT1; on receive TG verifies packets for +| ... | correctness and drops as applicable. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tg_node}= | ${nodes['TG']} +| ${dut1_node}= | ${nodes['DUT1']} +| ${dut2_node}= | ${nodes['DUT2']} + +| ${dut1_if1_ip}= | 3ffe:62::1 +| ${dut1_if2_ip}= | 3ffe:63::1 +| ${dut1_if1_ip_GW}= | 3ffe:62::2 +| ${dut1_if2_ip_GW}= | 3ffe:63::2 + +| ${dut2_if1_ip}= | 3ffe:72::1 +| ${dut2_if2_ip}= | 3ffe:73::1 + +| ${test_dst_ip}= | 3ffe:64::1 +| ${test_src_ip}= | 3ffe:61::1 + +| ${cop_dut_ip}= | 3ffe:61:: + +| ${ip_prefix}= | 64 + +| ${nodes_ipv6_addresses}= | ${nodes_ipv6_addr} + +| ${fib_table_number}= | 1 + +*** Test Cases *** +| TC01: DUT permits IPv6 pkts with COP whitelist set with IPv6 src-addr +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 \ +| | ... | configure interface IPv6 addresses and routes in the main +| | ... | routing domain, add COP whitelist on interface to TG with IPv6 +| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 +| | ... | xconnect. [Ver] Make TG send ICMPv6 Echo Req on its interface to +| | ... | DUT1; verify received ICMPv6 Echo Req pkts are correct. [Ref] +| | Given Path for 3-node testing is set +| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix} +| | And VPP Set IF IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix} +| | And Add IP Neighbor +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} +| | And Add IP Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} +| | And Vpp Route Add | ${dut1_node} +| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | And Add fib table | ${dut1_node} | ${cop_dut_ip} | ${ip_prefix} | +| | ... | ${fib_table_number} | local +| | When COP Add whitelist Entry | ${dut1_node} | ${dut1_to_tg} | ip6 | +| | ... | ${fib_table_number} +| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} +| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop_base/eth2p-ethip4-ip4base-copblklistbase-func.robot b/tests/func/cop_base/eth2p-ethip4-ip4base-copblklistbase-func.robot deleted file mode 100644 index 37e55c0666..0000000000 --- a/tests/func/cop_base/eth2p-ethip4-ip4base-copblklistbase-func.robot +++ /dev/null @@ -1,92 +0,0 @@ -# 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.Trace -| Library | resources.libraries.python.Cop -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Variables | resources/libraries/python/IPv4NodeAddress.py | ${nodes} -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *COP Security IPv4 Blacklist Tests* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 on all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | static routes. COP security black-lists are applied on DUT1 ingress -| ... | interface from TG. DUT2 is configured with L2XC. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in -| ... | one direction by TG on link to DUT1; on receive TG verifies packets for -| ... | correctness and drops as applicable. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tg_node}= | ${nodes['TG']} -| ${dut1_node}= | ${nodes['DUT1']} -| ${dut2_node}= | ${nodes['DUT2']} - -| ${dut1_if1_ip}= | 192.168.1.1 -| ${dut1_if2_ip}= | 192.168.2.1 -| ${dut1_if1_ip_GW}= | 192.168.1.2 -| ${dut1_if2_ip_GW}= | 192.168.2.2 - -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 - -| ${cop_dut_ip}= | 16.0.0.0 - -| ${ip_prefix}= | 24 -| ${nodes_ipv4_addresses}= | ${nodes_ipv4_addr} - -| ${fib_table_number}= | 1 - -*** Test Cases *** -| TC01: DUT drops IPv4 pkts with COP blacklist set with IPv4 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 \ -| | ... | configure interface IPv4 addresses and routes in the main -| | ... | routing domain, add COP blacklist on interface to TG with IPv4 -| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 -| | ... | xconnect. [Ver] Make TG send ICMPv4 Echo Req on its interface to -| | ... | DUT1; verify no ICMPv4 Echo Req pkts are received. [Ref] -| | Given Path for 3-node testing is set -| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} -| | And Vpp Route Add | ${dut1_node} -| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} -| | And Add fib table | ${dut1_node} -| | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | drop -| | When COP Add whitelist Entry -| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number} -| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot b/tests/func/cop_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot deleted file mode 100644 index eb8be688d9..0000000000 --- a/tests/func/cop_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot +++ /dev/null @@ -1,92 +0,0 @@ -# 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.Trace -| Library | resources.libraries.python.Cop -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Variables | resources/libraries/python/IPv4NodeAddress.py | ${nodes} -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *COP Security IPv4 Whitelist Tests* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 on all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | static routes. COP security white-lists are applied on DUT1 ingress -| ... | interface from TG. DUT2 is configured with L2XC. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in -| ... | one direction by TG on link to DUT1; on receive TG verifies packets for -| ... | correctness and drops as applicable. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tg_node}= | ${nodes['TG']} -| ${dut1_node}= | ${nodes['DUT1']} -| ${dut2_node}= | ${nodes['DUT2']} - -| ${dut1_if1_ip}= | 192.168.1.1 -| ${dut1_if2_ip}= | 192.168.2.1 -| ${dut1_if1_ip_GW}= | 192.168.1.2 -| ${dut1_if2_ip_GW}= | 192.168.2.2 - -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 - -| ${cop_dut_ip}= | 16.0.0.0 - -| ${ip_prefix}= | 24 -| ${nodes_ipv4_addresses}= | ${nodes_ipv4_addr} - -| ${fib_table_number}= | 1 - -*** Test Cases *** -| TC01: DUT permits IPv4 pkts with COP whitelist set with IPv4 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 \ -| | ... | configure interface IPv4 addresses and routes in the main -| | ... | routing domain, add COP whitelist on interface to TG with IPv4 -| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 -| | ... | xconnect. [Ver] Make TG send ICMPv4 Echo Req on its interface to -| | ... | DUT1; verify received ICMPv4 Echo Req pkts are correct. [Ref] -| | Given Path for 3-node testing is set -| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} -| | And Vpp Route Add | ${dut1_node} -| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} -| | And Add fib table | ${dut1_node} -| | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | local -| | When COP Add whitelist Entry -| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number} -| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop_base/eth2p-ethip6-ip6base-copblklistbase-func.robot b/tests/func/cop_base/eth2p-ethip6-ip6base-copblklistbase-func.robot deleted file mode 100644 index 7511dfe31b..0000000000 --- a/tests/func/cop_base/eth2p-ethip6-ip6base-copblklistbase-func.robot +++ /dev/null @@ -1,101 +0,0 @@ -# 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.Trace -| Library | resources.libraries.python.Cop -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes} -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *COP Security IPv6 Blacklist Tests* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 on all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and -| ... | static routes. COP security black-lists are applied on DUT1 ingress -| ... | interface from TG. DUT2 is configured with L2XC. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in -| ... | one direction by TG on link to DUT1; on receive TG verifies packets for -| ... | correctness and drops as applicable. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tg_node}= | ${nodes['TG']} -| ${dut1_node}= | ${nodes['DUT1']} -| ${dut2_node}= | ${nodes['DUT2']} - -| ${dut1_if1_ip}= | 3ffe:62::1 -| ${dut1_if2_ip}= | 3ffe:63::1 -| ${dut1_if1_ip_GW}= | 3ffe:62::2 -| ${dut1_if2_ip_GW}= | 3ffe:63::2 - -| ${dut2_if1_ip}= | 3ffe:72::1 -| ${dut2_if2_ip}= | 3ffe:73::1 - -| ${test_dst_ip}= | 3ffe:64::1 -| ${test_src_ip}= | 3ffe:61::1 - -| ${cop_dut_ip}= | 3ffe:61:: - -| ${ip_prefix}= | 64 - -| ${nodes_ipv6_addresses}= | ${nodes_ipv6_addr} - -| ${fib_table_number}= | 1 - -*** Test Cases *** -| TC01: DUT drops IPv6 pkts with COP blacklist set with IPv6 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 \ -| | ... | configure interface IPv6 addresses and routes in the main -| | ... | routing domain, add COP blacklist on interface to TG with IPv6 -| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 -| | ... | xconnect. [Ver] Make TG send ICMPv6 Echo Req on its interface to -| | ... | DUT1; verify no ICMPv6 Echo Req pkts are received. [Ref] -| | Given Path for 3-node testing is set -| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix} -| | And Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} -| | And Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} -| | And Vpp Route Add | ${dut1_node} -| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | And Add fib table | ${dut1_node} -| | ... | ${cop_dut_ip} | ${ip_prefix} | ${fib_table_number} | drop -| | When COP Add whitelist Entry -| | ... | ${dut1_node} | ${dut1_to_tg} | ip6 | ${fib_table_number} -| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/cop_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot b/tests/func/cop_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot deleted file mode 100644 index f75f4d0dea..0000000000 --- a/tests/func/cop_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot +++ /dev/null @@ -1,101 +0,0 @@ -# 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.Trace -| Library | resources.libraries.python.Cop -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes} -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *COP Security IPv6 Whitelist Tests* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 on all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and -| ... | static routes. COP security white-lists are applied on DUT1 ingress -| ... | interface from TG. DUT2 is configured with L2XC. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in -| ... | one direction by TG on link to DUT1; on receive TG verifies packets for -| ... | correctness and drops as applicable. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tg_node}= | ${nodes['TG']} -| ${dut1_node}= | ${nodes['DUT1']} -| ${dut2_node}= | ${nodes['DUT2']} - -| ${dut1_if1_ip}= | 3ffe:62::1 -| ${dut1_if2_ip}= | 3ffe:63::1 -| ${dut1_if1_ip_GW}= | 3ffe:62::2 -| ${dut1_if2_ip_GW}= | 3ffe:63::2 - -| ${dut2_if1_ip}= | 3ffe:72::1 -| ${dut2_if2_ip}= | 3ffe:73::1 - -| ${test_dst_ip}= | 3ffe:64::1 -| ${test_src_ip}= | 3ffe:61::1 - -| ${cop_dut_ip}= | 3ffe:61:: - -| ${ip_prefix}= | 64 - -| ${nodes_ipv6_addresses}= | ${nodes_ipv6_addr} - -| ${fib_table_number}= | 1 - -*** Test Cases *** -| TC01: DUT permits IPv6 pkts with COP whitelist set with IPv6 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 \ -| | ... | configure interface IPv6 addresses and routes in the main -| | ... | routing domain, add COP whitelist on interface to TG with IPv6 -| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 -| | ... | xconnect. [Ver] Make TG send ICMPv6 Echo Req on its interface to -| | ... | DUT1; verify received ICMPv6 Echo Req pkts are correct. [Ref] -| | Given Path for 3-node testing is set -| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip} | ${ip_prefix} -| | And VPP Set IF IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip} | ${ip_prefix} -| | And Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} -| | And Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} -| | And Vpp Route Add | ${dut1_node} -| | ... | ${test_dst_ip} | ${ip_prefix} | ${dut1_if2_ip_GW} | ${dut1_to_dut2} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | And Add fib table | ${dut1_node} | ${cop_dut_ip} | ${ip_prefix} | -| | ... | ${fib_table_number} | local -| | When COP Add whitelist Entry | ${dut1_node} | ${dut1_to_tg} | ip6 | -| | ... | ${fib_table_number} -| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${tg_to_dut2_mac} diff --git a/tests/func/iacl/eth2p-eth-l2xcbase-iaclbase-func.robot b/tests/func/iacl/eth2p-eth-l2xcbase-iaclbase-func.robot new file mode 100644 index 0000000000..1914130bac --- /dev/null +++ b/tests/func/iacl/eth2p-eth-l2xcbase-iaclbase-func.robot @@ -0,0 +1,144 @@ +# 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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Ingress ACL test cases* +| ... +| ... | *[Top] Network Topologies:* TG - DUT1 - DUT2 - TG +| ... | with one link between the nodes. +| ... | *[Cfg] DUT configuration:* DUT2 is configured with L2 Cross connect. +| ... | DUT1 is configured with iACL classification on link to TG, +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent +| ... | in one direction by TG on link to DUT1 and received on TG link +| ... | to DUT2. On receive TG verifies if packets are dropped. + +*** Variables *** +| ${l2_table}= | l2 + +*** Test Cases *** +| TC01: DUT with iACL MAC src-addr drops matching pkts +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 add source MAC address to classify table with 'deny'. +| | ... | [Ver] Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | src | ${tg_to_dut1_mac} +| | And Vpp Enable Input ACL Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} +| | Then Send and receive ICMP Packet should fail +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} + +| TC02: DUT with iACL MAC dst-addr drops matching pkts +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 add destination MAC address to classify +| | ... | table with 'deny'. +| | ... | [Ver] Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | dst +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | dst | ${tg_to_dut2_mac} +| | And Vpp Enable Input ACL Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} +| | Then Send and receive ICMP Packet should fail +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} + +| TC03: DUT with iACL MAC src-addr and dst-addr drops matching pkts +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 add source and destination MAC address to classify +| | ... | table with 'deny'. +| | ... | [Ver] Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} +| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_1} +| | ... | src | ${tg_to_dut1_mac} +| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | dst +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} +| | ... | dst | ${tg_to_dut1_mac} +| | And Vpp Enable Input ACL Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index_1} +| | And Vpp Enable Input ACL Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index_2} +| | Then Send and receive ICMP Packet should fail +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} + +| TC04: DUT with iACL EtherType drops matching pkts +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 add EtherType IPv4(0x0800) to classify table with 'deny'. +| | ... | [Ver] Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex +| | ... | ${dut1_node} | 000000000000000000000000ffff +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | 0000000000000000000000000800 +| | And Vpp Enable Input ACL Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} +| | Then Send and receive ICMP Packet should fail +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/iacl/eth2p-ethip4-ip4base-iaclbase-func.robot b/tests/func/iacl/eth2p-ethip4-ip4base-iaclbase-func.robot new file mode 100644 index 0000000000..ff55d94374 --- /dev/null +++ b/tests/func/iacl/eth2p-ethip4-ip4base-iaclbase-func.robot @@ -0,0 +1,524 @@ +# 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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IPv4 routing with ingress ACL test cases* +| ... +| ... | Encapsulations: Eth-IPv4 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 +| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv4 +| ... | routing and static routes. DUT1 is configured with iACL on link to TG, +| ... | iACL classification and permit/deny action are configured on a per test +| ... | case basis. Test ICMPv4 Echo Request packets are sent in one direction +| ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG +| ... | verifies if packets are dropped, or if received verifies packet IPv4 +| ... | src-addr, dst-addr and MAC addresses. + +*** Variables *** +| ${dut1_to_tg_ip}= | 192.168.1.1 +| ${dut1_to_dut2_ip}= | 192.168.2.1 +| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 +| ${test_dst_ip}= | 32.0.0.1 +| ${test_src_ip}= | 16.0.0.1 +| ${non_drop_dst_ip}= | 33.0.0.1 +| ${non_drop_src_ip}= | 15.0.0.1 +| ${prefix_length}= | 24 +| ${ip_version}= | ip4 +| ${l2_table}= | l2 + +*** Test Cases *** +| TC01: DUT with iACL IPv4 src-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source IPv4 address to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} +| | ... | ${ip_version} | src +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${ip_version} | src | ${test_src_ip} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} + +| TC02: DUT with iACL IPv4 dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add destination IPv4 address to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} +| | ... | ${ip_version} | dst +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${ip_version} | dst | ${test_dst_ip} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} + +| TC03: DUT with iACL IPv4 src-addr and dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source and destination IPv4 addresses to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= +| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} +| | ... | ${ip_version} | src +| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= +| | ... | And Vpp Creates Classify Table L3 | ${dut1_node} | ${ip_version} | dst +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_2} +| | ... | ${ip_version} | src | ${test_src_ip} +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} +| | ... | ${ip_version} | dst | ${test_dst_ip} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2} +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} + +| TC04: DUT with iACL IPv4 protocol set to TCP drops matching pkts +| | [Documentation] +| | ... | On DUT1 add protocol mask and TCP protocol (0x06) to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex +| | ... | ${dut1_node} | 0000000000000000000000000000000000000000000000FF +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | 000000000000000000000000000000000000000000000006 +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 + +| TC05: DUT with iACL IPv4 protocol set to UDP drops matching pkts +| | [Documentation] +| | ... | On DUT1 add protocol mask and UDP protocol (0x11) to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex +| | ... | ${dut1_node} | 0000000000000000000000000000000000000000000000FF +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | 000000000000000000000000000000000000000000000011 +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 + +| TC06: DUT with iACL IPv4 TCP src-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP source ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | source +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 + +| TC07: DUT with iACL IPv4 TCP dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 + +| TC08: DUT with iACL IPv4 TCP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP source and destination ports to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP +| | ... | source + destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 + +| TC09: DUT with iACL IPv4 UDP src-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add UDP source ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | source +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 + +| TC10: DUT with iACL IPv4 UDP dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 + +| TC11: DUT with iACL IPv4 UDP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add UDP source and destination ports to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP +| | ... | source + destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 diff --git a/tests/func/iacl/eth2p-ethip6-ip6base-iaclbase-func.robot b/tests/func/iacl/eth2p-ethip6-ip6base-iaclbase-func.robot new file mode 100644 index 0000000000..47daac02a5 --- /dev/null +++ b/tests/func/iacl/eth2p-ethip6-ip6base-iaclbase-func.robot @@ -0,0 +1,577 @@ +# 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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IPv6 routing with ingress ACL test cases* +| ... +| ... | Encapsulations: Eth-IPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv6 +| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv6 +| ... | routing and static routes. DUT1 is configured with iACL on link to TG, +| ... | iACL classification and permit/deny action are configured on a per test +| ... | case basis. Test ICMPv6 Echo Request packets are sent in one direction +| ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG +| ... | verifies if packets are dropped, or if received verifies packet IPv6 +| ... | src-addr, dst-addr and MAC addresses. + +*** Variables *** +| ${dut1_to_tg_ip}= | 3ffe:62::1 +| ${dut1_to_dut2_ip}= | 3ffe:63::1 +| ${dut1_to_dut2_ip_GW}= | 3ffe:63::2 +| ${dut2_to_dut1_ip}= | 3ffe:72::1 +| ${dut2_to_tg_ip}= | 3ffe:73::1 +| ${test_dst_ip}= | 3ffe:64::1 +| ${test_src_ip}= | 3ffe:61::1 +| ${non_drop_dst_ip}= | 3ffe:54::1 +| ${non_drop_src_ip}= | 3ffe:51::1 +| ${prefix_length}= | 64 +| ${ip_version}= | ip6 +| ${l2_table}= | l2 + +*** Test Cases *** +| TC01: DUT with iACL IPv6 src-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source IPv6 address to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} +| | ... | ${ip_version} | src +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${ip_version} | src | ${test_src_ip} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} + +| TC02: DUT with iACL IPv6 dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add destination IPv6 address to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} +| | ... | ${ip_version} | dst +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${ip_version} | dst | ${test_dst_ip} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} + +| TC03: DUT with iACL IPv6 src-addr and dst-addr drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source and destination IPv6 addresses to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= +| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} +| | ... | ${ip_version} | src +| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= +| | ... | And Vpp Creates Classify Table L3 | ${dut1_node} | ${ip_version} | dst +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_2} +| | ... | ${ip_version} | src | ${test_src_ip} +| | And Vpp Configures Classify Session L3 +| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} +| | ... | ${ip_version} | dst | ${test_dst_ip} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2} +| | Then Send packet from Port to Port should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} +| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} + +| TC04: DUT with iACL IPv6 protocol set to TCP drops matching pkts +| | [Documentation] +| | ... | On DUT1 add protocol mask and TCP protocol (0x06) to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex +| | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | 000000000000000000000000000000000000000006 +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 + +| TC05: DUT with iACL IPv6 protocol set to UDP drops matching pkts +| | [Documentation] +| | ... | On DUT1 add protocol mask and UDP protocol (0x11) to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex +| | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | 000000000000000000000000000000000000000011 +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 + +| TC06: DUT with iACL IPv6 TCP src-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP source ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | source +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 + +| TC07: DUT with iACL IPv6 TCP dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 + +| TC08: DUT with iACL IPv6 TCP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP source and destination ports to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP +| | ... | source + destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 + +| TC09: DUT with iACL IPv6 UDP src-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add UDP source ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | source +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 + +| TC10: DUT with iACL IPv6 UDP dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 + +| TC11: DUT with iACL IPv6 UDP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add UDP source and destination ports to classify table\ +| | ... | with 'deny'. Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} +| | ... | ${tg_to_dut2_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP +| | ... | source + destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} +| | Then Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 + +| TC12: DUT with iACL MAC src-addr and iACL IPv6 UDP src-ports and dst-ports drops matching pkts +| | [Documentation] +| | ... | On DUT1 add source MAC address to classify (L2) table and add UDP\ +| | ... | source and destination ports to classify (hex) table with 'deny'. +| | ... | Make TG verify matching packets are dropped. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 +| | And Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | src | ${tg_to_dut1_mac} +| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP +| | ... | source + destination +| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} +| | And Vpp Configures Classify Session Hex +| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | ${hex_value} +| | And Vpp Enable Input Acl Interface +| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} +| | Then Send TCP or UDP packet | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 +| | And Send TCP or UDP packet should failed | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} +| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 diff --git a/tests/func/iacl_base/eth2p-eth-l2xcbase-iaclbase-func.robot b/tests/func/iacl_base/eth2p-eth-l2xcbase-iaclbase-func.robot deleted file mode 100644 index 1914130bac..0000000000 --- a/tests/func/iacl_base/eth2p-eth-l2xcbase-iaclbase-func.robot +++ /dev/null @@ -1,144 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Classify.Classify -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *Ingress ACL test cases* -| ... -| ... | *[Top] Network Topologies:* TG - DUT1 - DUT2 - TG -| ... | with one link between the nodes. -| ... | *[Cfg] DUT configuration:* DUT2 is configured with L2 Cross connect. -| ... | DUT1 is configured with iACL classification on link to TG, -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent -| ... | in one direction by TG on link to DUT1 and received on TG link -| ... | to DUT2. On receive TG verifies if packets are dropped. - -*** Variables *** -| ${l2_table}= | l2 - -*** Test Cases *** -| TC01: DUT with iACL MAC src-addr drops matching pkts -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 add source MAC address to classify table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | src | ${tg_to_dut1_mac} -| | And Vpp Enable Input ACL Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then Send and receive ICMP Packet should fail -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} - -| TC02: DUT with iACL MAC dst-addr drops matching pkts -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 add destination MAC address to classify -| | ... | table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | dst -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | dst | ${tg_to_dut2_mac} -| | And Vpp Enable Input ACL Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then Send and receive ICMP Packet should fail -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} - -| TC03: DUT with iACL MAC src-addr and dst-addr drops matching pkts -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 add source and destination MAC address to classify -| | ... | table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_1} -| | ... | src | ${tg_to_dut1_mac} -| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | dst -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} -| | ... | dst | ${tg_to_dut1_mac} -| | And Vpp Enable Input ACL Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index_1} -| | And Vpp Enable Input ACL Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index_2} -| | Then Send and receive ICMP Packet should fail -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} - -| TC04: DUT with iACL EtherType drops matching pkts -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 add EtherType IPv4(0x0800) to classify table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex -| | ... | ${dut1_node} | 000000000000000000000000ffff -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | 0000000000000000000000000800 -| | And Vpp Enable Input ACL Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then Send and receive ICMP Packet should fail -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/iacl_base/eth2p-ethip4-ip4base-iaclbase-func.robot b/tests/func/iacl_base/eth2p-ethip4-ip4base-iaclbase-func.robot deleted file mode 100644 index ff55d94374..0000000000 --- a/tests/func/iacl_base/eth2p-ethip4-ip4base-iaclbase-func.robot +++ /dev/null @@ -1,524 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Classify.Classify -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IPv4 routing with ingress ACL test cases* -| ... -| ... | Encapsulations: Eth-IPv4 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 -| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with -| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv4 -| ... | routing and static routes. DUT1 is configured with iACL on link to TG, -| ... | iACL classification and permit/deny action are configured on a per test -| ... | case basis. Test ICMPv4 Echo Request packets are sent in one direction -| ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG -| ... | verifies if packets are dropped, or if received verifies packet IPv4 -| ... | src-addr, dst-addr and MAC addresses. - -*** Variables *** -| ${dut1_to_tg_ip}= | 192.168.1.1 -| ${dut1_to_dut2_ip}= | 192.168.2.1 -| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 -| ${non_drop_dst_ip}= | 33.0.0.1 -| ${non_drop_src_ip}= | 15.0.0.1 -| ${prefix_length}= | 24 -| ${ip_version}= | ip4 -| ${l2_table}= | l2 - -*** Test Cases *** -| TC01: DUT with iACL IPv4 src-addr drops matching pkts -| | [Documentation] -| | ... | On DUT1 add source IPv4 address to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | src -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${ip_version} | src | ${test_src_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC02: DUT with iACL IPv4 dst-addr drops matching pkts -| | [Documentation] -| | ... | On DUT1 add destination IPv4 address to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | dst -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${ip_version} | dst | ${test_dst_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC03: DUT with iACL IPv4 src-addr and dst-addr drops matching pkts -| | [Documentation] -| | ... | On DUT1 add source and destination IPv4 addresses to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | src -| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= -| | ... | And Vpp Creates Classify Table L3 | ${dut1_node} | ${ip_version} | dst -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_2} -| | ... | ${ip_version} | src | ${test_src_ip} -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} -| | ... | ${ip_version} | dst | ${test_dst_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2} -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC04: DUT with iACL IPv4 protocol set to TCP drops matching pkts -| | [Documentation] -| | ... | On DUT1 add protocol mask and TCP protocol (0x06) to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex -| | ... | ${dut1_node} | 0000000000000000000000000000000000000000000000FF -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | 000000000000000000000000000000000000000000000006 -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 - -| TC05: DUT with iACL IPv4 protocol set to UDP drops matching pkts -| | [Documentation] -| | ... | On DUT1 add protocol mask and UDP protocol (0x11) to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex -| | ... | ${dut1_node} | 0000000000000000000000000000000000000000000000FF -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | 000000000000000000000000000000000000000000000011 -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 - -| TC06: DUT with iACL IPv4 TCP src-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP source ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | source -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 - -| TC07: DUT with iACL IPv4 TCP dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 - -| TC08: DUT with iACL IPv4 TCP src-ports and dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP source and destination ports to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 - -| TC09: DUT with iACL IPv4 UDP src-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add UDP source ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | source -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 - -| TC10: DUT with iACL IPv4 UDP dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 - -| TC11: DUT with iACL IPv4 UDP src-ports and dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add UDP source and destination ports to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 diff --git a/tests/func/iacl_base/eth2p-ethip6-ip6base-iaclbase-func.robot b/tests/func/iacl_base/eth2p-ethip6-ip6base-iaclbase-func.robot deleted file mode 100644 index 47daac02a5..0000000000 --- a/tests/func/iacl_base/eth2p-ethip6-ip6base-iaclbase-func.robot +++ /dev/null @@ -1,577 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Classify.Classify -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IPv6 routing with ingress ACL test cases* -| ... -| ... | Encapsulations: Eth-IPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv6 -| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with -| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv6 -| ... | routing and static routes. DUT1 is configured with iACL on link to TG, -| ... | iACL classification and permit/deny action are configured on a per test -| ... | case basis. Test ICMPv6 Echo Request packets are sent in one direction -| ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG -| ... | verifies if packets are dropped, or if received verifies packet IPv6 -| ... | src-addr, dst-addr and MAC addresses. - -*** Variables *** -| ${dut1_to_tg_ip}= | 3ffe:62::1 -| ${dut1_to_dut2_ip}= | 3ffe:63::1 -| ${dut1_to_dut2_ip_GW}= | 3ffe:63::2 -| ${dut2_to_dut1_ip}= | 3ffe:72::1 -| ${dut2_to_tg_ip}= | 3ffe:73::1 -| ${test_dst_ip}= | 3ffe:64::1 -| ${test_src_ip}= | 3ffe:61::1 -| ${non_drop_dst_ip}= | 3ffe:54::1 -| ${non_drop_src_ip}= | 3ffe:51::1 -| ${prefix_length}= | 64 -| ${ip_version}= | ip6 -| ${l2_table}= | l2 - -*** Test Cases *** -| TC01: DUT with iACL IPv6 src-addr drops matching pkts -| | [Documentation] -| | ... | On DUT1 add source IPv6 address to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | src -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${ip_version} | src | ${test_src_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC02: DUT with iACL IPv6 dst-addr drops matching pkts -| | [Documentation] -| | ... | On DUT1 add destination IPv6 address to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | dst -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${ip_version} | dst | ${test_dst_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC03: DUT with iACL IPv6 src-addr and dst-addr drops matching pkts -| | [Documentation] -| | ... | On DUT1 add source and destination IPv6 addresses to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | src -| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= -| | ... | And Vpp Creates Classify Table L3 | ${dut1_node} | ${ip_version} | dst -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_2} -| | ... | ${ip_version} | src | ${test_src_ip} -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} -| | ... | ${ip_version} | dst | ${test_dst_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2} -| | Then Send packet from Port to Port should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC04: DUT with iACL IPv6 protocol set to TCP drops matching pkts -| | [Documentation] -| | ... | On DUT1 add protocol mask and TCP protocol (0x06) to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex -| | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | 000000000000000000000000000000000000000006 -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 - -| TC05: DUT with iACL IPv6 protocol set to UDP drops matching pkts -| | [Documentation] -| | ... | On DUT1 add protocol mask and UDP protocol (0x11) to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex -| | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | 000000000000000000000000000000000000000011 -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 - -| TC06: DUT with iACL IPv6 TCP src-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP source ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | source -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20 - -| TC07: DUT with iACL IPv6 TCP dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110 - -| TC08: DUT with iACL IPv6 TCP src-ports and dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP source and destination ports to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 - -| TC09: DUT with iACL IPv6 UDP src-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add UDP source ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | source -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20 - -| TC10: DUT with iACL IPv6 UDP dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\ -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110 - -| TC11: DUT with iACL IPv6 UDP src-ports and dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add UDP source and destination ports to classify table\ -| | ... | with 'deny'. Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 - -| TC12: DUT with iACL MAC src-addr and iACL IPv6 UDP src-ports and dst-ports drops matching pkts -| | [Documentation] -| | ... | On DUT1 add source MAC address to classify (L2) table and add UDP\ -| | ... | source and destination ports to classify (hex) table with 'deny'. -| | ... | Make TG verify matching packets are dropped. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| | And Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | src | ${tg_to_dut1_mac} -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then Send TCP or UDP packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| | And Send TCP or UDP packet should failed | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 diff --git a/tests/func/ipv4/eth2p-ethip4-ip4base-func.robot b/tests/func/ipv4/eth2p-ethip4-ip4base-func.robot new file mode 100644 index 0000000000..020d1f143b --- /dev/null +++ b/tests/func/ipv4/eth2p-ethip4-ip4base-func.robot @@ -0,0 +1,138 @@ +# 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.NodePath +| Library | resources.libraries.python.Trace +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/ipv4.robot +| Force Tags | HW_ENV +| Suite Setup | Run Keywords +| ... | Setup all DUTs before test | AND +| ... | Setup all TGs before traffic script | AND +| ... | Update All Interface Data On All Nodes | ${nodes} | AND +| ... | Setup DUT nodes for IPv4 testing +| Test Setup | Run Keywords | Save VPP PIDs | AND +| ... | Clear interface counters on all vpp nodes in topology | ${nodes} +| Test Teardown | Run Keywords +| ... | Show packet trace on all DUTs | ${nodes} | AND +| ... | Show vpp trace dump on all DUTs | AND +| ... | Check VPP PID in Teardown +| Documentation | *IPv4 routing test cases* +| ... +| ... | RFC791 IPv4, RFC826 ARP, RFC792 ICMPv4. Encapsulations: Eth-IPv4-ICMPv4 +| ... | on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 routing tests use circular +| ... | 3-node topology TG - DUT1 - DUT2 - TG with one link between the nodes. +| ... | DUT1 and DUT2 are configured with IPv4 routing and static routes. Test +| ... | ICMPv4 Echo Request packets are sent in both directions by TG on links +| ... | to DUT1 and DUT2 and received on TG links on the other side of circular +| ... | topology. On receive TG verifies packets IPv4 src-addr, dst-addr and MAC +| ... | addresses. + +*** Test Cases *** + +| TC01: DUT replies to ICMPv4 Echo Req to its ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req to DUT ingress interface. Make TG\ +| | ... | verify ICMP Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} +| | Compute Path +| | ${src_port} | ${src_node}= | First Interface +| | ${dst_port} | ${dst_node}= | Last Interface +| | ${hops}= | Set Variable | ${0} +| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 + +| TC02: DUT routes IPv4 to its egress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface\ +| | ... | connected to DUT2. Make TG verify ICMPv4 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} +| | Compute Path +| | ${src_port} | ${src_node}= | First Interface +| | ${dst_port} | ${dst_node}= | Last Egress Interface +| | ${hops}= | Set Variable | ${0} +| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 + +| TC03: DUT1 routes IPv4 to DUT2 ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req towards DUT2 ingress interface\ +| | ... | connected to DUT1. Make TG verify ICMPv4 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} +| | Compute Path +| | ${src_port} | ${src_node}= | First Interface +| | ${dst_port} | ${dst_node}= | Last Interface +| | ${hops}= | Set Variable | ${1} +| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 + +| TC04: DUT1 routes IPv4 to DUT2 egress interface +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req towards DUT2 egress interface\ +| | ... | connected to TG. Make TG verify ICMPv4 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Compute Path +| | ${src_port} | ${src_node}= | First Interface +| | ${dst_port} | ${dst_node}= | Last Egress Interface +| | ${hops}= | Set Variable | ${1} +| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 + +| TC05: DUT1 and DUT2 route IPv4 between TG interfaces +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1\ +| | ... | and DUT2. Make TG verify ICMPv4 Echo Replies are correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Compute Path +| | ${src_port} | ${src_node}= | First Interface +| | ${dst_port} | ${dst_node}= | Last Interface +| | ${hops}= | Set Variable | ${2} +| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 + +| TC06: DUT replies to ICMPv4 Echo Reqs with size 64B-to-1500B-incr-1B +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 64B to 1500B with increment step +| | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 + +| TC07: DUT replies to ICMPv4 Echo Reqs with size 1500B-to-9000B-incr-10B +| | [Documentation] +| | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 1500B to 9000B with increment +| | ... | step of 10Bytes. Make TG verify ICMPv4 Echo Replies are correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO +| | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']} +| | [Teardown] | Run keywords +| | ... | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']} +| | ... | AND | Check VPP PID in Teardown +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} +| | Compute Path +| | ${dut_port} | ${dut_node}= | Last Interface +| | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port} +| | # ICMP payload size is frame size minus size of Ehternet header, FCS, +| | # IPv4 header and ICMP header +| | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 20 - 8 +| | Run Keyword If | ${mtu} > 1518 +| | ... | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | 1452 | ${end_size} | 10 + +| TC08: DUT replies to ARP request +| | [Documentation] +| | ... | Make TG send ARP Request to DUT and verify ARP Reply is correct.\ +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Send ARP request and validate response | ${nodes['TG']} | ${nodes['DUT1']} diff --git a/tests/func/ipv4/eth2p-ethip4-ip4base-ip4arp-func.robot b/tests/func/ipv4/eth2p-ethip4-ip4base-ip4arp-func.robot new file mode 100644 index 0000000000..0950610559 --- /dev/null +++ b/tests/func/ipv4/eth2p-ethip4-ip4base-ip4arp-func.robot @@ -0,0 +1,82 @@ +# 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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IPv4 ARP test cases* +| ... +| ... | RFC826 ARP: Eth-IPv4 and Eth-ARP on links TG-DUT1, TG-DUT2, DUT1-DUT2: +| ... | IPv4 ARP tests use 3-node topology TG - DUT1 - DUT2 - TG with one link +| ... | between the nodes. DUT1 and DUT2 are configured with IPv4 routing and +| ... | static routes. DUT ARP functionality is tested by making TG send ICMPv4 +| ... | Echo Requests towards its other interface via DUT1 and DUT2. + +*** Variables *** +| ${dut1_to_tg_ip}= | 192.168.1.1 +| ${dut1_to_dut2_ip}= | 192.168.2.1 +| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 +| ${test_dst_ip}= | 32.0.0.1 +| ${test_src_ip}= | 16.0.0.1 +| ${prefix_length}= | 24 + +*** Test Cases *** +| TC01: DUT sends ARP Request for unresolved locally connected IPv4 address +| | [Documentation] +| | ... | Make TG send test packet destined to IPv4 address of its other\ +| | ... | interface connected to DUT2. Make TG verify DUT2 sends ARP +| | ... | Request for locally connected TG IPv4 address. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | Then Send Packet And Check ARP Request | ${tg_node} +| | ... | ${test_src_ip} | ${dut1_to_dut2_ip_GW} | ${tg_to_dut1} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} +| | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW} + +| TC02: DUT sends ARP Request for route next hop IPv4 address +| | [Documentation] | +| | ... | Make TG send test packet destined to IPv4 address matching\ +| | ... | static route on DUT2. Make TG verify DUT2 sends ARP Request for +| | ... | next hop of the static route. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} +| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} | resolve_attempts=${NONE} +| | Then Send Packet And Check ARP Request | ${tg_node} +| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} +| | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW} diff --git a/tests/func/ipv4/eth2p-ethip4-ip4base-ip4ecmp-func.robot b/tests/func/ipv4/eth2p-ethip4-ip4base-ip4ecmp-func.robot new file mode 100644 index 0000000000..f55ee64df9 --- /dev/null +++ b/tests/func/ipv4/eth2p-ethip4-ip4base-ip4ecmp-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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Ipv4 Multipath routing test cases* +| ... +| ... | *[Top] Network topologies:* TG=DUT 2-node topology with two links\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT configure interfaces IPv4 adresses,\ +| ... | and multipath routing. +| ... | *[Ver] TG verification:* Test packets are sent from TG on the first\ +| ... | link to DUT. Packet is received on TG on the second link from DUT1. + + +*** Variables *** +| ${ip_1}= | 192.168.1.1 +| ${ip_2}= | 192.168.2.1 +| ${test_dst_ip}= | 32.0.0.1 +| ${test_src_ip}= | 16.0.0.1 +| ${prefix_length}= | 24 +| ${neighbor_1_ip}= | 192.168.2.10 +| ${neighbor_1_mac}= | 02:00:00:00:00:02 +| ${neighbor_2_ip}= | 192.168.2.20 +| ${neighbor_2_mac}= | 02:00:00:00:00:03 + +*** Test Cases *** +| TC01: IPv4 Equal-cost multipath routing +| | [Documentation] +| | ... | [Top] TG=DUT +| | ... | [Cfg] On DUT configure multipath routing wiht two equal-cost paths. +| | ... | [Ver] TG sends 100 IPv4 ICMP packets traffic on the first link to\ +| | ... | DUT. On second link to TG verify if traffic is divided into two paths. +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are UP +| | And Set Interface Address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${ip_1} | ${prefix_length} +| | And Set Interface Address | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${ip_2} | ${prefix_length} +| | And Add Arp On Dut +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_1_ip} | ${neighbor_1_mac} +| | And Add Arp On Dut +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_2_ip} | ${neighbor_2_mac} +| | When Vpp Route Add +| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_1_ip} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} +| | And Vpp Route Add +| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_2_ip} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} +| | Then Send Packets And Check Multipath Routing | ${tg_node} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1} | ${test_src_ip} | ${test_dst_ip} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${dut_to_tg_if1_mac} +| | ... | ${neighbor_1_mac} | ${neighbor_2_mac} diff --git a/tests/func/ipv4/eth2p-ethip4-ip4base-ip4proxyarp-func.robot b/tests/func/ipv4/eth2p-ethip4-ip4base-ip4proxyarp-func.robot new file mode 100644 index 0000000000..765a54b6d5 --- /dev/null +++ b/tests/func/ipv4/eth2p-ethip4-ip4base-ip4proxyarp-func.robot @@ -0,0 +1,156 @@ +# 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/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.ProxyArp +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *RFC1027 Proxy ARP test cases* +| ... +| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with +| ... | single link between nodes. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with Proxy ARP +| ... | *[Ver] TG verification:* Test ARP Request packet is sent +| ... | from TG on link to DUT1; on receive TG verifies ARP reply packet +| ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC1027. + +*** Variables *** +| ${tg_to_dut1_ip}= | 10.0.0.100 +| ${dut1_to_tg_ip}= | 10.0.0.1 +| ${prefix_length}= | 24 +| ${lo_ip4_addr}= | 192.168.1.2 +| ${hi_ip4_addr}= | 192.168.1.10 +| ${pass_test_ip}= | 192.168.1.5 +| ${pass_test_lo_ip}= | 192.168.1.2 +| ${pass_test_hi_ip}= | 192.168.1.10 +| ${fail_test_lo_ip}= | 192.168.1.1 +| ${fail_test_hi_ip}= | 192.168.1.11 + +*** Test Cases *** +| TC01: DUT sends ARP reply on behalf of another machine from the IP range +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC1027. +| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP +| | ... | for IP range. +| | ... | [Ver] Make TG send ARP request to DUT1 interface, +| | ... | verify if DUT1 sends correct ARP reply on behalf of machine which +| | ... | IP is in range. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} +| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} +| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut1_ip} | ${pass_test_ip} + +| TC02: DUT sends ARP reply on behalf of another machine from beginning of the IP range +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC1027. +| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP +| | ... | for IP range. +| | ... | [Ver] Make TG send ARP request to DUT1 interface, +| | ... | verify if DUT1 sends correct ARP reply on behalf of machine which +| | ... | IP is from beginning of the IP range. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} +| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} +| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut1_ip} | ${pass_test_lo_ip} + +| TC03: DUT sends ARP reply on behalf of another machine from end of the IP range +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC1027. +| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP +| | ... | for IP range. +| | ... | [Ver] Make TG send ARP request to DUT1 interface, +| | ... | verify if DUT1 sends correct ARP reply on behalf of machine which +| | ... | IP is from end of the IP range. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} +| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} +| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut1_ip} | ${pass_test_hi_ip} + +| TC04: DUT does not send ARP reply on behalf of another machine from below of the IP range +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC1027. +| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP +| | ... | for IP range. +| | ... | [Ver] Make TG send ARP request to DUT1 interface, +| | ... | verify if DUT1 does not send ARP reply on behalf of machine which +| | ... | IP is from below of the IP range. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} +| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} +| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send ARP Request should failed | ${tg_node} | ${tg_to_dut1_name} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut1_ip} | ${fail_test_lo_ip} + +| TC05: DUT does not send ARP reply on behalf of another machine from above of the IP range +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC1027. +| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP +| | ... | for IP range. +| | ... | [Ver] Make TG send ARP request to DUT1 interface, +| | ... | verify if DUT1 does not send ARP reply on behalf of machine which +| | ... | IP is from above of the IP range. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} +| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} +| | When Set Interface Address | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} +| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send ARP Request should failed | ${tg_node} | ${tg_to_dut1_name} +| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut1_ip} | ${fail_test_hi_ip} diff --git a/tests/func/ipv4_base/eth2p-ethip4-ip4base-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-func.robot deleted file mode 100644 index 020d1f143b..0000000000 --- a/tests/func/ipv4_base/eth2p-ethip4-ip4base-func.robot +++ /dev/null @@ -1,138 +0,0 @@ -# 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.NodePath -| Library | resources.libraries.python.Trace -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/ipv4.robot -| Force Tags | HW_ENV -| Suite Setup | Run Keywords -| ... | Setup all DUTs before test | AND -| ... | Setup all TGs before traffic script | AND -| ... | Update All Interface Data On All Nodes | ${nodes} | AND -| ... | Setup DUT nodes for IPv4 testing -| Test Setup | Run Keywords | Save VPP PIDs | AND -| ... | Clear interface counters on all vpp nodes in topology | ${nodes} -| Test Teardown | Run Keywords -| ... | Show packet trace on all DUTs | ${nodes} | AND -| ... | Show vpp trace dump on all DUTs | AND -| ... | Check VPP PID in Teardown -| Documentation | *IPv4 routing test cases* -| ... -| ... | RFC791 IPv4, RFC826 ARP, RFC792 ICMPv4. Encapsulations: Eth-IPv4-ICMPv4 -| ... | on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 routing tests use circular -| ... | 3-node topology TG - DUT1 - DUT2 - TG with one link between the nodes. -| ... | DUT1 and DUT2 are configured with IPv4 routing and static routes. Test -| ... | ICMPv4 Echo Request packets are sent in both directions by TG on links -| ... | to DUT1 and DUT2 and received on TG links on the other side of circular -| ... | topology. On receive TG verifies packets IPv4 src-addr, dst-addr and MAC -| ... | addresses. - -*** Test Cases *** - -| TC01: DUT replies to ICMPv4 Echo Req to its ingress interface -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Req to DUT ingress interface. Make TG\ -| | ... | verify ICMP Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} -| | Compute Path -| | ${src_port} | ${src_node}= | First Interface -| | ${dst_port} | ${dst_node}= | Last Interface -| | ${hops}= | Set Variable | ${0} -| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 - -| TC02: DUT routes IPv4 to its egress interface -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface\ -| | ... | connected to DUT2. Make TG verify ICMPv4 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} -| | Compute Path -| | ${src_port} | ${src_node}= | First Interface -| | ${dst_port} | ${dst_node}= | Last Egress Interface -| | ${hops}= | Set Variable | ${0} -| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 - -| TC03: DUT1 routes IPv4 to DUT2 ingress interface -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Req towards DUT2 ingress interface\ -| | ... | connected to DUT1. Make TG verify ICMPv4 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} -| | Compute Path -| | ${src_port} | ${src_node}= | First Interface -| | ${dst_port} | ${dst_node}= | Last Interface -| | ${hops}= | Set Variable | ${1} -| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 - -| TC04: DUT1 routes IPv4 to DUT2 egress interface -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Req towards DUT2 egress interface\ -| | ... | connected to TG. Make TG verify ICMPv4 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Compute Path -| | ${src_port} | ${src_node}= | First Interface -| | ${dst_port} | ${dst_node}= | Last Egress Interface -| | ${hops}= | Set Variable | ${1} -| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 - -| TC05: DUT1 and DUT2 route IPv4 between TG interfaces -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1\ -| | ... | and DUT2. Make TG verify ICMPv4 Echo Replies are correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Compute Path -| | ${src_port} | ${src_node}= | First Interface -| | ${dst_port} | ${dst_node}= | Last Interface -| | ${hops}= | Set Variable | ${2} -| | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4 - -| TC06: DUT replies to ICMPv4 Echo Reqs with size 64B-to-1500B-incr-1B -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\ -| | ... | incrementating frame size from 64B to 1500B with increment step -| | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 - -| TC07: DUT replies to ICMPv4 Echo Reqs with size 1500B-to-9000B-incr-10B -| | [Documentation] -| | ... | Make TG send ICMPv4 Echo Reqs to DUT ingress interface,\ -| | ... | incrementating frame size from 1500B to 9000B with increment -| | ... | step of 10Bytes. Make TG verify ICMPv4 Echo Replies are correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO -| | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']} -| | [Teardown] | Run keywords -| | ... | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']} -| | ... | AND | Check VPP PID in Teardown -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} -| | Compute Path -| | ${dut_port} | ${dut_node}= | Last Interface -| | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port} -| | # ICMP payload size is frame size minus size of Ehternet header, FCS, -| | # IPv4 header and ICMP header -| | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 20 - 8 -| | Run Keyword If | ${mtu} > 1518 -| | ... | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | 1452 | ${end_size} | 10 - -| TC08: DUT replies to ARP request -| | [Documentation] -| | ... | Make TG send ARP Request to DUT and verify ARP Reply is correct.\ -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Send ARP request and validate response | ${nodes['TG']} | ${nodes['DUT1']} diff --git a/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4arp-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4arp-func.robot deleted file mode 100644 index 0950610559..0000000000 --- a/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4arp-func.robot +++ /dev/null @@ -1,82 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IPv4 ARP test cases* -| ... -| ... | RFC826 ARP: Eth-IPv4 and Eth-ARP on links TG-DUT1, TG-DUT2, DUT1-DUT2: -| ... | IPv4 ARP tests use 3-node topology TG - DUT1 - DUT2 - TG with one link -| ... | between the nodes. DUT1 and DUT2 are configured with IPv4 routing and -| ... | static routes. DUT ARP functionality is tested by making TG send ICMPv4 -| ... | Echo Requests towards its other interface via DUT1 and DUT2. - -*** Variables *** -| ${dut1_to_tg_ip}= | 192.168.1.1 -| ${dut1_to_dut2_ip}= | 192.168.2.1 -| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 -| ${prefix_length}= | 24 - -*** Test Cases *** -| TC01: DUT sends ARP Request for unresolved locally connected IPv4 address -| | [Documentation] -| | ... | Make TG send test packet destined to IPv4 address of its other\ -| | ... | interface connected to DUT2. Make TG verify DUT2 sends ARP -| | ... | Request for locally connected TG IPv4 address. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | Then Send Packet And Check ARP Request | ${tg_node} -| | ... | ${test_src_ip} | ${dut1_to_dut2_ip_GW} | ${tg_to_dut1} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW} - -| TC02: DUT sends ARP Request for route next hop IPv4 address -| | [Documentation] | -| | ... | Make TG send test packet destined to IPv4 address matching\ -| | ... | static route on DUT2. Make TG verify DUT2 sends ARP Request for -| | ... | next hop of the static route. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} | resolve_attempts=${NONE} -| | Then Send Packet And Check ARP Request | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW} diff --git a/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot deleted file mode 100644 index f55ee64df9..0000000000 --- a/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot +++ /dev/null @@ -1,74 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *Ipv4 Multipath routing test cases* -| ... -| ... | *[Top] Network topologies:* TG=DUT 2-node topology with two links\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT configure interfaces IPv4 adresses,\ -| ... | and multipath routing. -| ... | *[Ver] TG verification:* Test packets are sent from TG on the first\ -| ... | link to DUT. Packet is received on TG on the second link from DUT1. - - -*** Variables *** -| ${ip_1}= | 192.168.1.1 -| ${ip_2}= | 192.168.2.1 -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 -| ${prefix_length}= | 24 -| ${neighbor_1_ip}= | 192.168.2.10 -| ${neighbor_1_mac}= | 02:00:00:00:00:02 -| ${neighbor_2_ip}= | 192.168.2.20 -| ${neighbor_2_mac}= | 02:00:00:00:00:03 - -*** Test Cases *** -| TC01: IPv4 Equal-cost multipath routing -| | [Documentation] -| | ... | [Top] TG=DUT -| | ... | [Cfg] On DUT configure multipath routing wiht two equal-cost paths. -| | ... | [Ver] TG sends 100 IPv4 ICMP packets traffic on the first link to\ -| | ... | DUT. On second link to TG verify if traffic is divided into two paths. -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are UP -| | And Set Interface Address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${ip_1} | ${prefix_length} -| | And Set Interface Address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${ip_2} | ${prefix_length} -| | And Add Arp On Dut -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_1_ip} | ${neighbor_1_mac} -| | And Add Arp On Dut -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_2_ip} | ${neighbor_2_mac} -| | When Vpp Route Add -| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_1_ip} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} -| | And Vpp Route Add -| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_2_ip} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} -| | Then Send Packets And Check Multipath Routing | ${tg_node} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1} | ${test_src_ip} | ${test_dst_ip} -| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${dut_to_tg_if1_mac} -| | ... | ${neighbor_1_mac} | ${neighbor_2_mac} diff --git a/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot deleted file mode 100644 index 765a54b6d5..0000000000 --- a/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot +++ /dev/null @@ -1,156 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.ProxyArp -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *RFC1027 Proxy ARP test cases* -| ... -| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with -| ... | single link between nodes. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with Proxy ARP -| ... | *[Ver] TG verification:* Test ARP Request packet is sent -| ... | from TG on link to DUT1; on receive TG verifies ARP reply packet -| ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC1027. - -*** Variables *** -| ${tg_to_dut1_ip}= | 10.0.0.100 -| ${dut1_to_tg_ip}= | 10.0.0.1 -| ${prefix_length}= | 24 -| ${lo_ip4_addr}= | 192.168.1.2 -| ${hi_ip4_addr}= | 192.168.1.10 -| ${pass_test_ip}= | 192.168.1.5 -| ${pass_test_lo_ip}= | 192.168.1.2 -| ${pass_test_hi_ip}= | 192.168.1.10 -| ${fail_test_lo_ip}= | 192.168.1.1 -| ${fail_test_hi_ip}= | 192.168.1.11 - -*** Test Cases *** -| TC01: DUT sends ARP reply on behalf of another machine from the IP range -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC1027. -| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP -| | ... | for IP range. -| | ... | [Ver] Make TG send ARP request to DUT1 interface, -| | ... | verify if DUT1 sends correct ARP reply on behalf of machine which -| | ... | IP is in range. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} -| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} -| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut1_ip} | ${pass_test_ip} - -| TC02: DUT sends ARP reply on behalf of another machine from beginning of the IP range -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC1027. -| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP -| | ... | for IP range. -| | ... | [Ver] Make TG send ARP request to DUT1 interface, -| | ... | verify if DUT1 sends correct ARP reply on behalf of machine which -| | ... | IP is from beginning of the IP range. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} -| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} -| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut1_ip} | ${pass_test_lo_ip} - -| TC03: DUT sends ARP reply on behalf of another machine from end of the IP range -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC1027. -| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP -| | ... | for IP range. -| | ... | [Ver] Make TG send ARP request to DUT1 interface, -| | ... | verify if DUT1 sends correct ARP reply on behalf of machine which -| | ... | IP is from end of the IP range. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} -| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} -| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut1_ip} | ${pass_test_hi_ip} - -| TC04: DUT does not send ARP reply on behalf of another machine from below of the IP range -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC1027. -| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP -| | ... | for IP range. -| | ... | [Ver] Make TG send ARP request to DUT1 interface, -| | ... | verify if DUT1 does not send ARP reply on behalf of machine which -| | ... | IP is from below of the IP range. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} -| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} -| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send ARP Request should failed | ${tg_node} | ${tg_to_dut1_name} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut1_ip} | ${fail_test_lo_ip} - -| TC05: DUT does not send ARP reply on behalf of another machine from above of the IP range -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC1027. -| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP -| | ... | for IP range. -| | ... | [Ver] Make TG send ARP request to DUT1 interface, -| | ... | verify if DUT1 does not send ARP reply on behalf of machine which -| | ... | IP is from above of the IP range. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg} -| | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1} -| | When Set Interface Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr} -| | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send ARP Request should failed | ${tg_node} | ${tg_to_dut1_name} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut1_ip} | ${fail_test_hi_ip} diff --git a/tests/func/ipv6/eth2p-ethip6-ip6base-func.robot b/tests/func/ipv6/eth2p-ethip6-ip6base-func.robot new file mode 100644 index 0000000000..6048daad67 --- /dev/null +++ b/tests/func/ipv6/eth2p-ethip6-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 *** +| Library | resources.libraries.python.Trace +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/default.robot +| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes} +| Force Tags | HW_ENV +| Suite Setup | Run Keywords +| ... | Setup ipv6 to all dut in topology | ${nodes} | ${nodes_ipv6_addr} | AND +| ... | Vpp nodes ra suppress link layer | ${nodes} | AND +| ... | Vpp nodes setup ipv6 routing | ${nodes} | ${nodes_ipv6_addr} | AND +| ... | Setup all TGs before traffic script +| Test Setup | Run Keywords | Save VPP PIDs | AND +| ... | Clear interface counters on all vpp nodes in topology | ${nodes} +| Test Teardown | Run Keywords +| ... | Show packet trace on all DUTs | ${nodes} | AND +| ... | Show vpp trace dump on all DUTs | AND +| ... | Check VPP PID in Teardown +| Documentation | *IPv6 routing test cases* +| ... +| ... | RFC2460 IPv6, RFC4443 ICMPv6, RFC4861 Neighbor Discovery. +| ... | Encapsulations: Eth-IPv6-ICMPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2; +| ... | Eth-IPv6-NS/NA on links TG-DUT. IPv6 routing tests use circular 3-node +| ... | topology TG - DUT1 - DUT2 - TG with one link between the nodes. DUT1 and +| ... | DUT2 are configured with IPv6 routing and static routes. Test ICMPv6 +| ... | Echo Request packets are sent in both directions by TG on links to DUT1 +| ... | and DUT2 and received on TG links on the other side of circular +| ... | topology. On receive TG verifies packets IPv6 src-addr, dst-addr and MAC +| ... | addresses. + +*** Test Cases *** +| TC01: DUT replies to ICMPv6 Echo Req to its ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req to DUT ingress interface. Make TG\ +| | ... | verify ICMPv6 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 icmp echo | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr} + +| TC02: DUT replies to ICMPv6 Echo Req pkt with size 64B-to-1500B-incr-1B +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 64B to 1500B with increment step +| | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 | ${nodes_ipv6_addr} + +| TC03: DUT replies to ICMPv6 Echo Req pkt with size 1500B-to-9000B-incr-10B +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\ +| | ... | incrementating frame size from 1500B to 9000B with increment +| | ... | step of 10Bytes. Make TG verify ICMPv6 Echo Replies are correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO +| | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']} +| | [Teardown] | Run keywords +| | ... | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']} +| | ... | AND | Check VPP PID in Teardown +| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} +| | Compute Path +| | ${dut_port} | ${dut_node}= | Last Interface +| | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port} +| | # ICMPv6 payload size is frame size minus size of Ehternet header, FCS, +| | # IPv6 header and ICMPv6 header +| | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 40 - 8 +| | Run Keyword If | ${mtu} > 1518 +| | ... | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | 1452 | ${end_size} | 10 | ${nodes_ipv6_addr} + +| TC04: DUT routes to its egress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface\ +| | ... | connected to DUT2. Make TG verify ICMPv6 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 tg to dut1 egress | ${nodes['TG']} | ${nodes['DUT1']} | +| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} + +| TC05: DUT1 routes to DUT2 ingress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req towards DUT2 ingress interface\ +| | ... | connected to DUT1. Make TG verify ICMPv6 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 tg to dut2 via dut1 | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} + +| TC06: DUT1 routes to DUT2 egress interface +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req towards DUT2 egress interface\ +| | ... | connected to TG. Make TG verify ICMPv6 Echo Reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 tg to dut2 egress via dut1 | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} + +| TC07: DUT1 and DUT2 route between TG interfaces +| | [Documentation] +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1\ +| | ... | and DUT2. Make TG verify ICMPv6 Echo Replies are correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 tg to tg routed | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} +| | ... | ${nodes_ipv6_addr} + +| TC08: DUT replies to IPv6 Neighbor Solicitation +| | [Documentation] +| | ... | On DUT configure interface IPv6 address in the main routing\ +| | ... | domain. Make TG send Neighbor Solicitation message on the link +| | ... | to DUT and verify DUT Neighbor Advertisement reply is correct. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV +| | Ipv6 neighbor solicitation | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr} diff --git a/tests/func/ipv6/eth2p-ethip6-ip6base-ip6ecmp-func.robot b/tests/func/ipv6/eth2p-ethip6-ip6base-ip6ecmp-func.robot new file mode 100644 index 0000000000..fddf3a98a8 --- /dev/null +++ b/tests/func/ipv6/eth2p-ethip6-ip6base-ip6ecmp-func.robot @@ -0,0 +1,73 @@ +# 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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Ipv6 Multipath routing test cases* +| ... +| ... | *[Top] Network topologies:* TG=DUT 2-node topology with two links\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT configure interfaces IPv4 adresses,\ +| ... | and multipath routing. +| ... | *[Ver] TG verification:* Test packets are sent from TG on the first\ +| ... | link to DUT. Packet is received on TG on the second link from DUT1. + +*** Variables *** +| ${ip_1}= | 3ffe:61::1 +| ${ip_2}= | 3ffe:62::1 +| ${test_dst_ip}= | 3ffe:71::1 +| ${test_src_ip}= | 3ffe:51::1 +| ${prefix_length}= | 64 +| ${neighbor_1_ip}= | 3ffe:62::2 +| ${neighbor_1_mac}= | 02:00:00:00:00:02 +| ${neighbor_2_ip}= | 3ffe:62::3 +| ${neighbor_2_mac}= | 02:00:00:00:00:03 + +*** Test Cases *** +| TC01: IPv6 Equal-cost multipath routing +| | [Documentation] +| | ... | [Top] TG=DUT +| | ... | [Cfg] On DUT configure multipath routing wiht two equal-cost paths. +| | ... | [Ver] TG sends 100 IPv6 ICMP packets traffic on the first link to\ +| | ... | DUT. On second link to TG verify if traffic is divided into two paths. +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are UP +| | And Vpp Set If Ipv6 Addr | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${ip_1} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${ip_2} | ${prefix_length} +| | And Add Ip Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_1_ip} | ${neighbor_1_mac} +| | And Add Ip Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_2_ip} | ${neighbor_2_mac} +| | When Vpp Route Add +| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_1_ip} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} +| | And Vpp Route Add +| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_2_ip} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} +| | Then Send Packets And Check Multipath Routing | ${tg_node} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1} | ${test_src_ip} | ${test_dst_ip} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${dut_to_tg_if1_mac} +| | ... | ${neighbor_1_mac} | ${neighbor_2_mac} diff --git a/tests/func/ipv6/eth2p-ethip6-ip6base-ip6ra-func.robot b/tests/func/ipv6/eth2p-ethip6-ip6base-ip6ra-func.robot new file mode 100644 index 0000000000..e45ce730c9 --- /dev/null +++ b/tests/func/ipv6/eth2p-ethip6-ip6base-ip6ra-func.robot @@ -0,0 +1,107 @@ +# 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/default.robot +| Resource | resources/libraries/robot/counters.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IPv6 Router Advertisement test cases* +| ... +| ... | RFC4861 Neighbor Discovery. Encapsulations: Eth-IPv6-RA on links +| ... | TG-DUT1. IPv6 Router Advertisement tests use 3-node topology TG - DUT1 - +| ... | DUT2 - TG with one link between the nodes. DUT1 and DUT2 are configured +| ... | with IPv6 routing and static routes. TG verifies received RA packets. + + +*** Variables *** +| ${dut1_to_tg_ip}= | 3ffe:62::1 +| ${tg_to_dut1_ip}= | 3ffe:62::2 +| ${prefix_length}= | 64 +| ${interval}= | 2 + +*** Test Cases *** +| TC01: DUT transmits RA on IPv6 enabled interface +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG. +| | ... | [Ver] Make TG wait for IPv6 Router Advertisement packet to be sent\ +| | ... | by DUT1 and verify the received RA packet is correct. +| | [Tags] | EXPECTED_FAILING +| | Given Path For 3-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces In 3-node Path Are Up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | When Vpp RA Send After Interval | ${dut1_node} | ${dut1_to_tg} +| | Then Receive And Check Router Advertisement Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${dut1_to_tg_mac} + +| TC02: DUT retransmits RA on IPv6 enabled interface after a set interval +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG. +| | ... | [Ver] Make TG wait for two IPv6 Router Advertisement packets\ +| | ... | to be sent by DUT1 and verify the received RA packets are correct. +| | [Tags] | EXPECTED_FAILING +| | Given Path For 3-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces In 3-node Path Are Up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | When Vpp RA Send After Interval | ${dut1_node} | ${dut1_to_tg} +| | ... | interval=${interval} +| | :FOR | ${n} | IN RANGE | ${2} +| | | Then Receive And Check Router Advertisement Packet +| | | ... | ${tg_node} | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${interval} + +| TC03: DUT responds to Router Solicitation request +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG and suppress\ +| | ... | sending of Router Advertisement packets periodically. +| | ... | [Ver] Make TG send IPv6 Router Solicitation request to DUT1, listen\ +| | ... | for response from DUT1 and verify the received RA packet is correct. +| | [Tags] | EXPECTED_FAILING +| | Given Path For 3-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces In 3-node Path Are Up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | When VPP RA Suppress Link Layer | ${dut1_node} | ${dut1_to_tg} +| | Then Send Router Solicitation And Check Response +| | ... | ${tg_node} | ${dut1_node} | ${tg_to_dut1} | ${dut1_to_tg} +| | ... | ${tg_to_dut1_ip} + +| TC04: DUT responds to Router Solicitation request sent from link local address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG and suppress\ +| | ... | sending of Router Advertisement packets periodically. +| | ... | [Ver] Make TG send IPv6 Router Solicitation request to DUT1, listen\ +| | ... | for response from DUT1 and verify the received RA packet is correct. +| | [Tags] | EXPECTED_FAILING +| | Given Path For 3-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces In 3-node Path Are Up +| | And Vpp Set If Ipv6 Addr | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} +| | When VPP RA Suppress Link Layer | ${dut1_node} | ${dut1_to_tg} +| | Then Send Router Solicitation And Check Response +| | ... | ${tg_node} | ${dut1_node} | ${tg_to_dut1} | ${dut1_to_tg} diff --git a/tests/func/ipv6_base/eth2p-ethip6-ip6base-func.robot b/tests/func/ipv6_base/eth2p-ethip6-ip6base-func.robot deleted file mode 100644 index 6048daad67..0000000000 --- a/tests/func/ipv6_base/eth2p-ethip6-ip6base-func.robot +++ /dev/null @@ -1,120 +0,0 @@ -# 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.Trace -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/default.robot -| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes} -| Force Tags | HW_ENV -| Suite Setup | Run Keywords -| ... | Setup ipv6 to all dut in topology | ${nodes} | ${nodes_ipv6_addr} | AND -| ... | Vpp nodes ra suppress link layer | ${nodes} | AND -| ... | Vpp nodes setup ipv6 routing | ${nodes} | ${nodes_ipv6_addr} | AND -| ... | Setup all TGs before traffic script -| Test Setup | Run Keywords | Save VPP PIDs | AND -| ... | Clear interface counters on all vpp nodes in topology | ${nodes} -| Test Teardown | Run Keywords -| ... | Show packet trace on all DUTs | ${nodes} | AND -| ... | Show vpp trace dump on all DUTs | AND -| ... | Check VPP PID in Teardown -| Documentation | *IPv6 routing test cases* -| ... -| ... | RFC2460 IPv6, RFC4443 ICMPv6, RFC4861 Neighbor Discovery. -| ... | Encapsulations: Eth-IPv6-ICMPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2; -| ... | Eth-IPv6-NS/NA on links TG-DUT. IPv6 routing tests use circular 3-node -| ... | topology TG - DUT1 - DUT2 - TG with one link between the nodes. DUT1 and -| ... | DUT2 are configured with IPv6 routing and static routes. Test ICMPv6 -| ... | Echo Request packets are sent in both directions by TG on links to DUT1 -| ... | and DUT2 and received on TG links on the other side of circular -| ... | topology. On receive TG verifies packets IPv6 src-addr, dst-addr and MAC -| ... | addresses. - -*** Test Cases *** -| TC01: DUT replies to ICMPv6 Echo Req to its ingress interface -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Req to DUT ingress interface. Make TG\ -| | ... | verify ICMPv6 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 icmp echo | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr} - -| TC02: DUT replies to ICMPv6 Echo Req pkt with size 64B-to-1500B-incr-1B -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\ -| | ... | incrementating frame size from 64B to 1500B with increment step -| | ... | of 1Byte. Make TG verify ICMP Echo Replies are correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | 0 | 1452 | 1 | ${nodes_ipv6_addr} - -| TC03: DUT replies to ICMPv6 Echo Req pkt with size 1500B-to-9000B-incr-10B -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Reqs to DUT ingress interface,\ -| | ... | incrementating frame size from 1500B to 9000B with increment -| | ... | step of 10Bytes. Make TG verify ICMPv6 Echo Replies are correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO -| | [Setup] | Setup MTU on TG based on MTU on DUT | ${nodes['TG']} | ${nodes['DUT1']} -| | [Teardown] | Run keywords -| | ... | Set default Ethernet MTU on all interfaces on node | ${nodes['TG']} -| | ... | AND | Check VPP PID in Teardown -| | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} -| | Compute Path -| | ${dut_port} | ${dut_node}= | Last Interface -| | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port} -| | # ICMPv6 payload size is frame size minus size of Ehternet header, FCS, -| | # IPv6 header and ICMPv6 header -| | ${end_size}= | Evaluate | ${mtu} - 14 - 4 - 40 - 8 -| | Run Keyword If | ${mtu} > 1518 -| | ... | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | 1452 | ${end_size} | 10 | ${nodes_ipv6_addr} - -| TC04: DUT routes to its egress interface -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface\ -| | ... | connected to DUT2. Make TG verify ICMPv6 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 tg to dut1 egress | ${nodes['TG']} | ${nodes['DUT1']} | -| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} - -| TC05: DUT1 routes to DUT2 ingress interface -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Req towards DUT2 ingress interface\ -| | ... | connected to DUT1. Make TG verify ICMPv6 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 tg to dut2 via dut1 | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} - -| TC06: DUT1 routes to DUT2 egress interface -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Req towards DUT2 egress interface\ -| | ... | connected to TG. Make TG verify ICMPv6 Echo Reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 tg to dut2 egress via dut1 | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr} - -| TC07: DUT1 and DUT2 route between TG interfaces -| | [Documentation] -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1\ -| | ... | and DUT2. Make TG verify ICMPv6 Echo Replies are correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 tg to tg routed | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} -| | ... | ${nodes_ipv6_addr} - -| TC08: DUT replies to IPv6 Neighbor Solicitation -| | [Documentation] -| | ... | On DUT configure interface IPv6 address in the main routing\ -| | ... | domain. Make TG send Neighbor Solicitation message on the link -| | ... | to DUT and verify DUT Neighbor Advertisement reply is correct. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | VM_ENV -| | Ipv6 neighbor solicitation | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr} diff --git a/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot b/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot deleted file mode 100644 index fddf3a98a8..0000000000 --- a/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot +++ /dev/null @@ -1,73 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *Ipv6 Multipath routing test cases* -| ... -| ... | *[Top] Network topologies:* TG=DUT 2-node topology with two links\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT configure interfaces IPv4 adresses,\ -| ... | and multipath routing. -| ... | *[Ver] TG verification:* Test packets are sent from TG on the first\ -| ... | link to DUT. Packet is received on TG on the second link from DUT1. - -*** Variables *** -| ${ip_1}= | 3ffe:61::1 -| ${ip_2}= | 3ffe:62::1 -| ${test_dst_ip}= | 3ffe:71::1 -| ${test_src_ip}= | 3ffe:51::1 -| ${prefix_length}= | 64 -| ${neighbor_1_ip}= | 3ffe:62::2 -| ${neighbor_1_mac}= | 02:00:00:00:00:02 -| ${neighbor_2_ip}= | 3ffe:62::3 -| ${neighbor_2_mac}= | 02:00:00:00:00:03 - -*** Test Cases *** -| TC01: IPv6 Equal-cost multipath routing -| | [Documentation] -| | ... | [Top] TG=DUT -| | ... | [Cfg] On DUT configure multipath routing wiht two equal-cost paths. -| | ... | [Ver] TG sends 100 IPv6 ICMP packets traffic on the first link to\ -| | ... | DUT. On second link to TG verify if traffic is divided into two paths. -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are UP -| | And Vpp Set If Ipv6 Addr | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${ip_1} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${ip_2} | ${prefix_length} -| | And Add Ip Neighbor -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_1_ip} | ${neighbor_1_mac} -| | And Add Ip Neighbor -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${neighbor_2_ip} | ${neighbor_2_mac} -| | When Vpp Route Add -| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_1_ip} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} -| | And Vpp Route Add -| | ... | ${dut_node} | ${test_dst_ip} | ${prefix_length} | ${neighbor_2_ip} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | multipath=${TRUE} -| | Then Send Packets And Check Multipath Routing | ${tg_node} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1} | ${test_src_ip} | ${test_dst_ip} -| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${dut_to_tg_if1_mac} -| | ... | ${neighbor_1_mac} | ${neighbor_2_mac} diff --git a/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ra-func.robot b/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ra-func.robot deleted file mode 100644 index e45ce730c9..0000000000 --- a/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ra-func.robot +++ /dev/null @@ -1,107 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/counters.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IPv6 Router Advertisement test cases* -| ... -| ... | RFC4861 Neighbor Discovery. Encapsulations: Eth-IPv6-RA on links -| ... | TG-DUT1. IPv6 Router Advertisement tests use 3-node topology TG - DUT1 - -| ... | DUT2 - TG with one link between the nodes. DUT1 and DUT2 are configured -| ... | with IPv6 routing and static routes. TG verifies received RA packets. - - -*** Variables *** -| ${dut1_to_tg_ip}= | 3ffe:62::1 -| ${tg_to_dut1_ip}= | 3ffe:62::2 -| ${prefix_length}= | 64 -| ${interval}= | 2 - -*** Test Cases *** -| TC01: DUT transmits RA on IPv6 enabled interface -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG. -| | ... | [Ver] Make TG wait for IPv6 Router Advertisement packet to be sent\ -| | ... | by DUT1 and verify the received RA packet is correct. -| | [Tags] | EXPECTED_FAILING -| | Given Path For 3-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces In 3-node Path Are Up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | When Vpp RA Send After Interval | ${dut1_node} | ${dut1_to_tg} -| | Then Receive And Check Router Advertisement Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${dut1_to_tg_mac} - -| TC02: DUT retransmits RA on IPv6 enabled interface after a set interval -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG. -| | ... | [Ver] Make TG wait for two IPv6 Router Advertisement packets\ -| | ... | to be sent by DUT1 and verify the received RA packets are correct. -| | [Tags] | EXPECTED_FAILING -| | Given Path For 3-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces In 3-node Path Are Up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | When Vpp RA Send After Interval | ${dut1_node} | ${dut1_to_tg} -| | ... | interval=${interval} -| | :FOR | ${n} | IN RANGE | ${2} -| | | Then Receive And Check Router Advertisement Packet -| | | ... | ${tg_node} | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${interval} - -| TC03: DUT responds to Router Solicitation request -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG and suppress\ -| | ... | sending of Router Advertisement packets periodically. -| | ... | [Ver] Make TG send IPv6 Router Solicitation request to DUT1, listen\ -| | ... | for response from DUT1 and verify the received RA packet is correct. -| | [Tags] | EXPECTED_FAILING -| | Given Path For 3-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces In 3-node Path Are Up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | When VPP RA Suppress Link Layer | ${dut1_node} | ${dut1_to_tg} -| | Then Send Router Solicitation And Check Response -| | ... | ${tg_node} | ${dut1_node} | ${tg_to_dut1} | ${dut1_to_tg} -| | ... | ${tg_to_dut1_ip} - -| TC04: DUT responds to Router Solicitation request sent from link local address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG and suppress\ -| | ... | sending of Router Advertisement packets periodically. -| | ... | [Ver] Make TG send IPv6 Router Solicitation request to DUT1, listen\ -| | ... | for response from DUT1 and verify the received RA packet is correct. -| | [Tags] | EXPECTED_FAILING -| | Given Path For 3-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces In 3-node Path Are Up -| | And Vpp Set If Ipv6 Addr | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | When VPP RA Suppress Link Layer | ${dut1_node} | ${dut1_to_tg} -| | Then Send Router Solicitation And Check Response -| | ... | ${tg_node} | ${dut1_node} | ${tg_to_dut1} | ${dut1_to_tg} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..b2279b90fc --- /dev/null +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-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/default.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 bridge-domain test cases* +| ... +| ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM +| ... | and double parallel links. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply +| ... | to all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 bridge-domains +| ... | (L2BD) switching combined with MAC learning enabled. +| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets +| ... | are sent in both directions by TG on links to DUT1 via VM; on +| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 + +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +*** Test Cases *** +| TC01: DUT with two L2BDs (MAC learn) switches ICMPv4 between TG and VM links +| | [Documentation] +| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \ +| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local +| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two +| | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are +| | ... | switched thru DUT1 and VM in both directions and are correct on +| | ... | receive. [Ref] +| | ... +| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} +| | ... | AND | Func Test Teardown +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${bd_id2} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} +| | ... | ${bd_id2} +| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} +| | ... | ${sock2} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} + +| TC02: DUT with two L2BDs (MAC learn) switches ICMPv6 between TG and VM links +| | [Documentation] +| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \ +| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local +| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two +| | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are +| | ... | switched thru DUT1 and VM in both directions and are correct on +| | ... | receive. [Ref] +| | ... +| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} +| | ... | AND | Func Test Teardown +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${bd_id2} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} +| | ... | ${bd_id2} +| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} +| | ... | ${sock2} +| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..a0336e5cc8 --- /dev/null +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemaclrn-func.robot @@ -0,0 +1,90 @@ +# 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/default.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 bridge-domain 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-ICMPv4 for L2 switching of +| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply +| ... | to all links. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled. +| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 + +*** Test Cases *** +| TC01: DUT reports active interfaces +| | [Documentation] +| | ... | [Top] TG=DUT1; TG-DUT1-DUT2-TG. [Enc] None. [Cfg] Discovered \ +| | ... | active interfaces. [Ver] Report active interfaces on DUT. [Ref] +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | 3_NODE_SINGLE_LINK_TOPO +| | VPP reports interfaces on | ${nodes['DUT1']} + +| TC02: DUT with L2BD (MAC learning) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \ +| | ... | two i/fs into L2BD with MAC learning. [Ver] Make TG verify +| | ... | ICMPv4 Echo Req pkts are switched thru DUT1 in both directions +| | ... | and are correct on receive. [Ref] +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${bd_id1} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} + +| TC03: DUT1 and DUT2 with L2BD (MAC learning) switch between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [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] +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id2} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${bd_id2} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..ad5258bb9a --- /dev/null +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot @@ -0,0 +1,154 @@ +# 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/default.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 bridge-domain test cases* +| ... +| ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM +| ... | and double parallel links. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply +| ... | to all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 bridge-domains +| ... | (L2BD) switching combined with static MACs. +| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets +| ... | are sent in both directions by TG on links to DUT1 via VM; on +| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 + +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +*** Test Cases *** +| TC01: DUT with two L2BDs (static MACs) switches ICMPv4 between TG and VM links +| | [Documentation] +| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \ +| | ... | two L2BDs with static MACs, each with vhost-user i/f to local VM +| | ... | and i/f to TG; configure VM to loop pkts back betwen its two +| | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are +| | ... | switched thru DUT1 and VM in both directions and are correct on +| | ... | receive. [Ref] +| | ... +| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} +| | ... | AND | Func Test Teardown +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} +| | ... | learn=${FALSE} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} +| | ... | ${bd_id1} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${vhost_if1} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} +| | ... | learn=${FALSE} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${bd_id2} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} +| | ... | ${bd_id2} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if2} +| | ... | ${bd_id2} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${vhost_if2} +| | ... | ${bd_id2} +| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} +| | ... | ${sock2} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} + +| TC02: DUT with two L2BDs (static MACs) switches ICMPv6 between TG and VM links +| | [Documentation] +| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \ +| | ... | two L2BDs with static MACs, each with vhost-user i/f to local VM +| | ... | and i/f to TG; configure VM to loop pkts back betwen its two +| | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are +| | ... | switched thru DUT1 and VM in both directions and are correct on +| | ... | receive. [Ref] +| | ... +| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} +| | ... | AND | Func Test Teardown +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} +| | ... | learn=${FALSE} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} +| | ... | ${bd_id1} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${vhost_if1} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} +| | ... | learn=${FALSE} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${bd_id2} +| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} +| | ... | ${bd_id2} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if2} +| | ... | ${dut_node} +| | ... | ${dut_to_tg_if2} +| | ... | ${bd_id2} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut_if1} +| | ... | ${dut_node} +| | ... | ${vhost_if2} +| | ... | ${bd_id2} +| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} +| | ... | ${sock2} +| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} diff --git a/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot new file mode 100644 index 0000000000..271852e7e6 --- /dev/null +++ b/tests/func/l2bd/eth2p-eth-l2bdbasemacstc-func.robot @@ -0,0 +1,86 @@ +# 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/default.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 bridge-domain test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply +| ... | to all links. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with static MACs. +| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD (static MACs) switch between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \ +| | ... | DUT2 configure two i/fs into L2BD with static MACs. [Ver] Make +| | ... | TG verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 +| | ... | in both directions and are correct on receive. [Ref] +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | ... | learn=${FALSE} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut1} +| | ... | ${dut1_node} +| | ... | ${dut1_to_tg} +| | ... | ${bd_id1} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut2} +| | ... | ${dut1_node} +| | ... | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2} +| | ... | learn=${FALSE} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id2} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${bd_id2} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut1} +| | ... | ${dut2_node} +| | ... | ${dut2_to_dut1} +| | ... | ${bd_id2} +| | And Destination port is added to L2FIB on DUT node | ${tg_node} +| | ... | ${tg_to_dut2} +| | ... | ${dut2_node} +| | ... | ${dut2_to_tg} +| | ... | ${bd_id2} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} diff --git a/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot b/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot new file mode 100644 index 0000000000..295a03eadc --- /dev/null +++ b/tests/func/l2bd/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot @@ -0,0 +1,93 @@ +# 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/default.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 bridge-domain test cases* +| ... +| ... | *[Top] Network Topologies:* TG=DUT1=DUT2=TG 3-node circular topology +| ... | with double parallel links. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply +| ... | to all links. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled +| ... | and Split Horizon Groups (SHG). +| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 + +| ${shg1}= | 3 +| ${shg2}= | 4 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD (MAC learn) and SHG switch between four TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \ +| | ... | DUT2 configure four i/fs into L2BD with MAC learning and the +| | ... | same SHG on i/fs towards TG. [Ver] Make TG verify ICMPv4 Echo +| | ... | Req pkts are switched thru DUT1 and DUT2 in both directions and +| | ... | are correct on receive; verify no pkts are switched thru SHG +| | ... | isolated interfaces. [Ref] +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']} +| | ... | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} +| | And Interfaces in 3-node BD-SHG testing are up +| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1} +| | ... | ${bd_id2} | ${shg2} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id2} | ${shg2} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${bd_id2} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if1} +| | And Send and receive ICMPv4 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if2} +| | And Send and receive ICMPv4 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if1} +| | And Send and receive ICMPv4 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if2} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMPv4 bidirectionally +| | | ... | ${tg_node} | ${tg_to_dut1_if1} +| | | ... | ${tg_to_dut1_if2} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMPv4 bidirectionally +| | | ... | ${tg_node} | ${tg_to_dut2_if1} +| | | ... | ${tg_to_dut2_if2} diff --git a/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot deleted file mode 100644 index b2279b90fc..0000000000 --- a/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot +++ /dev/null @@ -1,110 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge-domain test cases* -| ... -| ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM -| ... | and double parallel links. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of -| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply -| ... | to all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 bridge-domains -| ... | (L2BD) switching combined with MAC learning enabled. -| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets -| ... | are sent in both directions by TG on links to DUT1 via VM; on -| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) -| ... | src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 - -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 - -*** Test Cases *** -| TC01: DUT with two L2BDs (MAC learn) switches ICMPv4 between TG and VM links -| | [Documentation] -| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \ -| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local -| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two -| | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are -| | ... | switched thru DUT1 and VM in both directions and are correct on -| | ... | receive. [Ref] -| | ... -| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Func Test Teardown -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} -| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} - -| TC02: DUT with two L2BDs (MAC learn) switches ICMPv6 between TG and VM links -| | [Documentation] -| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \ -| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local -| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two -| | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are -| | ... | switched thru DUT1 and VM in both directions and are correct on -| | ... | receive. [Ref] -| | ... -| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Func Test Teardown -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} -| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} diff --git a/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot deleted file mode 100644 index a0336e5cc8..0000000000 --- a/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot +++ /dev/null @@ -1,90 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge-domain 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-ICMPv4 for L2 switching of -| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply -| ... | to all links. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) switching combined with MAC learning enabled. -| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) -| ... | src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 - -*** Test Cases *** -| TC01: DUT reports active interfaces -| | [Documentation] -| | ... | [Top] TG=DUT1; TG-DUT1-DUT2-TG. [Enc] None. [Cfg] Discovered \ -| | ... | active interfaces. [Ver] Report active interfaces on DUT. [Ref] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | 3_NODE_SINGLE_LINK_TOPO -| | VPP reports interfaces on | ${nodes['DUT1']} - -| TC02: DUT with L2BD (MAC learning) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \ -| | ... | two i/fs into L2BD with MAC learning. [Ver] Make TG verify -| | ... | ICMPv4 Echo Req pkts are switched thru DUT1 in both directions -| | ... | and are correct on receive. [Ref] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id1} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} - -| TC03: DUT1 and DUT2 with L2BD (MAC learning) switch between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [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] -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id2} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${bd_id2} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} diff --git a/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot deleted file mode 100644 index ad5258bb9a..0000000000 --- a/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot +++ /dev/null @@ -1,154 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge-domain test cases* -| ... -| ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM -| ... | and double parallel links. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of -| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply -| ... | to all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 bridge-domains -| ... | (L2BD) switching combined with static MACs. -| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets -| ... | are sent in both directions by TG on links to DUT1 via VM; on -| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) -| ... | src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 - -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 - -*** Test Cases *** -| TC01: DUT with two L2BDs (static MACs) switches ICMPv4 between TG and VM links -| | [Documentation] -| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \ -| | ... | two L2BDs with static MACs, each with vhost-user i/f to local VM -| | ... | and i/f to TG; configure VM to loop pkts back betwen its two -| | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are -| | ... | switched thru DUT1 and VM in both directions and are correct on -| | ... | receive. [Ref] -| | ... -| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Func Test Teardown -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} -| | ... | learn=${FALSE} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${vhost_if1} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} -| | ... | learn=${FALSE} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${vhost_if2} -| | ... | ${bd_id2} -| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} - -| TC02: DUT with two L2BDs (static MACs) switches ICMPv6 between TG and VM links -| | [Documentation] -| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \ -| | ... | two L2BDs with static MACs, each with vhost-user i/f to local VM -| | ... | and i/f to TG; configure VM to loop pkts back betwen its two -| | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are -| | ... | switched thru DUT1 and VM in both directions and are correct on -| | ... | receive. [Ref] -| | ... -| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Func Test Teardown -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1} -| | ... | learn=${FALSE} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1} -| | ... | ${bd_id1} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${vhost_if1} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2} -| | ... | learn=${FALSE} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2} -| | ... | ${bd_id2} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if2} -| | ... | ${dut_node} -| | ... | ${dut_to_tg_if2} -| | ... | ${bd_id2} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${dut_node} -| | ... | ${vhost_if2} -| | ... | ${bd_id2} -| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} diff --git a/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot deleted file mode 100644 index 271852e7e6..0000000000 --- a/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot +++ /dev/null @@ -1,86 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge-domain test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of -| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply -| ... | to all links. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) switching combined with static MACs. -| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) -| ... | src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2BD (static MACs) switch between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \ -| | ... | DUT2 configure two i/fs into L2BD with static MACs. [Ver] Make -| | ... | TG verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 -| | ... | in both directions and are correct on receive. [Ref] -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | ... | learn=${FALSE} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut1} -| | ... | ${dut1_node} -| | ... | ${dut1_to_tg} -| | ... | ${bd_id1} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut2} -| | ... | ${dut1_node} -| | ... | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2} -| | ... | learn=${FALSE} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id2} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${bd_id2} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut1} -| | ... | ${dut2_node} -| | ... | ${dut2_to_dut1} -| | ... | ${bd_id2} -| | And Destination port is added to L2FIB on DUT node | ${tg_node} -| | ... | ${tg_to_dut2} -| | ... | ${dut2_node} -| | ... | ${dut2_to_tg} -| | ... | ${bd_id2} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} diff --git a/tests/func/l2bd_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot b/tests/func/l2bd_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot deleted file mode 100644 index 295a03eadc..0000000000 --- a/tests/func/l2bd_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot +++ /dev/null @@ -1,93 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge-domain test cases* -| ... -| ... | *[Top] Network Topologies:* TG=DUT1=DUT2=TG 3-node circular topology -| ... | with double parallel links. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of -| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply -| ... | to all links. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) switching combined with MAC learning enabled -| ... | and Split Horizon Groups (SHG). -| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) -| ... | src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 - -| ${shg1}= | 3 -| ${shg2}= | 4 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2BD (MAC learn) and SHG switch between four TG links -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \ -| | ... | DUT2 configure four i/fs into L2BD with MAC learning and the -| | ... | same SHG on i/fs towards TG. [Ver] Make TG verify ICMPv4 Echo -| | ... | Req pkts are switched thru DUT1 and DUT2 in both directions and -| | ... | are correct on receive; verify no pkts are switched thru SHG -| | ... | isolated interfaces. [Ref] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']} -| | ... | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} -| | And Interfaces in 3-node BD-SHG testing are up -| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1} -| | ... | ${bd_id2} | ${shg2} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${bd_id2} | ${shg2} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${bd_id2} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if1} -| | And Send and receive ICMPv4 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if2} -| | And Send and receive ICMPv4 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if1} -| | And Send and receive ICMPv4 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if2} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMPv4 bidirectionally -| | | ... | ${tg_node} | ${tg_to_dut1_if1} -| | | ... | ${tg_to_dut1_if2} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMPv4 bidirectionally -| | | ... | ${tg_node} | ${tg_to_dut2_if1} -| | | ... | ${tg_to_dut2_if2} diff --git a/tests/func/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot b/tests/func/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..583a5ba052 --- /dev/null +++ b/tests/func/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-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 *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.NodePath +| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 cross-connect test cases* +| ... +| ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM and +| ... | double parallel links. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of IPv4; +| ... | Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect +| ... | (L2XC) switching. +| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are +| ... | sent in both directions by TG on links to DUT1 via VM; on receive TG +| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +*** Test Cases *** +| TC01: DUT with two L2XCs switches ICMPv4 between TG and local VM links +| | [Documentation] +| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \ +| | ... | two L2 cross-connects (L2XC), each with one untagged interface +| | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make +| | ... | TG send ICMPv4 Echo Reqs in both directions between two of its +| | ... | i/fs to be switched by DUT to and from VM; verify all packets +| | ... | are received. [Ref] +| | ... +| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} +| | ... | AND | Func Test Teardown +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1} +| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2} +| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} +| | ... | ${sock2} +| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} + +| TC02: DUT with two L2XCs switches ICMPv6 between TG and local VM links +| | [Documentation] +| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \ +| | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG +| | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send +| | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to +| | ... | be switched by DUT to and from VM; verify all packets are +| | ... | received. [Ref] +| | ... +| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} +| | ... | AND | Func Test Teardown +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1} +| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2} +| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} +| | ... | ${sock2} +| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} + diff --git a/tests/func/l2xc/eth2p-eth-l2xcbase-func.robot b/tests/func/l2xc/eth2p-eth-l2xcbase-func.robot new file mode 100644 index 0000000000..aa25225f44 --- /dev/null +++ b/tests/func/l2xc/eth2p-eth-l2xcbase-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/default.robot +| Resource | resources/libraries/robot/l2_xconnect.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.NodePath +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2 cross-connect test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of IPv4; +| ... | Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | cross-connect (L2XC) switching. +| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \ +| | ... | DUT2 configure L2 cross-connect (L2XC), each with one interface +| | ... | to TG and one Ethernet interface towards the other DUT. [Ver] +| | ... | Make TG send ICMPv4 Echo Req in both directions between two of +| | ... | its interfaces to be switched by DUT1 and DUT2; verify all +| | ... | packets are received. [Ref] +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | When All Vpp Interfaces Ready Wait | ${nodes} +| | Then Send and receive ICMPv4 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} + +| TC02: DUT1 and DUT2 with L2XC switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 and \ +| | ... | DUT2 configure L2 cross-connect (L2XC), each with one interface +| | ... | to TG and one Ethernet interface towards the other DUT. [Ver] +| | ... | Make TG send ICMPv6 Echo Req in both directions between two of +| | ... | its interfaces to be switched by DUT1 and DUT2; verify all +| | ... | packets are received. [Ref] +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And L2 setup xconnect on DUT +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | When All Vpp Interfaces Ready Wait | ${nodes} +| | Then Send and receive ICMPv6 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot b/tests/func/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot deleted file mode 100644 index 583a5ba052..0000000000 --- a/tests/func/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot +++ /dev/null @@ -1,95 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.NodePath -| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 cross-connect test cases* -| ... -| ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM and -| ... | double parallel links. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of IPv4; -| ... | Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect -| ... | (L2XC) switching. -| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are -| ... | sent in both directions by TG on links to DUT1 via VM; on receive TG -| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr, -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 - -*** Test Cases *** -| TC01: DUT with two L2XCs switches ICMPv4 between TG and local VM links -| | [Documentation] -| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \ -| | ... | two L2 cross-connects (L2XC), each with one untagged interface -| | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make -| | ... | TG send ICMPv4 Echo Reqs in both directions between two of its -| | ... | i/fs to be switched by DUT to and from VM; verify all packets -| | ... | are received. [Ref] -| | ... -| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Func Test Teardown -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1} -| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2} -| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} - -| TC02: DUT with two L2XCs switches ICMPv6 between TG and local VM links -| | [Documentation] -| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \ -| | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG -| | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send -| | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to -| | ... | be switched by DUT to and from VM; verify all packets are -| | ... | received. [Ref] -| | ... -| | [Teardown] | Run Keywords | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Func Test Teardown -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1} -| | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2} -| | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1} -| | ... | ${sock2} -| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} - diff --git a/tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot b/tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot deleted file mode 100644 index aa25225f44..0000000000 --- a/tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot +++ /dev/null @@ -1,78 +0,0 @@ -# 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/default.robot -| Resource | resources/libraries/robot/l2_xconnect.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.NodePath -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 cross-connect test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of IPv4; -| ... | Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | cross-connect (L2XC) switching. -| ... | *[Ver] TG verification:* Test ICMPv4 (or 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 IPv4 (IPv6) src-addr, -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2XC switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \ -| | ... | DUT2 configure L2 cross-connect (L2XC), each with one interface -| | ... | to TG and one Ethernet interface towards the other DUT. [Ver] -| | ... | Make TG send ICMPv4 Echo Req in both directions between two of -| | ... | its interfaces to be switched by DUT1 and DUT2; verify all -| | ... | packets are received. [Ref] -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | When All Vpp Interfaces Ready Wait | ${nodes} -| | Then Send and receive ICMPv4 bidirectionally -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} - -| TC02: DUT1 and DUT2 with L2XC switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 and \ -| | ... | DUT2 configure L2 cross-connect (L2XC), each with one interface -| | ... | to TG and one Ethernet interface towards the other DUT. [Ver] -| | ... | Make TG send ICMPv6 Echo Req in both directions between two of -| | ... | its interfaces to be switched by DUT1 and DUT2; verify all -| | ... | packets are received. [Ref] -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And L2 setup xconnect on DUT -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | When All Vpp Interfaces Ready Wait | ${nodes} -| | Then Send and receive ICMPv6 bidirectionally -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -- cgit 1.2.3-korg