From e40f61ff6453263df735d92e15927e8ecfe7c37e Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Tue, 17 Jan 2017 14:50:46 +0100 Subject: csit-func-tc-naming-change - phase 1 - change of ts directories - change of ts file names - splitting of former files to more files when suitable - more details: https://wiki.fd.io/view/CSIT/csit-perf-tc-naming-change Change-Id: Ifda1038f8323735f86c1be7ba7f93e3fda183618 Signed-off-by: Jan Gelety --- bootstrap.sh | 2 +- resources/libraries/robot/bridge_domain.robot | 60 ++- .../bridge_domain/bridge_domain_untagged.robot | 374 ------------- tests/func/cop/cop_whitelist_blacklist.robot | 125 ----- tests/func/cop/cop_whitelist_blacklist_IPv6.robot | 139 ----- .../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 ++++ tests/func/dhcp/dhcp_client.robot | 116 ----- tests/func/dhcp/dhcp_v4_proxy.robot | 93 ---- tests/func/dhcp/dhcp_v6_proxy.robot | 66 --- .../eth2p-ethip4-ip4base-ip4dhcpclient-func.robot | 116 +++++ .../eth2p-ethip4-ip4base-ip4dhcpproxy-func.robot | 93 ++++ .../eth2p-ethip6-ip6base-ip6dhcpproxy-func.robot | 66 +++ ...lrn-eth-4vhost-2vm-fds-provider-nets-func.robot | 343 ++++++++++++ ...clrn--eth-4vhost-2vm-fds-tenant-nets-func.robot | 337 ++++++++++++ tests/func/fds/provider_network.robot | 343 ------------ tests/func/fds/tenant_network.robot | 337 ------------ tests/func/gre/eth2p-ethip4gre-ip4base-func.robot | 306 +++++++++++ tests/func/gre/gre_encapsulation.robot | 306 ----------- tests/func/iacl/ipv4_iacl_untagged.robot | 524 ------------------- tests/func/iacl/ipv6_iacl_untagged.robot | 577 --------------------- tests/func/iacl/l2_iacl_untagged.robot | 145 ------ .../eth2p-eth-l2xcbase-iaclbase-func.robot | 144 +++++ .../eth2p-ethip4-ip4base-iaclbase-func.robot | 524 +++++++++++++++++++ .../eth2p-ethip6-ip6base-iaclbase-func.robot | 577 +++++++++++++++++++++ .../ipsec/eth2p-ethip4ipsectnl-ip4base-func.robot | 499 ++++++++++++++++++ .../ipsec/eth2p-ethip4ipsectpt-ip4base-func.robot | 464 +++++++++++++++++ .../ipsec/eth2p-ethip6ipsectnl-ip6base-func.robot | 500 ++++++++++++++++++ .../ipsec/eth2p-ethip6ipsectpt-ip6base-func.robot | 464 +++++++++++++++++ tests/func/ipsec/ipsec_transport_mode_ipv4.robot | 464 ----------------- tests/func/ipsec/ipsec_transport_mode_ipv6.robot | 464 ----------------- tests/func/ipsec/ipsec_tunnel_mode_ipv4.robot | 499 ------------------ tests/func/ipsec/ipsec_tunnel_mode_ipv6.robot | 500 ------------------ tests/func/ipv4/ipv4_arp_untagged.robot | 82 --- tests/func/ipv4/ipv4_multipath_routing.robot | 74 --- tests/func/ipv4/ipv4_proxy_arp_untagged.robot | 156 ------ tests/func/ipv4/ipv4_untagged.robot | 138 ----- .../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/ipv6_multipath_routing.robot | 73 --- tests/func/ipv6/ipv6_ra.robot | 107 ---- tests/func/ipv6/ipv6_untagged.robot | 120 ----- .../func/ipv6_base/eth2p-ethip6-ip6base-func.robot | 120 +++++ .../eth2p-ethip6-ip6base-ip6ecmp-func.robot | 73 +++ .../eth2p-ethip6-ip6base-ip6ra-func.robot | 107 ++++ tests/func/l2_xconnect/l2_xconnect_untagged.robot | 137 ----- ...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_base/eth2p-eth-l2xcbase-func.robot | 78 +++ tests/func/lisp/api-crud-lisp-func.robot | 112 ++++ tests/func/lisp/api.robot | 112 ---- tests/func/lisp/dataplane_generic.robot | 120 ----- ...sectptlispgpe-ip4base-eth-2vhost-1vm-func.robot | 226 ++++++++ .../eth2p-ethip4ipsectptlispgpe-ip4base-func.robot | 274 ++++++++++ ...sectptlispgpe-ip6base-eth-2vhost-1vm-func.robot | 198 +++++++ .../eth2p-ethip4ipsectptlispgpe-ip6base-func.robot | 161 ++++++ ...h2p-ethip4ipsectptlispgpe-ip6basevrf-func.robot | 140 +++++ .../func/lisp/eth2p-ethip4lisp-ip4base-func.robot | 120 +++++ .../eth2p-ethip4lisp-l2bdbasemaclrn-func.robot | 96 ++++ ...ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot | 131 +++++ .../lisp/eth2p-ethip4lispgpe-ip4base-func.robot | 109 ++++ ...ip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot | 145 ++++++ .../lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot | 114 ++++ ...ethip4lispgpe-ip6base-eth-2vhost-1vm-func.robot | 119 +++++ .../lisp/eth2p-ethip4lispgpe-ip6base-func.robot | 117 +++++ .../lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot | 113 ++++ ...sectptlispgpe-ip4base-eth-2vhost-1vm-func.robot | 195 +++++++ .../eth2p-ethip6ipsectptlispgpe-ip4base-func.robot | 155 ++++++ ...sectptlispgpe-ip6base-eth-2vhost-1vm-func.robot | 211 ++++++++ .../eth2p-ethip6ipsectptlispgpe-ip6base-func.robot | 171 ++++++ .../eth2p-ethip6lisp-l2bdbasemaclrn-func.robot | 96 ++++ .../lisp/eth2p-ethip6lispgpe-ip4base-func.robot | 102 ++++ ...ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot | 142 +++++ .../lisp/eth2p-ethip6lispgpe-ip6base-func.robot | 111 ++++ ...ip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot | 148 ++++++ .../lisp/eth2p-ethip6lispgpe-ip6basevrf-func.robot | 116 +++++ tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot | 393 -------------- tests/func/lisp/ipsec_ipv4_lispgpe_ipv6.robot | 259 --------- tests/func/lisp/ipsec_ipv6_lispgpe_ipv4.robot | 313 ----------- tests/func/lisp/ipsec_ipv6_lispgpe_ipv6.robot | 290 ----------- tests/func/lisp/ipv4_lispgpe_ipv4.robot | 277 ---------- tests/func/lisp/ipv4_lispgpe_ipv6.robot | 242 --------- tests/func/lisp/ipv6_lispgpe_ipv4.robot | 102 ---- tests/func/lisp/ipv6_lispgpe_ipv6.robot | 291 ----------- tests/func/lisp/l2_lisp_ipv4.robot | 96 ---- tests/func/lisp/l2_lisp_ipv6.robot | 96 ---- ...eth2p-ethip4-ip4base-ipolicemarkbase-func.robot | 162 ++++++ ...eth2p-ethip6-ip6base-ipolicemarkbase-func.robot | 161 ++++++ tests/func/policer/policer_ip4.robot | 162 ------ tests/func/policer/policer_ip6.robot | 161 ------ tests/func/rpf/eth2p-ethip4-ip4base-rpf-func.robot | 134 +++++ tests/func/rpf/ipv4_rpf_untagged.robot | 134 ----- ...ethip6ip4-ip4base--ip6base-swirelw46-func.robot | 209 ++++++++ ...ethip6ip4-ip4base--ip6base-swiremape-func.robot | 436 ++++++++++++++++ ...ethip6ip4-ip4base--ip6base-swiremapt-func.robot | 122 +++++ tests/func/softwire/lightweight_4over6.robot | 209 -------- tests/func/softwire/map_e.robot | 436 ---------------- tests/func/softwire/map_t.robot | 122 ----- tests/func/tap/api-crud-tap-func.robot | 69 +++ .../eth2p-eth-l2bdbasemaclrn-eth-2tap-func.robot | 92 ++++ ...2p-eth-l2bdbasemaclrn-l2shg-eth-2tap-func.robot | 170 ++++++ .../tap/eth2p-ethip4-ip4base-eth-1tap-func.robot | 123 +++++ tests/func/tap/tap_interface.robot | 316 ----------- .../eth2p-ethip4-ip4base-ip4ipfixbase-func.robot | 200 +++++++ .../eth2p-ethip4-ip4base-ip4ipfixscale-func.robot | 110 ++++ .../eth2p-ethip6-ip6base-ip6ipfixbase-func.robot | 197 +++++++ .../eth2p-ethip6-ip6base-ip6ipfixscale-func.robot | 126 +++++ tests/func/telemetry/ipfix_ipv4.robot | 267 ---------- tests/func/telemetry/ipfix_ipv6.robot | 274 ---------- tests/func/telemetry/span.robot | 103 ---- .../span/eth2p-ethip4-ip4base-spanrx-func.robot | 80 +++ .../span/eth2p-ethip6-ip6base-spanrx-func.robot | 61 +++ ...ad--dot1q-l2bdbasemaclrn-vlantrans21-func.robot | 221 ++++++++ ...p-dot1ad--dot1q-l2xcbase-vlantrans21-func.robot | 189 +++++++ ...2p-dot1ad-l2bdbasemaclrn-vlantrans22-func.robot | 405 +++++++++++++++ tests/func/vlan/eth2p-dot1ad-l2xcbase-func.robot | 69 +++ .../eth2p-dot1ad-l2xcbase-vlantrans22-func.robot | 346 ++++++++++++ ...q--dot1ad-l2bdbasemaclrn-vlantrans12-func.robot | 394 ++++++++++++++ ...p-dot1q--dot1ad-l2xcbase-vlantrans12-func.robot | 335 ++++++++++++ ...h2p-dot1q-l2bdbasemaclrn-vlantrans11-func.robot | 206 ++++++++ .../eth2p-dot1q-l2xcbase-vlantrans11-func.robot | 171 ++++++ tests/func/vlan/qinq_l2_xconnect.robot | 69 --- .../vlan_tag_translate_l2_bridge_domain_ipv4.robot | 550 -------------------- .../vlan_tag_translate_l2_bridge_domain_ipv6.robot | 559 -------------------- .../vlan/vlan_tag_translate_l2_xconnect_ipv4.robot | 459 ---------------- .../vlan/vlan_tag_translate_l2_xconnect_ipv6.robot | 471 ----------------- tests/func/vrf/eth2p-ethip4-ip4basevrf-func.robot | 391 ++++++++++++++ tests/func/vrf/eth2p-ethip6-ip6basevrf-func.robot | 409 +++++++++++++++ tests/func/vrf/vrf_tests.robot | 391 -------------- tests/func/vrf/vrf_tests_v6.robot | 409 --------------- .../eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot | 76 +++ ...4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot | 119 +++++ .../eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot | 78 +++ .../vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot | 66 +++ ...6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot | 120 +++++ .../eth2p-ethip6vxlan-l2bdbasemaclrn-func.robot | 78 +++ ...h4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot | 200 +++++++ ...h4p-ethip6vxlan-l2bdbasemaclrn-l2shg-func.robot | 200 +++++++ tests/func/vxlan/vxlan_bd_dot1q.robot | 76 --- tests/func/vxlan/vxlan_bd_untagged.robot | 406 --------------- tests/func/vxlan/vxlan_xconnect_untagged.robot | 66 --- 149 files changed, 16465 insertions(+), 14209 deletions(-) delete mode 100644 tests/func/bridge_domain/bridge_domain_untagged.robot delete mode 100644 tests/func/cop/cop_whitelist_blacklist.robot delete mode 100644 tests/func/cop/cop_whitelist_blacklist_IPv6.robot create mode 100644 tests/func/cop_base/eth2p-ethip4-ip4base-copblklistbase-func.robot create mode 100644 tests/func/cop_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot create mode 100644 tests/func/cop_base/eth2p-ethip6-ip6base-copblklistbase-func.robot create mode 100644 tests/func/cop_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot delete mode 100644 tests/func/dhcp/dhcp_client.robot delete mode 100644 tests/func/dhcp/dhcp_v4_proxy.robot delete mode 100644 tests/func/dhcp/dhcp_v6_proxy.robot create mode 100644 tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpclient-func.robot create mode 100644 tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpproxy-func.robot create mode 100644 tests/func/dhcp/eth2p-ethip6-ip6base-ip6dhcpproxy-func.robot create mode 100644 tests/func/fds/eth2p-dot1q-l2bdbasemaclrn-eth-4vhost-2vm-fds-provider-nets-func.robot create mode 100644 tests/func/fds/eth2p-ethip4vxlan-l2bdbasemaclrn--eth-4vhost-2vm-fds-tenant-nets-func.robot delete mode 100644 tests/func/fds/provider_network.robot delete mode 100644 tests/func/fds/tenant_network.robot create mode 100644 tests/func/gre/eth2p-ethip4gre-ip4base-func.robot delete mode 100644 tests/func/gre/gre_encapsulation.robot delete mode 100644 tests/func/iacl/ipv4_iacl_untagged.robot delete mode 100644 tests/func/iacl/ipv6_iacl_untagged.robot delete mode 100644 tests/func/iacl/l2_iacl_untagged.robot create mode 100644 tests/func/iacl_base/eth2p-eth-l2xcbase-iaclbase-func.robot create mode 100644 tests/func/iacl_base/eth2p-ethip4-ip4base-iaclbase-func.robot create mode 100644 tests/func/iacl_base/eth2p-ethip6-ip6base-iaclbase-func.robot create mode 100644 tests/func/ipsec/eth2p-ethip4ipsectnl-ip4base-func.robot create mode 100644 tests/func/ipsec/eth2p-ethip4ipsectpt-ip4base-func.robot create mode 100644 tests/func/ipsec/eth2p-ethip6ipsectnl-ip6base-func.robot create mode 100644 tests/func/ipsec/eth2p-ethip6ipsectpt-ip6base-func.robot delete mode 100644 tests/func/ipsec/ipsec_transport_mode_ipv4.robot delete mode 100644 tests/func/ipsec/ipsec_transport_mode_ipv6.robot delete mode 100644 tests/func/ipsec/ipsec_tunnel_mode_ipv4.robot delete mode 100644 tests/func/ipsec/ipsec_tunnel_mode_ipv6.robot delete mode 100644 tests/func/ipv4/ipv4_arp_untagged.robot delete mode 100644 tests/func/ipv4/ipv4_multipath_routing.robot delete mode 100644 tests/func/ipv4/ipv4_proxy_arp_untagged.robot delete mode 100644 tests/func/ipv4/ipv4_untagged.robot create mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-func.robot create mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4arp-func.robot create mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot create mode 100644 tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot delete mode 100644 tests/func/ipv6/ipv6_multipath_routing.robot delete mode 100644 tests/func/ipv6/ipv6_ra.robot delete mode 100644 tests/func/ipv6/ipv6_untagged.robot create mode 100644 tests/func/ipv6_base/eth2p-ethip6-ip6base-func.robot create mode 100644 tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot create mode 100644 tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ra-func.robot delete mode 100644 tests/func/l2_xconnect/l2_xconnect_untagged.robot create mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func.robot create mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot create mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot create mode 100644 tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot create mode 100644 tests/func/l2bd_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot create mode 100644 tests/func/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot create mode 100644 tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot create mode 100644 tests/func/lisp/api-crud-lisp-func.robot delete mode 100644 tests/func/lisp/api.robot delete mode 100644 tests/func/lisp/dataplane_generic.robot create mode 100644 tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6basevrf-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lisp-ip4base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lisp-l2bdbasemaclrn-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip4base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip6base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip6base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6lisp-l2bdbasemaclrn-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6lispgpe-ip4base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6lispgpe-ip6base-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot create mode 100644 tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-func.robot delete mode 100644 tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot delete mode 100644 tests/func/lisp/ipsec_ipv4_lispgpe_ipv6.robot delete mode 100644 tests/func/lisp/ipsec_ipv6_lispgpe_ipv4.robot delete mode 100644 tests/func/lisp/ipsec_ipv6_lispgpe_ipv6.robot delete mode 100644 tests/func/lisp/ipv4_lispgpe_ipv4.robot delete mode 100644 tests/func/lisp/ipv4_lispgpe_ipv6.robot delete mode 100644 tests/func/lisp/ipv6_lispgpe_ipv4.robot delete mode 100644 tests/func/lisp/ipv6_lispgpe_ipv6.robot delete mode 100644 tests/func/lisp/l2_lisp_ipv4.robot delete mode 100644 tests/func/lisp/l2_lisp_ipv6.robot create mode 100644 tests/func/policer/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot create mode 100644 tests/func/policer/eth2p-ethip6-ip6base-ipolicemarkbase-func.robot delete mode 100644 tests/func/policer/policer_ip4.robot delete mode 100644 tests/func/policer/policer_ip6.robot create mode 100644 tests/func/rpf/eth2p-ethip4-ip4base-rpf-func.robot delete mode 100644 tests/func/rpf/ipv4_rpf_untagged.robot create mode 100644 tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot create mode 100644 tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot create mode 100644 tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot delete mode 100644 tests/func/softwire/lightweight_4over6.robot delete mode 100644 tests/func/softwire/map_e.robot delete mode 100644 tests/func/softwire/map_t.robot create mode 100644 tests/func/tap/api-crud-tap-func.robot create mode 100644 tests/func/tap/eth2p-eth-l2bdbasemaclrn-eth-2tap-func.robot create mode 100644 tests/func/tap/eth2p-eth-l2bdbasemaclrn-l2shg-eth-2tap-func.robot create mode 100644 tests/func/tap/eth2p-ethip4-ip4base-eth-1tap-func.robot delete mode 100644 tests/func/tap/tap_interface.robot create mode 100644 tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixbase-func.robot create mode 100644 tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixscale-func.robot create mode 100644 tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixbase-func.robot create mode 100644 tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixscale-func.robot delete mode 100644 tests/func/telemetry/ipfix_ipv4.robot delete mode 100644 tests/func/telemetry/ipfix_ipv6.robot delete mode 100644 tests/func/telemetry/span.robot create mode 100644 tests/func/telemetry/span/eth2p-ethip4-ip4base-spanrx-func.robot create mode 100644 tests/func/telemetry/span/eth2p-ethip6-ip6base-spanrx-func.robot create mode 100644 tests/func/vlan/eth2p-dot1ad--dot1q-l2bdbasemaclrn-vlantrans21-func.robot create mode 100644 tests/func/vlan/eth2p-dot1ad--dot1q-l2xcbase-vlantrans21-func.robot create mode 100644 tests/func/vlan/eth2p-dot1ad-l2bdbasemaclrn-vlantrans22-func.robot create mode 100644 tests/func/vlan/eth2p-dot1ad-l2xcbase-func.robot create mode 100644 tests/func/vlan/eth2p-dot1ad-l2xcbase-vlantrans22-func.robot create mode 100644 tests/func/vlan/eth2p-dot1q--dot1ad-l2bdbasemaclrn-vlantrans12-func.robot create mode 100644 tests/func/vlan/eth2p-dot1q--dot1ad-l2xcbase-vlantrans12-func.robot create mode 100644 tests/func/vlan/eth2p-dot1q-l2bdbasemaclrn-vlantrans11-func.robot create mode 100644 tests/func/vlan/eth2p-dot1q-l2xcbase-vlantrans11-func.robot delete mode 100644 tests/func/vlan/qinq_l2_xconnect.robot delete mode 100644 tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv4.robot delete mode 100644 tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv6.robot delete mode 100644 tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv4.robot delete mode 100644 tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv6.robot create mode 100644 tests/func/vrf/eth2p-ethip4-ip4basevrf-func.robot create mode 100644 tests/func/vrf/eth2p-ethip6-ip6basevrf-func.robot delete mode 100644 tests/func/vrf/vrf_tests.robot delete mode 100644 tests/func/vrf/vrf_tests_v6.robot create mode 100644 tests/func/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot create mode 100644 tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot create mode 100644 tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot create mode 100644 tests/func/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot create mode 100644 tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot create mode 100644 tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-func.robot create mode 100644 tests/func/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot create mode 100644 tests/func/vxlan/eth4p-ethip6vxlan-l2bdbasemaclrn-l2shg-func.robot delete mode 100644 tests/func/vxlan/vxlan_bd_dot1q.robot delete mode 100644 tests/func/vxlan/vxlan_bd_untagged.robot delete mode 100644 tests/func/vxlan/vxlan_xconnect_untagged.robot diff --git a/bootstrap.sh b/bootstrap.sh index 2eab51d3ed..f123729647 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=("bridge_domain,dhcp,gre,honeycomb,l2_xconnect,lisp,softwire" "cop,telemetry,ipsec,ipv6,rpf,tap,vrf" "fds,iacl,ipv4,policer,vlan,vxlan") +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") SUITE_PATH="tests.func" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/resources/libraries/robot/bridge_domain.robot b/resources/libraries/robot/bridge_domain.robot index ac0fea8bd4..5707a82ade 100644 --- a/resources/libraries/robot/bridge_domain.robot +++ b/resources/libraries/robot/bridge_domain.robot @@ -16,7 +16,6 @@ | Library | resources.libraries.python.InterfaceUtil | Library | resources.libraries.python.NodePath | Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.QemuUtils | Resource | resources/libraries/robot/interfaces.robot | Resource | resources/libraries/robot/l2_traffic.robot @@ -206,23 +205,38 @@ | | [Documentation] | Setup QEMU and start VM with two vhost interfaces. | | ... | | ... | *Arguments:* -| | ... | - ${node} - DUT node to start VM on. Type: dictionary +| | ... | - ${dut_node} - DUT node to start VM on. Type: dictionary | | ... | - ${sock1} - Socket path for first Vhost-User interface. Type: string | | ... | - ${sock2} - Socket path for second Vhost-User interface. Type: string +| | ... | - ${qemu_name} - Qemu instance name by which the object will be +| | ... | accessed (Optional). Type: string | | ... | | ... | _NOTE:_ This KW sets following test case variable: -| | ... | -${vm_node} - VM node info. Type: dictionary +| | ... | - ${${qemu_name}} - VM node info. Type: dictionary | | ... | | ... | *Example:* | | ... | | ... | \| VM for Vhost L2BD forwarding is setup \| ${nodes['DUT1']} \ | | ... | \| /tmp/sock1 \| /tmp/sock2 \| -| | [Arguments] | ${node} | ${sock1} | ${sock2} -| | Set Test Variable | ${vm_node} | ${None} -| | Qemu Set Node | ${node} -| | Qemu Add Vhost User If | ${sock1} -| | Qemu Add Vhost User If | ${sock2} -| | ${vm}= | Qemu Start +| | ... | \| VM for Vhost L2BD forwarding is setup \| ${nodes['DUT2']} \ +| | ... | \| /tmp/sock1 \| /tmp/sock2 \| qemu_instance_2 \| +| | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${qemu_name}=vm_node +| | Run Keyword Unless | "${qemu_name}" == "vm_node" | Import Library +| | ... | resources.libraries.python.QemuUtils | WITH NAME | ${qemu_name} +| | Set Test Variable | ${${qemu_name}} | ${None} +| | ${qemu_set_node}= | Run Keyword If | "${qemu_name}" == "vm_node" +| | | ... | Set Variable | Qemu Set Node +| | ... | ELSE | Replace Variables | ${qemu_name}.Qemu Set Node +| | Run keyword | ${qemu_set_node} | ${dut_node} +| | ${qemu_add_vhost}= | Run Keyword If | "${qemu_name}" == "vm_node" +| | | ... | Set Variable | Qemu Add Vhost User If +| | ... | ELSE | Replace Variables | ${qemu_name}.Qemu Add Vhost User If +| | Run keyword | ${qemu_add_vhost} | ${sock1} +| | Run keyword | ${qemu_add_vhost} | ${sock2} +| | ${qemu_start}= | Run Keyword If | "${qemu_name}" == "vm_node" +| | | ... | Set Variable | Qemu Start +| | ... | ELSE | Replace Variables | ${qemu_name}.Qemu Start +| | ${vm}= | Run keyword | ${qemu_start} | | ${br}= | Set Variable | br0 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1} | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2} @@ -230,26 +244,36 @@ | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name | | Set Interface State | ${vm} | ${br} | up | if_type=name -| | Set Test Variable | ${vm_node} | ${vm} +| | Set Test Variable | ${${qemu_name}} | ${vm} | VPP Vhost interfaces for L2BD forwarding are setup | | [Documentation] | Create two Vhost-User interfaces on defined VPP node. | | ... | | ... | *Arguments:* -| | ... | - ${node} - DUT node. Type: dictionary +| | ... | - ${dut_node} - DUT node. Type: dictionary | | ... | - ${sock1} - Socket path for first Vhost-User interface. Type: string | | ... | - ${sock2} - Socket path for second Vhost-User interface. Type: string +| | ... | - ${vhost_if1} - Name of the first Vhost-User interface (Optional). +| | ... | Type: string +| | ... | - ${vhost_if2} - Name of the second Vhost-User interface (Optional). +| | ... | Type: string | | ... | | ... | _NOTE:_ This KW sets following test case variable: -| | ... | - ${vhost_if1} - First Vhost-User interface. -| | ... | - ${vhost_if2} - Second Vhost-User interface. +| | ... | - ${${vhost_if1}} - First Vhost-User interface. +| | ... | - ${${vhost_if2}} - Second Vhost-User interface. | | ... | | ... | *Example:* | | ... | | ... | \| VPP Vhost interfaces for L2BD forwarding are setup \ | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| -| | [Arguments] | ${node} | ${sock1} | ${sock2} -| | ${vhost_if1}= | Vpp Create Vhost User Interface | ${node} | ${sock1} -| | ${vhost_if2}= | Vpp Create Vhost User Interface | ${node} | ${sock2} -| | Set Test Variable | ${vhost_if1} -| | Set Test Variable | ${vhost_if2} +| | ... | \| VPP Vhost interfaces for L2BD forwarding are setup \ +| | ... | \| ${nodes['DUT2']} \| /tmp/sock1 \| /tmp/sock2 \| dut2_vhost_if1 \ +| | ... | \| dut2_vhost_if2 \| +| | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vhost_if1}=vhost_if1 +| | ... | ${vhost_if2}=vhost_if2 +| | ${vhost_1}= | Vpp Create Vhost User Interface | ${dut_node} | ${sock1} +| | ${vhost_2}= | Vpp Create Vhost User Interface | ${dut_node} | ${sock2} +| | Set Interface State | ${dut_node} | ${vhost_1} | up +| | Set Interface State | ${dut_node} | ${vhost_2} | up +| | Set Test Variable | ${${vhost_if1}} | ${vhost_1} +| | Set Test Variable | ${${vhost_if2}} | ${vhost_2} diff --git a/tests/func/bridge_domain/bridge_domain_untagged.robot b/tests/func/bridge_domain/bridge_domain_untagged.robot deleted file mode 100644 index 346ce86c92..0000000000 --- a/tests/func/bridge_domain/bridge_domain_untagged.robot +++ /dev/null @@ -1,374 +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; TG=DUT1=DUT2=TG 3-node circular -| ... | topology with double parallel links and 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 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) switching combined with static MACs; MAC -| ... | learning enabled and Split Horizon Groups (SHG) depending on -| ... | test case. -| ... | *[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 -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 - -*** 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} - -| TC04: 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} - -| TC05: 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} - -| TC06: 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] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | 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} -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown - -| TC07: 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] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | 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} -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown - -| TC08: 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] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | 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} -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown - -| TC09: 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] -| | ... -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Check VPP PID in 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/cop/cop_whitelist_blacklist.robot b/tests/func/cop/cop_whitelist_blacklist.robot deleted file mode 100644 index be6b476062..0000000000 --- a/tests/func/cop/cop_whitelist_blacklist.robot +++ /dev/null @@ -1,125 +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 and 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} - -| TC02: 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/cop_whitelist_blacklist_IPv6.robot b/tests/func/cop/cop_whitelist_blacklist_IPv6.robot deleted file mode 100644 index 140c6b0673..0000000000 --- a/tests/func/cop/cop_whitelist_blacklist_IPv6.robot +++ /dev/null @@ -1,139 +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 and 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} - -| TC02: 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-ethip4-ip4base-copblklistbase-func.robot b/tests/func/cop_base/eth2p-ethip4-ip4base-copblklistbase-func.robot new file mode 100644 index 0000000000..37e55c0666 --- /dev/null +++ b/tests/func/cop_base/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_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot b/tests/func/cop_base/eth2p-ethip4-ip4base-copwhlistbase-func.robot new file mode 100644 index 0000000000..eb8be688d9 --- /dev/null +++ b/tests/func/cop_base/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_base/eth2p-ethip6-ip6base-copblklistbase-func.robot b/tests/func/cop_base/eth2p-ethip6-ip6base-copblklistbase-func.robot new file mode 100644 index 0000000000..7511dfe31b --- /dev/null +++ b/tests/func/cop_base/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_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot b/tests/func/cop_base/eth2p-ethip6-ip6base-copwhlistbase-func.robot new file mode 100644 index 0000000000..f75f4d0dea --- /dev/null +++ b/tests/func/cop_base/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/dhcp/dhcp_client.robot b/tests/func/dhcp/dhcp_client.robot deleted file mode 100644 index 6169b97fb7..0000000000 --- a/tests/func/dhcp/dhcp_client.robot +++ /dev/null @@ -1,116 +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/testing_path.robot -| Resource | resources/libraries/robot/dhcp_client.robot -| Resource | resources/libraries/robot/ipv4.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 | *DHCP Client related test cases* - -*** Variables *** -| ${client_hostname}= | dhcp-client -| ${client_ip}= | 192.168.23.10 -| ${client_mask}= | 255.255.255.0 -| ${server_ip}= | 192.168.23.1 -| ${own_xid}= | 11112222 -| ${lease_time}= | ${15} - -*** Test Cases *** -| VPP sends a DHCP DISCOVER -| | [Documentation] | Configure DHCP client on interface to TG without hostname -| | ... | and check if DHCP DISCOVER message contains all required -| | ... | fields with expected values. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} -| | Then Check DHCP DISCOVER header | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} - -| VPP sends a DHCP DISCOVER with hostname -| | [Documentation] | Configure DHCP client on interface to TG with hostname -| | ... | and check if DHCP DISCOVER message contains all required -| | ... | fields with expected values. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${client_hostname} -| | Then Check DHCP DISCOVER header | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${client_hostname} - -| VPP sends DHCP REQUEST after OFFER -| | [Documentation] | Configure DHCP client on interface to TG and check if -| | ... | DHCP REQUEST message contains all required fields. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local -| | ... | ${FALSE} | ${NONE} -| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} -| | Then Check DHCP REQUEST after OFFER | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if1_mac} | ${server_ip} -| | ... | ${dut_to_tg_if1_mac} | ${client_ip} | ${client_mask} - -| VPP doesn't send DHCP REQUEST after OFFER with wrong XID -| | [ Tags ] | EXPECTED_FAILING -| | [Documentation] | Configure DHCP client on interface to TG. If server sends -| | ... | DHCP OFFER with different XID as in DHCP DISCOVER, -| | ... | DHCP REQUEST message shouldn't be sent. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local -| | ... | ${FALSE} | ${NONE} -| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} -| | Then Run Keyword And Expect Error | DHCP REQUEST Rx timeout -| | ... | Check DHCP REQUEST after OFFER | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if1_mac} | ${server_ip} -| | ... | ${dut_to_tg_if1_mac} | ${client_ip} | ${client_mask} -| | ... | offer_xid=${own_xid} - -| VPP honors DHCPv4 lease time -| | [Documentation] | Send IP configuration to the VPP client via DHCP. Address -| | ... | is checked with ICMP echo request and there should be no -| | ... | reply for echo request when lease has expired. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local -| | ... | ${FALSE} | ${NONE} -| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} -| | And Send IP configuration to client via DHCP -| | ... | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if1_mac} | ${server_ip} -| | ... | ${client_ip} | ${client_mask} -| | ... | ${lease_time} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${server_ip} -| | ... | ${tg_to_dut_if1_mac} -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} | ${client_ip} -| | ... | ${server_ip} -| | And Sleep | ${lease_time} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} -| | ... | ${client_ip} | ${server_ip} diff --git a/tests/func/dhcp/dhcp_v4_proxy.robot b/tests/func/dhcp/dhcp_v4_proxy.robot deleted file mode 100644 index a9c4d23ea9..0000000000 --- a/tests/func/dhcp/dhcp_v4_proxy.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/testing_path.robot -| Resource | resources/libraries/robot/dhcp_proxy.robot -| Resource | resources/libraries/robot/ipv4.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 | *DHCP proxy test cases* -| ... -| ... | *[Top] Network Topologies:* TG = DUT -| ... | with two links between the nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP-BOOTP-DHCP -| ... | *[Cfg] DUT configuration:* DUT is configured with DHCP proxy. -| ... | *[Ver] TG verification:* Test DHCP packets are sent -| ... | on TG on first link to DUT and received on TG on second link. -| ... | On receive TG verifies if DHCP packets are valid. - -*** Variables *** -| ${dut_to_tg_if1_ip}= | 172.16.0.1 -| ${dut_to_tg_if2_ip}= | 192.168.0.1 -| ${dhcp_server_ip}= | 192.168.0.100 -| ${client_ip}= | 172.16.0.2 -| ${prefix_length}= | 24 - -| ${discover_src_ip}= | 0.0.0.0 -| ${valid_discover_dst_ip}= | 255.255.255.255 -| ${invalid_discover_dst_ip}= | 255.255.255.1 - -*** Test Cases *** -| TC01: VPP proxies valid DHCPv4 request to DHCPv4 server -| | [Documentation] | -| | ... | [Top] TG=DUT \ -| | ... | [Enc] Eth-IPv4-UDP-BOOTP-DHCP -| | ... | [Cfg] On DUT setup DHCP proxy. -| | ... | [Ver] Make TG verify matching DHCP packets between client and DHCP -| | ... | server through DHCP proxy. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local -| | ... | ${FALSE} | ${NONE} -| | And Set Interface Address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | And Set Interface Address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip} -| | ... | ${tg_to_dut_if2_mac} -| | When DHCP Proxy Config | ${dut_node} | ${dhcp_server_ip} -| | ... | ${dut_to_tg_if1_ip} -| | Then Send DHCP Messages | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dhcp_server_ip} | ${tg_to_dut_if2_mac} | ${client_ip} -| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_ip} - -| TC02: VPP proxy ignores invalid DHCPv4 request -| | [Documentation] | -| | ... | [Top] TG=DUT \ -| | ... | [Enc] Eth-IPv4-UDP-BOOTP-DHCP -| | ... | [Cfg] On DUT setup DHCP proxy. -| | ... | [Ver] Make TG verify matching invalid DHCP packets are dropped. -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local -| | ... | ${FALSE} | ${NONE} -| | And Set Interface Address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | And Set Interface Address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip} -| | ... | ${tg_to_dut_if2_mac} -| | When DHCP Proxy Config | ${dut_node} | ${dhcp_server_ip} -| | ... | ${dut_to_tg_if1_ip} -| | Then Send DHCP DISCOVER | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${discover_src_ip} | ${valid_discover_dst_ip} -| | And Send DHCP DISCOVER should fail | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${discover_src_ip} | ${invalid_discover_dst_ip} diff --git a/tests/func/dhcp/dhcp_v6_proxy.robot b/tests/func/dhcp/dhcp_v6_proxy.robot deleted file mode 100644 index eeaf796a28..0000000000 --- a/tests/func/dhcp/dhcp_v6_proxy.robot +++ /dev/null @@ -1,66 +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/testing_path.robot -| Resource | resources/libraries/robot/dhcp_proxy.robot -| Resource | resources/libraries/robot/ipv6.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 | *DHCPv6 proxy test cases* -| ... -| ... | *[Top] Network Topologies:* TG = DUT -| ... | with two links between the nodes. -| ... | *[Cfg] DUT configuration:* DUT is configured with DHCP proxy. -| ... | *[Ver] TG verification:*Test DHCP packets are sent -| ... | on TG on first link to DUT and received on TG on second link. -| ... | On receive TG verifies if DHCP packets are valid -| ... | *[Ref] Applicable standard specifications:* RFC 3315 - - -*** Variables *** -| ${dut_to_tg_if1_ip}= | 3ffe:62::1 -| ${dut_to_tg_if2_ip}= | 3ffe:63::1 -| ${dhcp_server_ip}= | 3ffe:63::2 -| ${prefix_length}= | 64 - - -*** Test Cases *** -| TC01: VPP proxies valid DHCPv6 request to DHCPv6 server -| | [Documentation] | -| | ... | [Top] TG=DUT -| | ... | [Cfg] On DUT setup DHCP proxy. -| | ... | [Ver] Make TG verify matching DHCPv6 packets between client and DHCP \ -| | ... | server through DHCP proxy. -| | ... | [Ref] RFC 3315 -| | ... -| | 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_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | And Vpp Set If Ipv6 Addr | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And VPP Route Add | ${dut_node} | ff02::1:2 | 128 | ${NONE} | local -| | ... | ${FALSE} | ${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | When DHCP Proxy Config | ${dut_node} | ${dhcp_server_ip} -| | ... | ${dut_to_tg_if1_ip} -| | Then Send DHCPv6 Messages | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_ip} | ${dut_to_tg_if1_mac} | ${dhcp_server_ip} -| | ... | ${tg_to_dut_if2_mac} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if2_mac} diff --git a/tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpclient-func.robot b/tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpclient-func.robot new file mode 100644 index 0000000000..5507c956d5 --- /dev/null +++ b/tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpclient-func.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/dhcp_client.robot +| Resource | resources/libraries/robot/ipv4.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 | *DHCPv4 Client related test cases* + +*** Variables *** +| ${client_hostname}= | dhcp-client +| ${client_ip}= | 192.168.23.10 +| ${client_mask}= | 255.255.255.0 +| ${server_ip}= | 192.168.23.1 +| ${own_xid}= | 11112222 +| ${lease_time}= | ${15} + +*** Test Cases *** +| VPP sends a DHCP DISCOVER +| | [Documentation] | Configure DHCPv4 client on interface to TG without +| | ... | hostname and check if DHCPv4 DISCOVER message contains all +| | ... | required fields with expected values. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} +| | Then Check DHCP DISCOVER header | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} + +| VPP sends a DHCPv4 DISCOVER with hostname +| | [Documentation] | Configure DHCPv4 client on interface to TG with hostname +| | ... | and check if DHCPv4 DISCOVER message contains all required +| | ... | fields with expected values. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${client_hostname} +| | Then Check DHCP DISCOVER header | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${client_hostname} + +| VPP sends DHCPv4 REQUEST after OFFER +| | [Documentation] | Configure DHCPv4 client on interface to TG and check if +| | ... | DHCPv4 REQUEST message contains all required fields. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} +| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} +| | Then Check DHCP REQUEST after OFFER | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if1_mac} | ${server_ip} +| | ... | ${dut_to_tg_if1_mac} | ${client_ip} | ${client_mask} + +| VPP doesn't send DHCPv4 REQUEST after OFFER with wrong XID +| | [ Tags ] | EXPECTED_FAILING +| | [Documentation] | Configure DHCPv4 client on interface to TG. If server +| | ... | sends DHCPv4 OFFER with different XID as in DHCPv4 +| | ... | DISCOVER, DHCPv4 REQUEST message shouldn't be sent. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} +| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} +| | Then Run Keyword And Expect Error | DHCP REQUEST Rx timeout +| | ... | Check DHCP REQUEST after OFFER | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if1_mac} | ${server_ip} +| | ... | ${dut_to_tg_if1_mac} | ${client_ip} | ${client_mask} +| | ... | offer_xid=${own_xid} + +| VPP honors DHCPv4 lease time +| | [Documentation] | Send IP configuration to the VPP client via DHCPv4. +| | ... | Address is checked with ICMP echo request and there should +| | ... | be no reply for echo request when lease has expired. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} +| | When Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1} +| | And Send IP configuration to client via DHCP +| | ... | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if1_mac} | ${server_ip} +| | ... | ${client_ip} | ${client_mask} +| | ... | ${lease_time} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${server_ip} +| | ... | ${tg_to_dut_if1_mac} +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} | ${client_ip} +| | ... | ${server_ip} +| | And Sleep | ${lease_time} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} +| | ... | ${client_ip} | ${server_ip} diff --git a/tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpproxy-func.robot b/tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpproxy-func.robot new file mode 100644 index 0000000000..e503c7fe0f --- /dev/null +++ b/tests/func/dhcp/eth2p-ethip4-ip4base-ip4dhcpproxy-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/testing_path.robot +| Resource | resources/libraries/robot/dhcp_proxy.robot +| Resource | resources/libraries/robot/ipv4.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 | *DHCPv4 proxy test cases* +| ... +| ... | *[Top] Network Topologies:* TG = DUT +| ... | with two links between the nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP-BOOTP-DHCP +| ... | *[Cfg] DUT configuration:* DUT is configured with DHCPv4 proxy. +| ... | *[Ver] TG verification:* Test DHCPv4 packets are sent +| ... | on TG on first link to DUT and received on TG on second link. +| ... | On receive TG verifies if DHCPv4 packets are valid. + +*** Variables *** +| ${dut_to_tg_if1_ip}= | 172.16.0.1 +| ${dut_to_tg_if2_ip}= | 192.168.0.1 +| ${dhcp_server_ip}= | 192.168.0.100 +| ${client_ip}= | 172.16.0.2 +| ${prefix_length}= | 24 + +| ${discover_src_ip}= | 0.0.0.0 +| ${valid_discover_dst_ip}= | 255.255.255.255 +| ${invalid_discover_dst_ip}= | 255.255.255.1 + +*** Test Cases *** +| TC01: VPP proxies valid DHCPv4 request to DHCPv4 server +| | [Documentation] | +| | ... | [Top] TG=DUT \ +| | ... | [Enc] Eth-IPv4-UDP-BOOTP-DHCP +| | ... | [Cfg] On DUT setup DHCPv4 proxy. +| | ... | [Ver] Make TG verify matching DHCPv4 packets between client and DHCPv4 +| | ... | server through DHCP proxy. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} +| | And Set Interface Address | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} +| | And Set Interface Address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip} +| | ... | ${tg_to_dut_if2_mac} +| | When DHCP Proxy Config | ${dut_node} | ${dhcp_server_ip} +| | ... | ${dut_to_tg_if1_ip} +| | Then Send DHCP Messages | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dhcp_server_ip} | ${tg_to_dut_if2_mac} | ${client_ip} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_ip} + +| TC02: VPP proxy ignores invalid DHCPv4 request +| | [Documentation] | +| | ... | [Top] TG=DUT \ +| | ... | [Enc] Eth-IPv4-UDP-BOOTP-DHCP +| | ... | [Cfg] On DUT setup DHCPv4 proxy. +| | ... | [Ver] Make TG verify matching invalid DHCPv4 packets are dropped. +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} +| | And Set Interface Address | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} +| | And Set Interface Address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip} +| | ... | ${tg_to_dut_if2_mac} +| | When DHCP Proxy Config | ${dut_node} | ${dhcp_server_ip} +| | ... | ${dut_to_tg_if1_ip} +| | Then Send DHCP DISCOVER | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${discover_src_ip} | ${valid_discover_dst_ip} +| | And Send DHCP DISCOVER should fail | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${discover_src_ip} | ${invalid_discover_dst_ip} diff --git a/tests/func/dhcp/eth2p-ethip6-ip6base-ip6dhcpproxy-func.robot b/tests/func/dhcp/eth2p-ethip6-ip6base-ip6dhcpproxy-func.robot new file mode 100644 index 0000000000..724150f929 --- /dev/null +++ b/tests/func/dhcp/eth2p-ethip6-ip6base-ip6dhcpproxy-func.robot @@ -0,0 +1,66 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/dhcp_proxy.robot +| Resource | resources/libraries/robot/ipv6.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 | *DHCPv6 proxy test cases* +| ... +| ... | *[Top] Network Topologies:* TG = DUT +| ... | with two links between the nodes. +| ... | *[Cfg] DUT configuration:* DUT is configured with DHCPv6 proxy. +| ... | *[Ver] TG verification:* Test DHCPv6 packets are sent +| ... | on TG on first link to DUT and received on TG on second link. +| ... | On receive TG verifies if DHCPv6 packets are valid +| ... | *[Ref] Applicable standard specifications:* RFC 3315 + + +*** Variables *** +| ${dut_to_tg_if1_ip}= | 3ffe:62::1 +| ${dut_to_tg_if2_ip}= | 3ffe:63::1 +| ${dhcp_server_ip}= | 3ffe:63::2 +| ${prefix_length}= | 64 + + +*** Test Cases *** +| TC01: VPP proxies valid DHCPv6 request to DHCPv6 server +| | [Documentation] | +| | ... | [Top] TG=DUT +| | ... | [Cfg] On DUT setup DHCP proxy. +| | ... | [Ver] Make TG verify matching DHCPv6 packets between client and \ +| | ... | DHCPv6 server through DHCPv6 proxy. +| | ... | [Ref] RFC 3315 +| | ... +| | 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_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} +| | And Vpp Set If Ipv6 Addr | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} +| | And VPP Route Add | ${dut_node} | ff02::1:2 | 128 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | When DHCP Proxy Config | ${dut_node} | ${dhcp_server_ip} +| | ... | ${dut_to_tg_if1_ip} +| | Then Send DHCPv6 Messages | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_ip} | ${dut_to_tg_if1_mac} | ${dhcp_server_ip} +| | ... | ${tg_to_dut_if2_mac} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if2_mac} diff --git a/tests/func/fds/eth2p-dot1q-l2bdbasemaclrn-eth-4vhost-2vm-fds-provider-nets-func.robot b/tests/func/fds/eth2p-dot1q-l2bdbasemaclrn-eth-4vhost-2vm-fds-provider-nets-func.robot new file mode 100644 index 0000000000..612825d9a4 --- /dev/null +++ b/tests/func/fds/eth2p-dot1q-l2bdbasemaclrn-eth-4vhost-2vm-fds-provider-nets-func.robot @@ -0,0 +1,343 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | SKIP_PATCH +| Test Setup | Run Keywords | Setup all DUTs before test +| ... | AND | Save VPP PIDs +| ... | AND | Setup all TGs before traffic script +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Qemu Teardown | ${dut1_node} | ${qemu_node1} +| ... | qemu_node1 +| ... | AND | Qemu Teardown | ${dut2_node} | ${qemu_node2} +| ... | qemu_node2 +| ... | AND | Check VPP PID in Teardown +| Documentation | *Provider network FDS related.* +| ... +| ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG +| ... | with one link between nodes. Test packets are sent in both directions +| ... | between namespaces in DUT1 and DUT2 with both positive and negative +| ... | scenarios tested. + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 +| ${shg1}= | 3 +| ${shg2}= | 4 +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 +| ${sock3}= | /tmp/sock3 +| ${sock4}= | /tmp/sock4 + +| ${bid_b}= | 23 +| ${bid_r}= | 24 + +| ${vlan_red}= | 50 +| ${vlan_blue}= | 60 + +| ${dut1_if_ip}= | 16.0.0.1 +| ${dut2_if_ip}= | 16.0.0.2 + +| ${dut1_blue1}= | 16.0.10.1 +| ${dut1_blue2}= | 16.0.10.2 +| ${dut1_red1}= | 16.0.10.3 +| ${dut1_red2}= | 16.0.10.4 + +| ${dut2_blue1}= | 16.0.20.1 +| ${dut2_blue2}= | 16.0.20.2 +| ${dut2_red1}= | 16.0.20.3 +| ${dut2_red2}= | 16.0.20.4 + +| ${namespace1}= | nmspace1 +| ${namespace2}= | nmspace2 +| ${namespace3}= | nmspace3 +| ${namespace4}= | nmspace4 + +| ${prefix_length}= | 16 + +*** Test Cases *** +| Provider network test cases with provider physical networks (VLAN) +| | [Documentation] | Ping among all ports inside the same network should pass. +| | ... | a) test l2 connectivity inside every network +| | ... | b) test l2 connectivity between networks +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV +| | Given Path for 3-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if_ip} +| | ... | ${prefix_length} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if_ip} +| | ... | ${prefix_length} +| | And Set Interface State | ${dut1_node} | ${dut1_to_dut2} | up +| | And Set Interface State | ${dut2_node} | ${dut2_to_dut1} | up +| | ${vhost_if1_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock1} +| | ${vhost_if2_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock2} +| | ${vhost_if3_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock3} +| | ${vhost_if4_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock4} +| | ${dut1_vhosts}= | And Create List | ${vhost_if1_DUT1} | ${vhost_if2_DUT1} +| | ... | ${vhost_if3_DUT1} | ${vhost_if4_DUT1} +| | ${vhost_if1_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock1} +| | ${vhost_if2_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock2} +| | ${vhost_if3_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock3} +| | ${vhost_if4_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock4} +| | ${dut2_vhosts}= | And Create List | ${vhost_if1_DUT2} | ${vhost_if2_DUT2} +| | ... | ${vhost_if3_DUT2} | ${vhost_if4_DUT2} +| | When Setup QEMU Vhost and Run | ${dut1_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${sock3} +| | ... | ${sock4} +| | ... | ${dut1_blue1} +| | ... | ${dut1_blue2} +| | ... | ${dut1_red1} +| | ... | ${dut1_red2} +| | ... | ${prefix_length} +| | ... | qemu_node1 +| | ... | 04 +| | And Setup QEMU Vhost and Run | ${dut2_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${sock3} +| | ... | ${sock4} +| | ... | ${dut2_blue1} +| | ... | ${dut2_blue2} +| | ... | ${dut2_red1} +| | ... | ${dut2_red2} +| | ... | ${prefix_length} +| | ... | qemu_node2 +| | ... | 06 +| | And Setup VLAN and BD on Dut | ${dut1_node} | ${dut1_to_dut2} +| | ... | @{dut1_vhosts} +| | And Setup VLAN and BD on Dut | ${dut2_node} | ${dut2_to_dut1} +| | ... | @{dut2_vhosts} +| | Then Positive Scenario Ping From DUT1 - Intra network +| | And Positive Scenario Ping From DUT1 - Inter network +| | And Positive Scenario Ping From DUT2 - Intra network +| | And Positive Scenario Ping From DUT2 - Inter network +| | And Negative Scenario Ping From DUT1 - Intra network +| | And Negative Scenario Ping From DUT1 - Inter network +| | And Negative Scenario Ping From DUT2 - Intra network +| | And Negative Scenario Ping From DUT2 - Inter network + +*** Keywords *** +| Setup VLAN and BD on Dut +| | [Documentation] | Setup VLAN and bridge domain on specific DUT and +| | ... | subsequently interconnect them properly. Also set VLAN tag +| | ... | rewrite on vhosts. +| | ... +| | ... | *Arguments:* +| | ... | - dut_node - Node where to setup VLAN and BD. Type: dict +| | ... | - interface - Interface where to create VLAN sub-interface. +| | ... | Type: string +| | ... | - vhosts - List containing vhost interfaces. +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Setup VLAN and BD on Dut \| ${dut_node} \| GigabitEthernet0/6/0 \ +| | ... | \| @{vhosts} \| +| | ... +| | [Arguments] | ${dut_node} | ${interface} | @{vhosts} +| | Bridge domain on DUT node is created | ${dut_node} | ${bid_b} | learn=${TRUE} +| | Bridge domain on DUT node is created | ${dut_node} | ${bid_r} | learn=${TRUE} +| | ${interface_name}= | Get interface name | ${dut_node} | ${interface} +| | ${vlan1_name} | ${vlan1_index}= | Create Vlan Subinterface +| | ... | ${dut_node} | ${interface_name} | ${vlan_blue} +| | ${vlan2_name} | ${vlan2_index}= | Create Vlan Subinterface +| | ... | ${dut_node} | ${interface_name} | ${vlan_red} +| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[0] | push-1 +| | ... | tag1_id=${vlan_blue} +| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[1] | push-1 +| | ... | tag1_id=${vlan_blue} +| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[2] | push-1 +| | ... | tag1_id=${vlan_red} +| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[3] | push-1 +| | ... | tag1_id=${vlan_red} +| | Interface is added to bridge domain | ${dut_node} +| | ... | ${vlan1_index} | ${bid_b} | 0 +| | Interface is added to bridge domain | ${dut_node} +| | ... | @{vhosts}[0] | ${bid_b} | 0 +| | Interface is added to bridge domain | ${dut_node} +| | ... | @{vhosts}[1] | ${bid_b} | 0 +| | Interface is added to bridge domain | ${dut_node} +| | ... | ${vlan2_index} | ${bid_r} | 0 +| | Interface is added to bridge domain | ${dut_node} +| | ... | @{vhosts}[2] | ${bid_r} | 0 +| | Interface is added to bridge domain | ${dut_node} +| | ... | @{vhosts}[3] | ${bid_r} | 0 + +| Positive Scenario Ping From DUT1 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} | ${namespace4} + +| Positive Scenario Ping From DUT1 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace4} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace4} + +| Positive Scenario Ping From DUT2 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} | ${namespace4} + +| Positive Scenario Ping From DUT2 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace4} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace4} + +| Negative Scenario Ping From DUT1 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} +| | ... | ${namespace4} + +| Negative Scenario Ping From DUT1 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} +| | ... | ${namespace4} + +| Negative Scenario Ping From DUT2 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} +| | ... | ${namespace4} + +| Negative Scenario Ping From DUT2 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} +| | ... | ${namespace4} diff --git a/tests/func/fds/eth2p-ethip4vxlan-l2bdbasemaclrn--eth-4vhost-2vm-fds-tenant-nets-func.robot b/tests/func/fds/eth2p-ethip4vxlan-l2bdbasemaclrn--eth-4vhost-2vm-fds-tenant-nets-func.robot new file mode 100644 index 0000000000..ba26c8bb55 --- /dev/null +++ b/tests/func/fds/eth2p-ethip4vxlan-l2bdbasemaclrn--eth-4vhost-2vm-fds-tenant-nets-func.robot @@ -0,0 +1,337 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | SKIP_PATCH +| Test Setup | Run Keywords | Setup all DUTs before test +| ... | AND | Save VPP PIDs +| ... | AND | Setup all TGs before traffic script +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Qemu Teardown | ${dut1_node} | ${qemu_node1} +| ... | qemu_node1 +| ... | AND | Qemu Teardown | ${dut2_node} | ${qemu_node2} +| ... | qemu_node2 +| ... | AND | Check VPP PID in Teardown +| Documentation | *Tenant network FDS related.* +| ... +| ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG +| ... | with one link between nodes. Test packets are sent in both directions +| ... | between namespaces in DUT1 and DUT2 with both positive and negative +| ... | scenarios tested. + +*** Variables *** +| ${bd_id1}= | 1 +| ${bd_id2}= | 2 +| ${shg1}= | 3 +| ${shg2}= | 4 +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 +| ${sock3}= | /tmp/sock3 +| ${sock4}= | /tmp/sock4 + +| ${vni_blue}= | 23 +| ${vni_red}= | 24 + +| ${bid_b}= | 23 +| ${bid_r}= | 24 + +| ${dut1_if_ip}= | 16.0.0.1 +| ${dut2_if_ip}= | 16.0.0.2 + +| ${dut1_blue1}= | 16.0.10.1 +| ${dut1_blue2}= | 16.0.10.2 +| ${dut1_red1}= | 16.0.10.3 +| ${dut1_red2}= | 16.0.10.4 + +| ${dut2_blue1}= | 16.0.20.1 +| ${dut2_blue2}= | 16.0.20.2 +| ${dut2_red1}= | 16.0.20.3 +| ${dut2_red2}= | 16.0.20.4 + +| ${namespace1}= | nmspace1 +| ${namespace2}= | nmspace2 +| ${namespace3}= | nmspace3 +| ${namespace4}= | nmspace4 + +| ${prefix_length}= | 16 + +*** Test Cases *** +| L2 test cases with tenant networks (VXLAN) +| | [Documentation] | Ping among all ports inside the same network should pass. +| | ... | a) test l2 connectivity inside every network +| | ... | b) test l2 connectivity between networks +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if_ip} | ${prefix_length} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if_ip} | ${prefix_length} +| | And Set Interface State | ${dut1_node} | ${dut1_to_dut2} | up +| | And Set Interface State | ${dut2_node} | ${dut2_to_dut1} | up +| | ${vhost_if1_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock1} +| | ${vhost_if2_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock2} +| | ${vhost_if3_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock3} +| | ${vhost_if4_DUT1}= | And Vpp Create Vhost User Interface +| | ... | ${dut1_node} | ${sock4} +| | ${dut1_vhosts}= | And Create List | ${vhost_if1_DUT1} | ${vhost_if2_DUT1} +| | ... | ${vhost_if3_DUT1} | ${vhost_if4_DUT1} +| | ${vhost_if1_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock1} +| | ${vhost_if2_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock2} +| | ${vhost_if3_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock3} +| | ${vhost_if4_DUT2}= | And Vpp Create Vhost User Interface +| | ... | ${dut2_node} | ${sock4} +| | ${dut2_vhosts}= | And Create List | ${vhost_if1_DUT2} | ${vhost_if2_DUT2} +| | ... | ${vhost_if3_DUT2} | ${vhost_if4_DUT2} +| | When Setup QEMU Vhost and Run | ${dut1_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${sock3} +| | ... | ${sock4} +| | ... | ${dut1_blue1} +| | ... | ${dut1_blue2} +| | ... | ${dut1_red1} +| | ... | ${dut1_red2} +| | ... | ${prefix_length} +| | ... | qemu_node1 +| | ... | 04 +| | And Setup QEMU Vhost and Run | ${dut2_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${sock3} +| | ... | ${sock4} +| | ... | ${dut2_blue1} +| | ... | ${dut2_blue2} +| | ... | ${dut2_red1} +| | ... | ${dut2_red2} +| | ... | ${prefix_length} +| | ... | qemu_node2 +| | ... | 06 +| | And Setup VXLAN and BD on Dut | ${dut1_node} | ${dut1_if_ip} | ${dut2_if_ip} +| | ... | @{dut1_vhosts} +| | And Setup VXLAN and BD on Dut | ${dut2_node} | ${dut2_if_ip} | ${dut1_if_ip} +| | ... | @{dut2_vhosts} +| | Then Positive Scenario Ping From DUT1 - Intra network +| | And Positive Scenario Ping From DUT1 - Inter network +| | And Positive Scenario Ping From DUT2 - Intra network +| | And Positive Scenario Ping From DUT2 - Inter network +| | And Negative Scenario Ping From DUT1 - Intra network +| | And Negative Scenario Ping From DUT1 - Inter network +| | And Negative Scenario Ping From DUT2 - Intra network +| | And Negative Scenario Ping From DUT2 - Inter network + +*** Keywords *** +| Setup VXLAN and BD on Dut +| | [Documentation] | Setup VXLAN and bridge domain on specific DUT and +| | ... | subsequently interconnect them properly. +| | ... +| | ... | *Arguments:* +| | ... | - dut_node - Node where to setup vxlan and BD. Type: dict +| | ... | - src_ip - Source IP for VXLAN. Type: string +| | ... | - dst_ip - Destination IP for vxlan. Type: string +| | ... | - vhosts - List containing vhost interfaces. +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Setup VXLAN and BD on Dut \| ${dut_node} \| 16.0.0.1 \| 16.0.0.1 \ +| | ... | \| @{vhosts} \| +| | ... +| | [Arguments] | ${dut_node} | ${src_ip} | ${dst_ip} | @{vhosts} +| | Bridge domain on DUT node is created +| | ... | ${dut_node} | ${bid_b} | learn=${TRUE} +| | Bridge domain on DUT node is created +| | ... | ${dut_node} | ${bid_r} | learn=${TRUE} +| | ${vxlan1_if}= | Create VXLAN interface | ${dut_node} | ${vni_blue} +| | | ... | ${src_ip} | ${dst_ip} +| | ${vxlan2_if}= | Create VXLAN interface | ${dut_node} | ${vni_red} +| | | ... | ${src_ip} | ${dst_ip} +| | Interface is added to bridge domain +| | ... | ${dut_node} | ${vxlan1_if} | ${bid_b} | 0 +| | Interface is added to bridge domain +| | ... | ${dut_node} | @{vhosts}[0] | ${bid_b} | 0 +| | Interface is added to bridge domain +| | ... | ${dut_node} | @{vhosts}[1] | ${bid_b} | 0 +| | Interface is added to bridge domain +| | ... | ${dut_node} | ${vxlan2_if} | ${bid_r} | 0 +| | Interface is added to bridge domain +| | ... | ${dut_node} | @{vhosts}[2] | ${bid_r} | 0 +| | Interface is added to bridge domain +| | ... | ${dut_node} | @{vhosts}[3] | ${bid_r} | 0 + +| Positive Scenario Ping From DUT1 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} | ${namespace4} + +| Positive Scenario Ping From DUT1 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace4} +| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace4} + +| Positive Scenario Ping From DUT2 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} | ${namespace4} + +| Positive Scenario Ping From DUT2 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test connectivity. +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace1} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace2} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace3} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace4} +| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace4} + +| Negative Scenario Ping From DUT1 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} +| | ... | ${namespace4} + + +| Negative Scenario Ping From DUT1 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} +| | ... | ${namespace4} + +| Negative Scenario Ping From DUT2 - Intra network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} +| | ... | ${namespace4} + + +| Negative Scenario Ping From DUT2 - Inter network +| | [Documentation] | Send ping packets from specified namespaces to other in +| | ... | order to test unreachability of namespaces. +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} +| | ... | ${namespace1} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} +| | ... | ${namespace2} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} +| | ... | ${namespace3} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} +| | ... | ${namespace4} +| | Run keyword and expect error | Ping Not Successful +| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} +| | ... | ${namespace4} diff --git a/tests/func/fds/provider_network.robot b/tests/func/fds/provider_network.robot deleted file mode 100644 index 612825d9a4..0000000000 --- a/tests/func/fds/provider_network.robot +++ /dev/null @@ -1,343 +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/ipv4.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/double_qemu_setup.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | SKIP_PATCH -| Test Setup | Run Keywords | Setup all DUTs before test -| ... | AND | Save VPP PIDs -| ... | AND | Setup all TGs before traffic script -| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| ... | AND | Show vpp trace dump on all DUTs -| ... | AND | Qemu Teardown | ${dut1_node} | ${qemu_node1} -| ... | qemu_node1 -| ... | AND | Qemu Teardown | ${dut2_node} | ${qemu_node2} -| ... | qemu_node2 -| ... | AND | Check VPP PID in Teardown -| Documentation | *Provider network FDS related.* -| ... -| ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG -| ... | with one link between nodes. Test packets are sent in both directions -| ... | between namespaces in DUT1 and DUT2 with both positive and negative -| ... | scenarios tested. - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 -| ${shg1}= | 3 -| ${shg2}= | 4 -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 -| ${sock3}= | /tmp/sock3 -| ${sock4}= | /tmp/sock4 - -| ${bid_b}= | 23 -| ${bid_r}= | 24 - -| ${vlan_red}= | 50 -| ${vlan_blue}= | 60 - -| ${dut1_if_ip}= | 16.0.0.1 -| ${dut2_if_ip}= | 16.0.0.2 - -| ${dut1_blue1}= | 16.0.10.1 -| ${dut1_blue2}= | 16.0.10.2 -| ${dut1_red1}= | 16.0.10.3 -| ${dut1_red2}= | 16.0.10.4 - -| ${dut2_blue1}= | 16.0.20.1 -| ${dut2_blue2}= | 16.0.20.2 -| ${dut2_red1}= | 16.0.20.3 -| ${dut2_red2}= | 16.0.20.4 - -| ${namespace1}= | nmspace1 -| ${namespace2}= | nmspace2 -| ${namespace3}= | nmspace3 -| ${namespace4}= | nmspace4 - -| ${prefix_length}= | 16 - -*** Test Cases *** -| Provider network test cases with provider physical networks (VLAN) -| | [Documentation] | Ping among all ports inside the same network should pass. -| | ... | a) test l2 connectivity inside every network -| | ... | b) test l2 connectivity between networks -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | Given Path for 3-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if_ip} -| | ... | ${prefix_length} -| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if_ip} -| | ... | ${prefix_length} -| | And Set Interface State | ${dut1_node} | ${dut1_to_dut2} | up -| | And Set Interface State | ${dut2_node} | ${dut2_to_dut1} | up -| | ${vhost_if1_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock1} -| | ${vhost_if2_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock2} -| | ${vhost_if3_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock3} -| | ${vhost_if4_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock4} -| | ${dut1_vhosts}= | And Create List | ${vhost_if1_DUT1} | ${vhost_if2_DUT1} -| | ... | ${vhost_if3_DUT1} | ${vhost_if4_DUT1} -| | ${vhost_if1_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock1} -| | ${vhost_if2_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock2} -| | ${vhost_if3_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock3} -| | ${vhost_if4_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock4} -| | ${dut2_vhosts}= | And Create List | ${vhost_if1_DUT2} | ${vhost_if2_DUT2} -| | ... | ${vhost_if3_DUT2} | ${vhost_if4_DUT2} -| | When Setup QEMU Vhost and Run | ${dut1_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | ... | ${sock3} -| | ... | ${sock4} -| | ... | ${dut1_blue1} -| | ... | ${dut1_blue2} -| | ... | ${dut1_red1} -| | ... | ${dut1_red2} -| | ... | ${prefix_length} -| | ... | qemu_node1 -| | ... | 04 -| | And Setup QEMU Vhost and Run | ${dut2_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | ... | ${sock3} -| | ... | ${sock4} -| | ... | ${dut2_blue1} -| | ... | ${dut2_blue2} -| | ... | ${dut2_red1} -| | ... | ${dut2_red2} -| | ... | ${prefix_length} -| | ... | qemu_node2 -| | ... | 06 -| | And Setup VLAN and BD on Dut | ${dut1_node} | ${dut1_to_dut2} -| | ... | @{dut1_vhosts} -| | And Setup VLAN and BD on Dut | ${dut2_node} | ${dut2_to_dut1} -| | ... | @{dut2_vhosts} -| | Then Positive Scenario Ping From DUT1 - Intra network -| | And Positive Scenario Ping From DUT1 - Inter network -| | And Positive Scenario Ping From DUT2 - Intra network -| | And Positive Scenario Ping From DUT2 - Inter network -| | And Negative Scenario Ping From DUT1 - Intra network -| | And Negative Scenario Ping From DUT1 - Inter network -| | And Negative Scenario Ping From DUT2 - Intra network -| | And Negative Scenario Ping From DUT2 - Inter network - -*** Keywords *** -| Setup VLAN and BD on Dut -| | [Documentation] | Setup VLAN and bridge domain on specific DUT and -| | ... | subsequently interconnect them properly. Also set VLAN tag -| | ... | rewrite on vhosts. -| | ... -| | ... | *Arguments:* -| | ... | - dut_node - Node where to setup VLAN and BD. Type: dict -| | ... | - interface - Interface where to create VLAN sub-interface. -| | ... | Type: string -| | ... | - vhosts - List containing vhost interfaces. -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Setup VLAN and BD on Dut \| ${dut_node} \| GigabitEthernet0/6/0 \ -| | ... | \| @{vhosts} \| -| | ... -| | [Arguments] | ${dut_node} | ${interface} | @{vhosts} -| | Bridge domain on DUT node is created | ${dut_node} | ${bid_b} | learn=${TRUE} -| | Bridge domain on DUT node is created | ${dut_node} | ${bid_r} | learn=${TRUE} -| | ${interface_name}= | Get interface name | ${dut_node} | ${interface} -| | ${vlan1_name} | ${vlan1_index}= | Create Vlan Subinterface -| | ... | ${dut_node} | ${interface_name} | ${vlan_blue} -| | ${vlan2_name} | ${vlan2_index}= | Create Vlan Subinterface -| | ... | ${dut_node} | ${interface_name} | ${vlan_red} -| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[0] | push-1 -| | ... | tag1_id=${vlan_blue} -| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[1] | push-1 -| | ... | tag1_id=${vlan_blue} -| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[2] | push-1 -| | ... | tag1_id=${vlan_red} -| | L2 Vlan Tag Rewrite | ${dut_node} | @{vhosts}[3] | push-1 -| | ... | tag1_id=${vlan_red} -| | Interface is added to bridge domain | ${dut_node} -| | ... | ${vlan1_index} | ${bid_b} | 0 -| | Interface is added to bridge domain | ${dut_node} -| | ... | @{vhosts}[0] | ${bid_b} | 0 -| | Interface is added to bridge domain | ${dut_node} -| | ... | @{vhosts}[1] | ${bid_b} | 0 -| | Interface is added to bridge domain | ${dut_node} -| | ... | ${vlan2_index} | ${bid_r} | 0 -| | Interface is added to bridge domain | ${dut_node} -| | ... | @{vhosts}[2] | ${bid_r} | 0 -| | Interface is added to bridge domain | ${dut_node} -| | ... | @{vhosts}[3] | ${bid_r} | 0 - -| Positive Scenario Ping From DUT1 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} | ${namespace4} - -| Positive Scenario Ping From DUT1 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace4} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace4} - -| Positive Scenario Ping From DUT2 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} | ${namespace4} - -| Positive Scenario Ping From DUT2 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace4} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace4} - -| Negative Scenario Ping From DUT1 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} -| | ... | ${namespace4} - -| Negative Scenario Ping From DUT1 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} -| | ... | ${namespace4} - -| Negative Scenario Ping From DUT2 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} -| | ... | ${namespace4} - -| Negative Scenario Ping From DUT2 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} -| | ... | ${namespace4} diff --git a/tests/func/fds/tenant_network.robot b/tests/func/fds/tenant_network.robot deleted file mode 100644 index ba26c8bb55..0000000000 --- a/tests/func/fds/tenant_network.robot +++ /dev/null @@ -1,337 +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/ipv4.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/double_qemu_setup.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | SKIP_PATCH -| Test Setup | Run Keywords | Setup all DUTs before test -| ... | AND | Save VPP PIDs -| ... | AND | Setup all TGs before traffic script -| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| ... | AND | Show vpp trace dump on all DUTs -| ... | AND | Qemu Teardown | ${dut1_node} | ${qemu_node1} -| ... | qemu_node1 -| ... | AND | Qemu Teardown | ${dut2_node} | ${qemu_node2} -| ... | qemu_node2 -| ... | AND | Check VPP PID in Teardown -| Documentation | *Tenant network FDS related.* -| ... -| ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG -| ... | with one link between nodes. Test packets are sent in both directions -| ... | between namespaces in DUT1 and DUT2 with both positive and negative -| ... | scenarios tested. - -*** Variables *** -| ${bd_id1}= | 1 -| ${bd_id2}= | 2 -| ${shg1}= | 3 -| ${shg2}= | 4 -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 -| ${sock3}= | /tmp/sock3 -| ${sock4}= | /tmp/sock4 - -| ${vni_blue}= | 23 -| ${vni_red}= | 24 - -| ${bid_b}= | 23 -| ${bid_r}= | 24 - -| ${dut1_if_ip}= | 16.0.0.1 -| ${dut2_if_ip}= | 16.0.0.2 - -| ${dut1_blue1}= | 16.0.10.1 -| ${dut1_blue2}= | 16.0.10.2 -| ${dut1_red1}= | 16.0.10.3 -| ${dut1_red2}= | 16.0.10.4 - -| ${dut2_blue1}= | 16.0.20.1 -| ${dut2_blue2}= | 16.0.20.2 -| ${dut2_red1}= | 16.0.20.3 -| ${dut2_red2}= | 16.0.20.4 - -| ${namespace1}= | nmspace1 -| ${namespace2}= | nmspace2 -| ${namespace3}= | nmspace3 -| ${namespace4}= | nmspace4 - -| ${prefix_length}= | 16 - -*** Test Cases *** -| L2 test cases with tenant networks (VXLAN) -| | [Documentation] | Ping among all ports inside the same network should pass. -| | ... | a) test l2 connectivity inside every network -| | ... | b) test l2 connectivity between networks -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if_ip} | ${prefix_length} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if_ip} | ${prefix_length} -| | And Set Interface State | ${dut1_node} | ${dut1_to_dut2} | up -| | And Set Interface State | ${dut2_node} | ${dut2_to_dut1} | up -| | ${vhost_if1_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock1} -| | ${vhost_if2_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock2} -| | ${vhost_if3_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock3} -| | ${vhost_if4_DUT1}= | And Vpp Create Vhost User Interface -| | ... | ${dut1_node} | ${sock4} -| | ${dut1_vhosts}= | And Create List | ${vhost_if1_DUT1} | ${vhost_if2_DUT1} -| | ... | ${vhost_if3_DUT1} | ${vhost_if4_DUT1} -| | ${vhost_if1_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock1} -| | ${vhost_if2_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock2} -| | ${vhost_if3_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock3} -| | ${vhost_if4_DUT2}= | And Vpp Create Vhost User Interface -| | ... | ${dut2_node} | ${sock4} -| | ${dut2_vhosts}= | And Create List | ${vhost_if1_DUT2} | ${vhost_if2_DUT2} -| | ... | ${vhost_if3_DUT2} | ${vhost_if4_DUT2} -| | When Setup QEMU Vhost and Run | ${dut1_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | ... | ${sock3} -| | ... | ${sock4} -| | ... | ${dut1_blue1} -| | ... | ${dut1_blue2} -| | ... | ${dut1_red1} -| | ... | ${dut1_red2} -| | ... | ${prefix_length} -| | ... | qemu_node1 -| | ... | 04 -| | And Setup QEMU Vhost and Run | ${dut2_node} -| | ... | ${sock1} -| | ... | ${sock2} -| | ... | ${sock3} -| | ... | ${sock4} -| | ... | ${dut2_blue1} -| | ... | ${dut2_blue2} -| | ... | ${dut2_red1} -| | ... | ${dut2_red2} -| | ... | ${prefix_length} -| | ... | qemu_node2 -| | ... | 06 -| | And Setup VXLAN and BD on Dut | ${dut1_node} | ${dut1_if_ip} | ${dut2_if_ip} -| | ... | @{dut1_vhosts} -| | And Setup VXLAN and BD on Dut | ${dut2_node} | ${dut2_if_ip} | ${dut1_if_ip} -| | ... | @{dut2_vhosts} -| | Then Positive Scenario Ping From DUT1 - Intra network -| | And Positive Scenario Ping From DUT1 - Inter network -| | And Positive Scenario Ping From DUT2 - Intra network -| | And Positive Scenario Ping From DUT2 - Inter network -| | And Negative Scenario Ping From DUT1 - Intra network -| | And Negative Scenario Ping From DUT1 - Inter network -| | And Negative Scenario Ping From DUT2 - Intra network -| | And Negative Scenario Ping From DUT2 - Inter network - -*** Keywords *** -| Setup VXLAN and BD on Dut -| | [Documentation] | Setup VXLAN and bridge domain on specific DUT and -| | ... | subsequently interconnect them properly. -| | ... -| | ... | *Arguments:* -| | ... | - dut_node - Node where to setup vxlan and BD. Type: dict -| | ... | - src_ip - Source IP for VXLAN. Type: string -| | ... | - dst_ip - Destination IP for vxlan. Type: string -| | ... | - vhosts - List containing vhost interfaces. -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Setup VXLAN and BD on Dut \| ${dut_node} \| 16.0.0.1 \| 16.0.0.1 \ -| | ... | \| @{vhosts} \| -| | ... -| | [Arguments] | ${dut_node} | ${src_ip} | ${dst_ip} | @{vhosts} -| | Bridge domain on DUT node is created -| | ... | ${dut_node} | ${bid_b} | learn=${TRUE} -| | Bridge domain on DUT node is created -| | ... | ${dut_node} | ${bid_r} | learn=${TRUE} -| | ${vxlan1_if}= | Create VXLAN interface | ${dut_node} | ${vni_blue} -| | | ... | ${src_ip} | ${dst_ip} -| | ${vxlan2_if}= | Create VXLAN interface | ${dut_node} | ${vni_red} -| | | ... | ${src_ip} | ${dst_ip} -| | Interface is added to bridge domain -| | ... | ${dut_node} | ${vxlan1_if} | ${bid_b} | 0 -| | Interface is added to bridge domain -| | ... | ${dut_node} | @{vhosts}[0] | ${bid_b} | 0 -| | Interface is added to bridge domain -| | ... | ${dut_node} | @{vhosts}[1] | ${bid_b} | 0 -| | Interface is added to bridge domain -| | ... | ${dut_node} | ${vxlan2_if} | ${bid_r} | 0 -| | Interface is added to bridge domain -| | ... | ${dut_node} | @{vhosts}[2] | ${bid_r} | 0 -| | Interface is added to bridge domain -| | ... | ${dut_node} | @{vhosts}[3] | ${bid_r} | 0 - -| Positive Scenario Ping From DUT1 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} | ${namespace4} - -| Positive Scenario Ping From DUT1 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} | ${namespace4} -| | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} | ${namespace4} - -| Positive Scenario Ping From DUT2 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} | ${namespace4} - -| Positive Scenario Ping From DUT2 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test connectivity. -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace1} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} | ${namespace2} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace3} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} | ${namespace4} -| | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} | ${namespace4} - -| Negative Scenario Ping From DUT1 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut1_blue2} -| | ... | ${namespace4} - - -| Negative Scenario Ping From DUT1 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node1} | ${dut2_blue2} -| | ... | ${namespace4} - -| Negative Scenario Ping From DUT2 - Intra network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut2_blue2} -| | ... | ${namespace4} - - -| Negative Scenario Ping From DUT2 - Inter network -| | [Documentation] | Send ping packets from specified namespaces to other in -| | ... | order to test unreachability of namespaces. -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} -| | ... | ${namespace1} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red1} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_red2} -| | ... | ${namespace2} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} -| | ... | ${namespace3} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue1} -| | ... | ${namespace4} -| | Run keyword and expect error | Ping Not Successful -| | ... | Send Ping From Node To Dst | ${qemu_node2} | ${dut1_blue2} -| | ... | ${namespace4} diff --git a/tests/func/gre/eth2p-ethip4gre-ip4base-func.robot b/tests/func/gre/eth2p-ethip4gre-ip4base-func.robot new file mode 100644 index 0000000000..7087e31326 --- /dev/null +++ b/tests/func/gre/eth2p-ethip4gre-ip4base-func.robot @@ -0,0 +1,306 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/gre.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +| Force Tags | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *GREoIPv4 test cases* +| ... +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes; TG-DUT1-DUT2-TG 3-node circular topology with single +| ... | links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-GRE-IPv4-ICMPv4 on DUT1-DUT2, +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for routing over GRE tunnel; Eth-IPv4-ICMPv4 +| ... | on TG_if1-DUT, Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT for GREoIPv4 +| ... | encapsulation and decapsulation verification. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4 routing +| ... | and static routes. GREoIPv4 tunnel is configured between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are +| ... | sent in both directions by TG on links to DUT1 and DUT2; GREoIPv4 +| ... | encapsulation and decapsulation are verified separately by TG; on +| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) +| ... | src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC2784. + +*** Variables *** +| ${net1_address}= | 192.168.0.0 +| ${net1_host_address}= | 192.168.0.100 +| ${net1_gw_address}= | 192.168.0.1 +| ${net2_address}= | 192.168.2.0 +| ${net2_host_address}= | 192.168.2.100 +| ${net3_address}= | 192.168.3.0 +| ${net3_host_address}= | 192.168.3.100 +| ${net2_gw_address}= | 192.168.2.1 +| ${dut1_ip_address}= | 192.168.1.1 +| ${dut2_ip_address}= | 192.168.1.2 +| ${dut1_gre_ip}= | 172.16.0.1 +| ${dut2_gre_ip}= | 172.16.0.2 +| ${dut_tun0_ip1}= | 172.16.0.1 +| ${dut_tun0_ip2}= | 172.16.0.2 +| ${dut_tun1_ip1}= | 172.16.1.1 +| ${dut_tun1_ip2}= | 172.16.1.2 +| ${dut1_lo_address}= | 10.0.0.1 +| ${tun0_dst}= | 10.0.0.2 +| ${tun1_dst}= | 10.0.0.3 +| ${prefix}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 route over GREoIPv4 tunnel between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-GRE-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure GREoIPv4 tunnel with IPv4 routes towards each other. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across +| | ... | both DUTs and GRE tunnel between them; verify IPv4 headers on +| | ... | received packets are correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 3-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${net1_gw_address} | ${prefix} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_ip_address} | ${prefix} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${net2_gw_address} | ${prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_ip_address} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_ip_address} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${net2_host_address} +| | ... | ${tg_to_dut2_mac} +| | ${dut1_gre_interface} | ${dut1_gre_index}= +| | ... | When GRE tunnel interface is created and up +| | ... | ${dut1_node} | ${dut1_ip_address} | ${dut2_ip_address} +| | ${dut2_gre_interface} | ${dut2_gre_index}= +| | ... | And GRE tunnel interface is created and up +| | ... | ${dut2_node} | ${dut2_ip_address} | ${dut1_ip_address} +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} +| | ... | ${dut2_node} | ${dut2_gre_index} | ${dut2_gre_ip} | ${prefix} +| | And Vpp Route Add | ${dut1_node} | ${net2_address} | ${prefix} +| | ... | ${dut2_gre_ip} | ${dut1_gre_index} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${net1_host_address} | ${net2_host_address} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} + +| TC02: DUT encapsulates IPv4 into GREoIPv4 tunnel - GRE header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure +| | ... | GREoIPv4 tunnel with IPv4 route towards TG. [Ver] Make TG send +| | ... | non-encapsulated ICMPv4 Echo Req to DUT; verify TG received +| | ... | GREoIPv4 encapsulated packet is correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | ${dut1_gre_interface} | ${dut1_gre_index}= +| | ... | When GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_ip_address} | ${dut2_ip_address} +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} +| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} +| | ... | ${dut2_gre_ip} | ${dut1_gre_index} +| | Then Send ICMPv4 and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${net1_host_address} | ${net2_host_address} +| | ... | ${dut1_ip_address} | ${dut2_ip_address} + +| TC03: DUT decapsulates IPv4 from GREoIPv4 tunnel - IPv4 header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure +| | ... | GREoIPv4 tunnel towards TG. [Ver] Make TG send ICMPv4 Echo Req +| | ... | encapsulated into GREoIPv4 towards VPP; verify TG received IPv4 +| | ... | de-encapsulated packet is correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${net1_host_address} +| | ... | ${tg_to_dut_if1_mac} +| | ${dut1_gre_interface} | ${dut1_gre_index}= +| | ... | When GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_ip_address} | ${dut2_ip_address} +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} +| | Then Send GRE and check received ICMPv4 header +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} +| | ... | ${net2_host_address} | ${net1_host_address} +| | ... | ${dut2_ip_address} | ${dut1_ip_address} + +| TC04: DUT encapsulates IPv4 into GREoIPv4 different tunnels - GRE header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two +| | ... | GRE tunnels with loopback's source address. Destination address of +| | ... | tunnels are routed via next hop address of DUT's to TG if2, where +| | ... | should be only GRE encapsulated packets. Each tunnel has IPv4 address +| | ... | and configured prefix routed through the tunnel. [Ver] Make TG send +| | ... | non-encapsulated ICMPv4 Echo Req to DUT; verify TG received GREoIPv4 +| | ... | encapsulated packet is correct for each tunnel. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} +| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | ${dut1_gre0_interface} | ${dut1_gre0_index}= +| | ... | When GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} +| | ${dut1_gre1_interface} | ${dut1_gre1_index}= +| | ... | And GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} +| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} +| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} +| | ... | ${dut_tun0_ip2} | ${dut1_gre0_index} +| | And Vpp Route Add | ${dut_node} | ${net3_address} | ${prefix} +| | ... | ${dut_tun1_ip2} | ${dut1_gre1_index} +| | Then Send ICMPv4 and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${net1_host_address} | ${net2_host_address} +| | ... | ${dut1_lo_address} | ${tun0_dst} +| | And Send ICMPv4 and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${net1_host_address} | ${net3_host_address} +| | ... | ${dut1_lo_address} | ${tun1_dst} + +| TC05: DUT re-encapsulates IPv4 GRE into other GRE tunnel - GRE header verification +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two +| | ... | GRE tunnels with loopback's source address. Destination address of +| | ... | tunnels are routed via next hop address of DUT's to TG if2, where +| | ... | should be only GRE encapsulated packets. Each tunnel has IPv4 address +| | ... | and configured prefix routed through the tunnel. [Ver] Make TG send +| | ... | encapsulated IPv4 UDP to DUT; Encapsulated IP source is behind +| | ... | configured tunnel same as destination; verify TG received GREoIPv4 +| | ... | encapsulated packet is correct. [Ref] RFC2784. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} +| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | ${dut1_gre0_interface} | ${dut1_gre0_index}= +| | ... | When GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} +| | ${dut1_gre1_interface} | ${dut1_gre1_index}= +| | ... | And GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} +| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} +| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} +| | ... | ${dut_tun0_ip2} | ${dut1_gre0_index} +| | And Vpp Route Add | ${dut_node} | ${net3_address} | ${prefix} +| | ... | ${dut_tun1_ip2} | ${dut1_gre1_index} +| | Then Send GRE and check received GRE header +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${dut1_lo_address} | ${tun0_dst} +| | ... | ${net3_host_address} | ${net2_host_address} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${tun1_dst} | ${dut1_lo_address} + +| TC06: DUT do not process GRE with wrong tunnel destination IP +| | [Documentation] +| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ +| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two +| | ... | GRE tunnels with loopback's source address. Destination address of +| | ... | tunnels are routed via next hop address of DUT's to TG if2, where +| | ... | should be only GRE encapsulated packets. On DUT's to TG if1 interface +| | ... | is configured test destination host MAC address. [Ver] Make TG send +| | ... | GRE encapsulated ICMPv4 Echo Req to DUT; verify TG received +| | ... | de-capsulated packet is correct, then send packet with wrong tunnel +| | ... | destination address. [Ref] RFC2784. +| | ... | +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} +| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} +| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${net1_host_address} +| | ... | ${tg_to_dut_if1_mac} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} +| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} +| | ${dut1_gre0_interface} | ${dut1_gre0_index}= +| | ... | When GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} +| | ${dut1_gre1_interface} | ${dut1_gre1_index}= +| | ... | And GRE tunnel interface is created and up +| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} +| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} +| | Then Send GRE and check received ICMPv4 header +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} +| | ... | ${net2_host_address} | ${net1_host_address} +| | ... | ${tun0_dst} | ${dut1_lo_address} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send GRE and check received ICMPv4 header | +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} +| | ... | ${net2_host_address} | ${net1_host_address} +| | ... | ${tun0_dst} | ${dut1_ip_address} diff --git a/tests/func/gre/gre_encapsulation.robot b/tests/func/gre/gre_encapsulation.robot deleted file mode 100644 index 7087e31326..0000000000 --- a/tests/func/gre/gre_encapsulation.robot +++ /dev/null @@ -1,306 +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/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/gre.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -| Force Tags | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *GREoIPv4 test cases* -| ... -| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links -| ... | between nodes; TG-DUT1-DUT2-TG 3-node circular topology with single -| ... | links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-GRE-IPv4-ICMPv4 on DUT1-DUT2, -| ... | Eth-IPv4-ICMPv4 on TG-DUTn for routing over GRE tunnel; Eth-IPv4-ICMPv4 -| ... | on TG_if1-DUT, Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT for GREoIPv4 -| ... | encapsulation and decapsulation verification. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4 routing -| ... | and static routes. GREoIPv4 tunnel is configured between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are -| ... | sent in both directions by TG on links to DUT1 and DUT2; GREoIPv4 -| ... | encapsulation and decapsulation are verified separately by TG; on -| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) -| ... | src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC2784. - -*** Variables *** -| ${net1_address}= | 192.168.0.0 -| ${net1_host_address}= | 192.168.0.100 -| ${net1_gw_address}= | 192.168.0.1 -| ${net2_address}= | 192.168.2.0 -| ${net2_host_address}= | 192.168.2.100 -| ${net3_address}= | 192.168.3.0 -| ${net3_host_address}= | 192.168.3.100 -| ${net2_gw_address}= | 192.168.2.1 -| ${dut1_ip_address}= | 192.168.1.1 -| ${dut2_ip_address}= | 192.168.1.2 -| ${dut1_gre_ip}= | 172.16.0.1 -| ${dut2_gre_ip}= | 172.16.0.2 -| ${dut_tun0_ip1}= | 172.16.0.1 -| ${dut_tun0_ip2}= | 172.16.0.2 -| ${dut_tun1_ip1}= | 172.16.1.1 -| ${dut_tun1_ip2}= | 172.16.1.2 -| ${dut1_lo_address}= | 10.0.0.1 -| ${tun0_dst}= | 10.0.0.2 -| ${tun1_dst}= | 10.0.0.3 -| ${prefix}= | 24 - -*** Test Cases *** -| TC01: DUT1 and DUT2 route over GREoIPv4 tunnel between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-GRE-IPv4-ICMPv4 on \ -| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 -| | ... | configure GREoIPv4 tunnel with IPv4 routes towards each other. -| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across -| | ... | both DUTs and GRE tunnel between them; verify IPv4 headers on -| | ... | received packets are correct. [Ref] RFC2784. -| | [Tags] | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 3-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_ip_address} | ${prefix} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${net1_gw_address} | ${prefix} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_ip_address} | ${prefix} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${net2_gw_address} | ${prefix} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_ip_address} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_ip_address} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${net2_host_address} -| | ... | ${tg_to_dut2_mac} -| | ${dut1_gre_interface} | ${dut1_gre_index}= -| | ... | When GRE tunnel interface is created and up -| | ... | ${dut1_node} | ${dut1_ip_address} | ${dut2_ip_address} -| | ${dut2_gre_interface} | ${dut2_gre_index}= -| | ... | And GRE tunnel interface is created and up -| | ... | ${dut2_node} | ${dut2_ip_address} | ${dut1_ip_address} -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} -| | ... | ${dut2_node} | ${dut2_gre_index} | ${dut2_gre_ip} | ${prefix} -| | And Vpp Route Add | ${dut1_node} | ${net2_address} | ${prefix} -| | ... | ${dut2_gre_ip} | ${dut1_gre_index} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${net1_host_address} | ${net2_host_address} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} - -| TC02: DUT encapsulates IPv4 into GREoIPv4 tunnel - GRE header verification -| | [Documentation] -| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ -| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure -| | ... | GREoIPv4 tunnel with IPv4 route towards TG. [Ver] Make TG send -| | ... | non-encapsulated ICMPv4 Echo Req to DUT; verify TG received -| | ... | GREoIPv4 encapsulated packet is correct. [Ref] RFC2784. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} -| | ... | ${tg_to_dut_if2_mac} -| | ${dut1_gre_interface} | ${dut1_gre_index}= -| | ... | When GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_ip_address} | ${dut2_ip_address} -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} -| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} -| | ... | ${dut2_gre_ip} | ${dut1_gre_index} -| | Then Send ICMPv4 and check received GRE header -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} -| | ... | ${net1_host_address} | ${net2_host_address} -| | ... | ${dut1_ip_address} | ${dut2_ip_address} - -| TC03: DUT decapsulates IPv4 from GREoIPv4 tunnel - IPv4 header verification -| | [Documentation] -| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ -| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure -| | ... | GREoIPv4 tunnel towards TG. [Ver] Make TG send ICMPv4 Echo Req -| | ... | encapsulated into GREoIPv4 towards VPP; verify TG received IPv4 -| | ... | de-encapsulated packet is correct. [Ref] RFC2784. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${net1_host_address} -| | ... | ${tg_to_dut_if1_mac} -| | ${dut1_gre_interface} | ${dut1_gre_index}= -| | ... | When GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_ip_address} | ${dut2_ip_address} -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut1_gre_index} | ${dut1_gre_ip} | ${prefix} -| | Then Send GRE and check received ICMPv4 header -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} -| | ... | ${net2_host_address} | ${net1_host_address} -| | ... | ${dut2_ip_address} | ${dut1_ip_address} - -| TC04: DUT encapsulates IPv4 into GREoIPv4 different tunnels - GRE header verification -| | [Documentation] -| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ -| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two -| | ... | GRE tunnels with loopback's source address. Destination address of -| | ... | tunnels are routed via next hop address of DUT's to TG if2, where -| | ... | should be only GRE encapsulated packets. Each tunnel has IPv4 address -| | ... | and configured prefix routed through the tunnel. [Ver] Make TG send -| | ... | non-encapsulated ICMPv4 Echo Req to DUT; verify TG received GREoIPv4 -| | ... | encapsulated packet is correct for each tunnel. [Ref] RFC2784. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} -| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} -| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} -| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} -| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} -| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} -| | ${dut1_gre0_interface} | ${dut1_gre0_index}= -| | ... | When GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} -| | ${dut1_gre1_interface} | ${dut1_gre1_index}= -| | ... | And GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} -| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} -| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} -| | ... | ${dut_tun0_ip2} | ${dut1_gre0_index} -| | And Vpp Route Add | ${dut_node} | ${net3_address} | ${prefix} -| | ... | ${dut_tun1_ip2} | ${dut1_gre1_index} -| | Then Send ICMPv4 and check received GRE header -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} -| | ... | ${net1_host_address} | ${net2_host_address} -| | ... | ${dut1_lo_address} | ${tun0_dst} -| | And Send ICMPv4 and check received GRE header -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2_mac} -| | ... | ${net1_host_address} | ${net3_host_address} -| | ... | ${dut1_lo_address} | ${tun1_dst} - -| TC05: DUT re-encapsulates IPv4 GRE into other GRE tunnel - GRE header verification -| | [Documentation] -| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ -| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two -| | ... | GRE tunnels with loopback's source address. Destination address of -| | ... | tunnels are routed via next hop address of DUT's to TG if2, where -| | ... | should be only GRE encapsulated packets. Each tunnel has IPv4 address -| | ... | and configured prefix routed through the tunnel. [Ver] Make TG send -| | ... | encapsulated IPv4 UDP to DUT; Encapsulated IP source is behind -| | ... | configured tunnel same as destination; verify TG received GREoIPv4 -| | ... | encapsulated packet is correct. [Ref] RFC2784. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} -| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} -| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} -| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} -| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} -| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} -| | ${dut1_gre0_interface} | ${dut1_gre0_index}= -| | ... | When GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} -| | ${dut1_gre1_interface} | ${dut1_gre1_index}= -| | ... | And GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} -| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} -| | And Vpp Route Add | ${dut_node} | ${net2_address} | ${prefix} -| | ... | ${dut_tun0_ip2} | ${dut1_gre0_index} -| | And Vpp Route Add | ${dut_node} | ${net3_address} | ${prefix} -| | ... | ${dut_tun1_ip2} | ${dut1_gre1_index} -| | Then Send GRE and check received GRE header -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${dut1_lo_address} | ${tun0_dst} -| | ... | ${net3_host_address} | ${net2_host_address} -| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${tun1_dst} | ${dut1_lo_address} - -| TC06: DUT do not process GRE with wrong tunnel destination IP -| | [Documentation] -| | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4 on TG_if1-DUT, \ -| | ... | Eth-IPv4-GRE-IPv4-ICMPv4 on TG_if2_DUT. [Cfg] On DUT1 configure two -| | ... | GRE tunnels with loopback's source address. Destination address of -| | ... | tunnels are routed via next hop address of DUT's to TG if2, where -| | ... | should be only GRE encapsulated packets. On DUT's to TG if1 interface -| | ... | is configured test destination host MAC address. [Ver] Make TG send -| | ... | GRE encapsulated ICMPv4 Echo Req to DUT; verify TG received -| | ... | de-capsulated packet is correct, then send packet with wrong tunnel -| | ... | destination address. [Ref] RFC2784. -| | ... | -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${dut1_lo_index}= | And VPP Create loopback | ${dut_node} -| | And Set Interface State | ${dut_node} | ${dut1_lo_index} | up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut1_ip_address} | ${prefix} -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_gw_address} | ${prefix} -| | ... | ${dut_node} | ${dut1_lo_index} | ${dut1_lo_address} | ${32} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} | ${net1_host_address} -| | ... | ${tg_to_dut_if1_mac} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if2} | ${dut2_ip_address} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | ${tun0_dst} | ${32} -| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} -| | And Vpp Route Add | ${dut_node} | ${tun1_dst} | ${32} -| | ... | ${dut2_ip_address} | ${dut_to_tg_if2} -| | ${dut1_gre0_interface} | ${dut1_gre0_index}= -| | ... | When GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_lo_address} | ${tun0_dst} -| | ${dut1_gre1_interface} | ${dut1_gre1_index}= -| | ... | And GRE tunnel interface is created and up -| | ... | ${dut_node} | ${dut1_lo_address} | ${tun1_dst} -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut1_gre0_index} | ${dut_tun0_ip1} | ${prefix} -| | ... | ${dut_node} | ${dut1_gre1_index} | ${dut_tun1_ip1} | ${prefix} -| | Then Send GRE and check received ICMPv4 header -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} -| | ... | ${net2_host_address} | ${net1_host_address} -| | ... | ${tun0_dst} | ${dut1_lo_address} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send GRE and check received ICMPv4 header | -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1_mac} -| | ... | ${net2_host_address} | ${net1_host_address} -| | ... | ${tun0_dst} | ${dut1_ip_address} diff --git a/tests/func/iacl/ipv4_iacl_untagged.robot b/tests/func/iacl/ipv4_iacl_untagged.robot deleted file mode 100644 index ff55d94374..0000000000 --- a/tests/func/iacl/ipv4_iacl_untagged.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/ipv6_iacl_untagged.robot b/tests/func/iacl/ipv6_iacl_untagged.robot deleted file mode 100644 index 47daac02a5..0000000000 --- a/tests/func/iacl/ipv6_iacl_untagged.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/iacl/l2_iacl_untagged.robot b/tests/func/iacl/l2_iacl_untagged.robot deleted file mode 100644 index 06ecc99176..0000000000 --- a/tests/func/iacl/l2_iacl_untagged.robot +++ /dev/null @@ -1,145 +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 -| ... | 3_NODE_DOUBLE_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-eth-l2xcbase-iaclbase-func.robot b/tests/func/iacl_base/eth2p-eth-l2xcbase-iaclbase-func.robot new file mode 100644 index 0000000000..1914130bac --- /dev/null +++ b/tests/func/iacl_base/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_base/eth2p-ethip4-ip4base-iaclbase-func.robot b/tests/func/iacl_base/eth2p-ethip4-ip4base-iaclbase-func.robot new file mode 100644 index 0000000000..ff55d94374 --- /dev/null +++ b/tests/func/iacl_base/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_base/eth2p-ethip6-ip6base-iaclbase-func.robot b/tests/func/iacl_base/eth2p-ethip6-ip6base-iaclbase-func.robot new file mode 100644 index 0000000000..47daac02a5 --- /dev/null +++ b/tests/func/iacl_base/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/ipsec/eth2p-ethip4ipsectnl-ip4base-func.robot b/tests/func/ipsec/eth2p-ethip4ipsectnl-ip4base-func.robot new file mode 100644 index 0000000000..e7c2967cf9 --- /dev/null +++ b/tests/func/ipsec/eth2p-ethip4ipsectnl-ip4base-func.robot @@ -0,0 +1,499 @@ +# 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/ipsec.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Setup Topology for IPv4 IPsec testing +| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} +| ... | AND | Func Test Teardown +| Documentation | *IPv4 IPsec tunnel mode test suite.* +| ... +| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\ +| ... | loopback an physical interface IPv4 addresses, static ARP record, route\ +| ... | and IPsec manual keyed connection in tunnel mode. +| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\ +| ... | is received on TG from DUT1. +| ... | *[Ref] Applicable standard specifications:* RFC4303. + +*** Variables *** +| ${tg_spi}= | ${1000} +| ${dut_spi}= | ${1001} +| ${ESP_PROTO}= | ${50} +| ${tg_if_ip4}= | 192.168.100.2 +| ${dut_if_ip4}= | 192.168.100.3 +| ${tg_lo_ip4}= | 192.168.3.3 +| ${dut_lo_ip4}= | 192.168.4.4 +| ${ip4_plen}= | ${24} + +*** Test Cases *** +| TC01: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC02: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC03: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC04: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC05: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC06: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC07: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC08: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC09: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC10: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC11: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC12: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC13: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC14: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC15: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC16: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ +| | ... | and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} +| | ... | ${tg_spi} | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC17: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC18: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC19: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +*** Keywords *** +| Get Second Random String +| | [Arguments] | ${req_alg} | ${req_type} +| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} +| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} +| | ... | '${req_type}' == 'Integ' | ${auth_key} +| | :FOR | ${index} | IN RANGE | 100 +| | | ${req_key}= | Generate Random String | ${req_key_len} +| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/eth2p-ethip4ipsectpt-ip4base-func.robot b/tests/func/ipsec/eth2p-ethip4ipsectpt-ip4base-func.robot new file mode 100644 index 0000000000..ca7f1b38fb --- /dev/null +++ b/tests/func/ipsec/eth2p-ethip4ipsectpt-ip4base-func.robot @@ -0,0 +1,464 @@ +# 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/ipsec.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Setup Topology for IPv4 IPsec testing +| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} +| ... | AND | Func Test Teardown +| Documentation | *IPv4 IPsec transport mode test suite.* +| ... +| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\ +| ... | loopback an physical interface IPv4 addresses, static ARP record, route\ +| ... | and IPsec manual keyed connection in transport mode. +| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\ +| ... | is received on TG from DUT1. +| ... | *[Ref] Applicable standard specifications:* RFC4303. + +*** Variables *** +| ${tg_spi}= | ${1000} +| ${dut_spi}= | ${1001} +| ${ESP_PROTO}= | ${50} +| ${tg_if_ip4}= | 192.168.100.2 +| ${dut_if_ip4}= | 192.168.100.3 +| ${tg_lo_ip4}= | 192.168.3.3 +| ${dut_lo_ip4}= | 192.168.4.4 +| ${ip4_plen}= | ${24} + +*** Test Cases *** +| TC01: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC02: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC03: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC04: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC05: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC06: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC07: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC08: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC09: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC10: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC11: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC12: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + + +| TC13: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC14: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC15: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC16: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ +| | ... | and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} +| | ... | ${tg_spi} | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC17: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC18: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC19: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +*** Keywords *** +| Get Second Random String +| | [Arguments] | ${req_alg} | ${req_type} +| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} +| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} +| | ... | '${req_type}' == 'Integ' | ${auth_key} +| | :FOR | ${index} | IN RANGE | 100 +| | | ${req_key}= | Generate Random String | ${req_key_len} +| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/eth2p-ethip6ipsectnl-ip6base-func.robot b/tests/func/ipsec/eth2p-ethip6ipsectnl-ip6base-func.robot new file mode 100644 index 0000000000..60b71fe9d5 --- /dev/null +++ b/tests/func/ipsec/eth2p-ethip6ipsectnl-ip6base-func.robot @@ -0,0 +1,500 @@ +# 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/ipsec.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Setup Topology for IPv6 IPsec testing +| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} +| ... | AND | Func Test Teardown +| Documentation | *IPv6 IPsec tunnel mode test suite.* +| ... +| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure +| ... | loopback an physical interface IPv6 addresses, static ARP record, route +| ... | and IPsec manual keyed connection in tunnel mode. +| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet +| ... | is received on TG from DUT1. +| ... | *[Ref] Applicable standard specifications:* RFC4303. + +*** Variables *** +| ${tg_spi}= | ${1000} +| ${dut_spi}= | ${1001} +| ${ESP_PROTO}= | ${50} +| ${tg_if_ip6}= | 3ffe:5f::1 +| ${dut_if_ip6}= | 3ffe:5f::2 +| ${tg_lo_ip6}= | 3ffe:60::3 +| ${dut_lo_ip6}= | 3ffe:60::4 +| ${ip6_plen}= | ${64} +| ${ip6_plen_rt}= | ${128} + +*** Test Cases *** +| TC01: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC02: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC03: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC04: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC05: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC06: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC07: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC08: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC09: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC10: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC11: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC12: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in tunnel\ +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC13: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC14: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC15: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC16: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ +| | ... | and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} +| | ... | ${tg_spi} | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC17: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC18: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +| TC19: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} +| | ... | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} +| | ... | ${dut_tun_ip} + +*** Keywords *** +| Get Second Random String +| | [Arguments] | ${req_alg} | ${req_type} +| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} +| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} +| | ... | '${req_type}' == 'Integ' | ${auth_key} +| | :FOR | ${index} | IN RANGE | 100 +| | | ${req_key}= | Generate Random String | ${req_key_len} +| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/eth2p-ethip6ipsectpt-ip6base-func.robot b/tests/func/ipsec/eth2p-ethip6ipsectpt-ip6base-func.robot new file mode 100644 index 0000000000..517c01b665 --- /dev/null +++ b/tests/func/ipsec/eth2p-ethip6ipsectpt-ip6base-func.robot @@ -0,0 +1,464 @@ +# 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/ipsec.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Setup Topology for IPv6 IPsec testing +| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} +| ... | AND | Func Test Teardown +| Documentation | *IPv6 IPsec transport mode test suite.* +| ... +| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure +| ... | loopback an physical interface IPv6 addresses, static ARP record, route +| ... | and IPsec manual keyed connection in transport mode. +| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet +| ... | is received on TG from DUT1. +| ... | *[Ref] Applicable standard specifications:* RFC4303. + +*** Variables *** +| ${tg_spi}= | ${1000} +| ${dut_spi}= | ${1001} +| ${ESP_PROTO}= | ${50} +| ${tg_if_ip6}= | 3ffe:5f::1 +| ${dut_if_ip6}= | 3ffe:5f::2 +| ${tg_lo_ip6}= | 3ffe:60::3 +| ${dut_lo_ip6}= | 3ffe:60::4 +| ${ip6_plen}= | ${64} +| ${ip6_plen_rt}= | ${128} + +*** Test Cases *** +| TC01: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC02: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC03: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA1-96 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC04: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC05: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC06: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-256-128 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 256 128 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC07: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC08: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC09: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-384-192 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 384 192 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC10: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC11: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | [Tags] | SKIP_PATCH +| | ${encr_alg}= | Crypto Alg AES CBC 192 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC12: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-512-256 integrity +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in transport +| | ... | mode. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node. +| | ${encr_alg}= | Crypto Alg AES CBC 256 +| | ${auth_alg}= | Integ Alg SHA 512 256 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC13: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC14: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC15: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG. +| | ... | [Ref] RFC4303. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC16: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ +| | ... | and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} +| | ... | ${tg_spi} | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC17: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ +| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ +| | ... | response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC18: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ +| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ +| | ... | no response to be received on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +| TC19: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC4303. +| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ +| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ +| | ... | mode. Then update SA keys - use new keys. +| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ +| | ... | by encryption key different from integrity and encryption keys stored\ +| | ... | on VPP node from TG to VPP node and expect no response to be received\ +| | ... | on TG before and after SA keys update. +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} +| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} +| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto +| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} +| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto +| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ +| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} +| | ... | ${new_encr_key} | ${new_auth_key} +| | Then Run Keyword And Expect Error | ESP packet Rx timeout +| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} +| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} +| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} + +*** Keywords *** +| Get Second Random String +| | [Arguments] | ${req_alg} | ${req_type} +| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} +| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} +| | ... | '${req_type}' == 'Integ' | ${auth_key} +| | :FOR | ${index} | IN RANGE | 100 +| | | ${req_key}= | Generate Random String | ${req_key_len} +| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/ipsec_transport_mode_ipv4.robot b/tests/func/ipsec/ipsec_transport_mode_ipv4.robot deleted file mode 100644 index ca7f1b38fb..0000000000 --- a/tests/func/ipsec/ipsec_transport_mode_ipv4.robot +++ /dev/null @@ -1,464 +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/ipsec.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Setup Topology for IPv4 IPsec testing -| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} -| ... | AND | Func Test Teardown -| Documentation | *IPv4 IPsec transport mode test suite.* -| ... -| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\ -| ... | loopback an physical interface IPv4 addresses, static ARP record, route\ -| ... | and IPsec manual keyed connection in transport mode. -| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\ -| ... | is received on TG from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC4303. - -*** Variables *** -| ${tg_spi}= | ${1000} -| ${dut_spi}= | ${1001} -| ${ESP_PROTO}= | ${50} -| ${tg_if_ip4}= | 192.168.100.2 -| ${dut_if_ip4}= | 192.168.100.3 -| ${tg_lo_ip4}= | 192.168.3.3 -| ${dut_lo_ip4}= | 192.168.4.4 -| ${ip4_plen}= | ${24} - -*** Test Cases *** -| TC01: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC02: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC03: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC04: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC05: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC06: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC07: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC08: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC09: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC10: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC11: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC12: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - - -| TC13: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC14: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC15: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC16: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ -| | ... | and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} -| | ... | ${tg_spi} | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC17: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC18: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC19: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -*** Keywords *** -| Get Second Random String -| | [Arguments] | ${req_alg} | ${req_type} -| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} -| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} -| | ... | '${req_type}' == 'Integ' | ${auth_key} -| | :FOR | ${index} | IN RANGE | 100 -| | | ${req_key}= | Generate Random String | ${req_key_len} -| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/ipsec_transport_mode_ipv6.robot b/tests/func/ipsec/ipsec_transport_mode_ipv6.robot deleted file mode 100644 index 517c01b665..0000000000 --- a/tests/func/ipsec/ipsec_transport_mode_ipv6.robot +++ /dev/null @@ -1,464 +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/ipsec.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Setup Topology for IPv6 IPsec testing -| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} -| ... | AND | Func Test Teardown -| Documentation | *IPv6 IPsec transport mode test suite.* -| ... -| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure -| ... | loopback an physical interface IPv6 addresses, static ARP record, route -| ... | and IPsec manual keyed connection in transport mode. -| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet -| ... | is received on TG from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC4303. - -*** Variables *** -| ${tg_spi}= | ${1000} -| ${dut_spi}= | ${1001} -| ${ESP_PROTO}= | ${50} -| ${tg_if_ip6}= | 3ffe:5f::1 -| ${dut_if_ip6}= | 3ffe:5f::2 -| ${tg_lo_ip6}= | 3ffe:60::3 -| ${dut_lo_ip6}= | 3ffe:60::4 -| ${ip6_plen}= | ${64} -| ${ip6_plen_rt}= | ${128} - -*** Test Cases *** -| TC01: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC02: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC03: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC04: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC05: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC06: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC07: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC08: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC09: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC10: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC11: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC12: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in transport -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC13: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC14: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC15: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC16: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ -| | ... | and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} -| | ... | ${tg_spi} | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC17: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC18: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -| TC19: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip} - -*** Keywords *** -| Get Second Random String -| | [Arguments] | ${req_alg} | ${req_type} -| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} -| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} -| | ... | '${req_type}' == 'Integ' | ${auth_key} -| | :FOR | ${index} | IN RANGE | 100 -| | | ${req_key}= | Generate Random String | ${req_key_len} -| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/ipsec_tunnel_mode_ipv4.robot b/tests/func/ipsec/ipsec_tunnel_mode_ipv4.robot deleted file mode 100644 index e7c2967cf9..0000000000 --- a/tests/func/ipsec/ipsec_tunnel_mode_ipv4.robot +++ /dev/null @@ -1,499 +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/ipsec.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Setup Topology for IPv4 IPsec testing -| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} -| ... | AND | Func Test Teardown -| Documentation | *IPv4 IPsec tunnel mode test suite.* -| ... -| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\ -| ... | loopback an physical interface IPv4 addresses, static ARP record, route\ -| ... | and IPsec manual keyed connection in tunnel mode. -| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\ -| ... | is received on TG from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC4303. - -*** Variables *** -| ${tg_spi}= | ${1000} -| ${dut_spi}= | ${1001} -| ${ESP_PROTO}= | ${50} -| ${tg_if_ip4}= | 192.168.100.2 -| ${dut_if_ip4}= | 192.168.100.3 -| ${tg_lo_ip4}= | 192.168.3.3 -| ${dut_lo_ip4}= | 192.168.4.4 -| ${ip4_plen}= | ${24} - -*** Test Cases *** -| TC01: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC02: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC03: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC04: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC05: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC06: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC07: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC08: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC09: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC10: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC11: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC12: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC13: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC14: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC15: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC16: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ -| | ... | and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} -| | ... | ${tg_spi} | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC17: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC18: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC19: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -*** Keywords *** -| Get Second Random String -| | [Arguments] | ${req_alg} | ${req_type} -| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} -| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} -| | ... | '${req_type}' == 'Integ' | ${auth_key} -| | :FOR | ${index} | IN RANGE | 100 -| | | ${req_key}= | Generate Random String | ${req_key_len} -| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipsec/ipsec_tunnel_mode_ipv6.robot b/tests/func/ipsec/ipsec_tunnel_mode_ipv6.robot deleted file mode 100644 index 60b71fe9d5..0000000000 --- a/tests/func/ipsec/ipsec_tunnel_mode_ipv6.robot +++ /dev/null @@ -1,500 +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/ipsec.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Setup Topology for IPv6 IPsec testing -| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node} -| ... | AND | Func Test Teardown -| Documentation | *IPv6 IPsec tunnel mode test suite.* -| ... -| ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure -| ... | loopback an physical interface IPv6 addresses, static ARP record, route -| ... | and IPsec manual keyed connection in tunnel mode. -| ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet -| ... | is received on TG from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC4303. - -*** Variables *** -| ${tg_spi}= | ${1000} -| ${dut_spi}= | ${1001} -| ${ESP_PROTO}= | ${50} -| ${tg_if_ip6}= | 3ffe:5f::1 -| ${dut_if_ip6}= | 3ffe:5f::2 -| ${tg_lo_ip6}= | 3ffe:60::3 -| ${dut_lo_ip6}= | 3ffe:60::4 -| ${ip6_plen}= | ${64} -| ${ip6_plen_rt}= | ${128} - -*** Test Cases *** -| TC01: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC02: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC03: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA1-96 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC04: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC05: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC06: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-256-128 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 256 128 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC07: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC08: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC09: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-384-192 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 384 192 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC10: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC11: VPP process ESP packet in Tunnel Mode with AES-CBC-192 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | [Tags] | SKIP_PATCH -| | ${encr_alg}= | Crypto Alg AES CBC 192 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC12: VPP process ESP packet in Tunnel Mode with AES-CBC-256 encryption and SHA-512-256 integrity -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in tunnel\ -| | ... | mode. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node. -| | ${encr_alg}= | Crypto Alg AES CBC 256 -| | ${auth_alg}= | Integ Alg SHA 512 256 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC13: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC14: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC15: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel mode. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG. -| | ... | [Ref] RFC4303. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC16: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send and receive ESP packet between TG and VPP node before\ -| | ... | and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key} -| | ... | ${tg_spi} | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC17: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet encrypted by encryption key different from\ -| | ... | encryption key stored on VPP node from TG to VPP node and expect no\ -| | ... | response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC18: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key different\ -| | ... | from integrity key stored on VPP node from TG to VPP node and expect\ -| | ... | no response to be received on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -| TC19: VPP process ESP packet in Tunnel Mode with AES-CBC-128 encryption and SHA1-96 integrity with update SA keys - different encryption and integrity alogrithms used -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC4303. -| | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\ -| | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in tunnel\ -| | ... | mode. Then update SA keys - use new keys. -| | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\ -| | ... | by encryption key different from integrity and encryption keys stored\ -| | ... | on VPP node from TG to VPP node and expect no response to be received\ -| | ... | on TG before and after SA keys update. -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg} -| | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip} -| | ... | ${dut_tun_ip} | ${tg_tun_ip} -| | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto -| | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} -| | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto -| | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ -| | When VPP Update IPsec SA Keys | ${dut_node} | ${l_sa_id} | ${r_sa_id} -| | ... | ${new_encr_key} | ${new_auth_key} -| | Then Run Keyword And Expect Error | ESP packet Rx timeout -| | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac} -| | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi} -| | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip} -| | ... | ${dut_tun_ip} - -*** Keywords *** -| Get Second Random String -| | [Arguments] | ${req_alg} | ${req_type} -| | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg} -| | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key} -| | ... | '${req_type}' == 'Integ' | ${auth_key} -| | :FOR | ${index} | IN RANGE | 100 -| | | ${req_key}= | Generate Random String | ${req_key_len} -| | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key} diff --git a/tests/func/ipv4/ipv4_arp_untagged.robot b/tests/func/ipv4/ipv4_arp_untagged.robot deleted file mode 100644 index 0950610559..0000000000 --- a/tests/func/ipv4/ipv4_arp_untagged.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/ipv4_multipath_routing.robot b/tests/func/ipv4/ipv4_multipath_routing.robot deleted file mode 100644 index f55ee64df9..0000000000 --- a/tests/func/ipv4/ipv4_multipath_routing.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/ipv4_proxy_arp_untagged.robot b/tests/func/ipv4/ipv4_proxy_arp_untagged.robot deleted file mode 100644 index 765a54b6d5..0000000000 --- a/tests/func/ipv4/ipv4_proxy_arp_untagged.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/ipv4/ipv4_untagged.robot b/tests/func/ipv4/ipv4_untagged.robot deleted file mode 100644 index 020d1f143b..0000000000 --- a/tests/func/ipv4/ipv4_untagged.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-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-func.robot new file mode 100644 index 0000000000..020d1f143b --- /dev/null +++ b/tests/func/ipv4_base/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_base/eth2p-ethip4-ip4base-ip4arp-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4arp-func.robot new file mode 100644 index 0000000000..0950610559 --- /dev/null +++ b/tests/func/ipv4_base/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_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4ecmp-func.robot new file mode 100644 index 0000000000..f55ee64df9 --- /dev/null +++ b/tests/func/ipv4_base/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_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot b/tests/func/ipv4_base/eth2p-ethip4-ip4base-ip4proxyarp-func.robot new file mode 100644 index 0000000000..765a54b6d5 --- /dev/null +++ b/tests/func/ipv4_base/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/ipv6/ipv6_multipath_routing.robot b/tests/func/ipv6/ipv6_multipath_routing.robot deleted file mode 100644 index fddf3a98a8..0000000000 --- a/tests/func/ipv6/ipv6_multipath_routing.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/ipv6_ra.robot b/tests/func/ipv6/ipv6_ra.robot deleted file mode 100644 index e45ce730c9..0000000000 --- a/tests/func/ipv6/ipv6_ra.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/ipv6/ipv6_untagged.robot b/tests/func/ipv6/ipv6_untagged.robot deleted file mode 100644 index 6048daad67..0000000000 --- a/tests/func/ipv6/ipv6_untagged.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-func.robot b/tests/func/ipv6_base/eth2p-ethip6-ip6base-func.robot new file mode 100644 index 0000000000..6048daad67 --- /dev/null +++ b/tests/func/ipv6_base/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_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot b/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ecmp-func.robot new file mode 100644 index 0000000000..fddf3a98a8 --- /dev/null +++ b/tests/func/ipv6_base/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_base/eth2p-ethip6-ip6base-ip6ra-func.robot b/tests/func/ipv6_base/eth2p-ethip6-ip6base-ip6ra-func.robot new file mode 100644 index 0000000000..e45ce730c9 --- /dev/null +++ b/tests/func/ipv6_base/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/l2_xconnect/l2_xconnect_untagged.robot b/tests/func/l2_xconnect/l2_xconnect_untagged.robot deleted file mode 100644 index 2554007cef..0000000000 --- a/tests/func/l2_xconnect/l2_xconnect_untagged.robot +++ /dev/null @@ -1,137 +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; TG=DUT1=DUT2=TG 3-node circular topology -| ... | with double parallel links and 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 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:* - -*** Variables *** -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 - -*** 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} - -| TC03: 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] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | 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} -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Check VPP PID in Teardown - -| TC04: 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] -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV -| | 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} -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Check VPP PID in Teardown - 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 new file mode 100644 index 0000000000..b2279b90fc --- /dev/null +++ b/tests/func/l2bd_base/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_base/eth2p-eth-l2bdbasemaclrn-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..a0336e5cc8 --- /dev/null +++ b/tests/func/l2bd_base/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_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..ad5258bb9a --- /dev/null +++ b/tests/func/l2bd_base/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_base/eth2p-eth-l2bdbasemacstc-func.robot b/tests/func/l2bd_base/eth2p-eth-l2bdbasemacstc-func.robot new file mode 100644 index 0000000000..271852e7e6 --- /dev/null +++ b/tests/func/l2bd_base/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_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot b/tests/func/l2bd_base/eth4p-eth-l2bdbasemaclrn-l2shg-func.robot new file mode 100644 index 0000000000..295a03eadc --- /dev/null +++ b/tests/func/l2bd_base/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/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot b/tests/func/l2xc_base/eth2p-eth-l2xcbase-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..583a5ba052 --- /dev/null +++ b/tests/func/l2xc_base/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_base/eth2p-eth-l2xcbase-func.robot b/tests/func/l2xc_base/eth2p-eth-l2xcbase-func.robot new file mode 100644 index 0000000000..aa25225f44 --- /dev/null +++ b/tests/func/l2xc_base/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/lisp/api-crud-lisp-func.robot b/tests/func/lisp/api-crud-lisp-func.robot new file mode 100644 index 0000000000..013eb7258c --- /dev/null +++ b/tests/func/lisp/api-crud-lisp-func.robot @@ -0,0 +1,112 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.LispUtil +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/lisp/lisp_api.robot +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/api/lisp_api_resources.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *API test cases* +| ... +| ... | *[Top] Network Topologies:* DUT1 1-node topology. +| ... | *[Enc] Packet Encapsulations:* None. +| ... | *[Cfg] DUT configuration:* DUT1 gets configured with all LISP +| ... | parameters. +| ... | *[Ver] Verification:* DUT1 operational data gets verified following +| ... | configuration. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Variables *** +| ${locator_set_num}= | 3 + +*** Test Cases *** + +| TC01: DUT can enable and disable LISP +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP enable/disable API; On \ +| | ... | DUT1 enable LISP. [Ver1] Check DUT1 if LISP is enabled. [Cfg2] +| | ... | Then disable LISP. [Ver2] Check DUT1 if LISP is disabled. [Ref] +| | ... | RFC6830. +| | When Enable lisp | ${nodes['DUT1']} +| | Then Check if lisp is enabled | ${nodes['DUT1']} | ${lisp_status} +| | When Disable lisp | ${nodes['DUT1']} +| | Then Check if lisp is disabled | ${nodes['DUT1']} | ${lisp_status} + +| TC02: DUT can add and delete locator_set +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \ +| | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1 +| | ... | configured locator_set and locator are correct. [Cfg2] Then +| | ... | remove locator_set and locator. [Ver2] check DUT1 locator_set +| | ... | and locator are removed. [Ref] RFC6830. +| | Given Lisp locator_set data is prepared +| | ... | ${nodes['DUT1']} | ${locator_set_num} +| | And Enable lisp | ${nodes['DUT1']} +| | When Lisp locator_set data is set | ${nodes['DUT1']} +| | Then Lisp locator_set is set correctly | ${nodes['DUT1']} +| | When Delete all lisp locator_set from VPP | ${nodes['DUT1']} +| | Then Lisp locator_set should be unset | ${nodes['DUT1']} + +| TC03: DUT can add, reset and delete locator_set +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \ +| | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1 +| | ... | locator_set and locator are correct. [Cfg2] Then reset +| | ... | locator_set and set it again. [Ver2] Check DUT1 locator_set and +| | ... | locator are correct. [Cfg3] Then remove locator_set and locator. +| | ... | [Ver3] Check DUT1 all locator_set and locators are removed. +| | ... | [Ref] RFC6830. +| | Given Lisp locator_set data use for test reset locator_set are prepared +| | ... | ${nodes['DUT1']} | ${locator_set_num} +| | And Enable lisp | ${nodes['DUT1']} +| | When Lisp locator_set data is set | ${nodes['DUT1']} +| | Then Lisp locator_set is set correctly | ${nodes['DUT1']} +| | When Delete all lisp locator_set from VPP | ${nodes['DUT1']} +| | Then Lisp locator_set should be unset | ${nodes['DUT1']} + +| TC04: DUT can add and delete eid address +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP eid API; on DUT1 \ +| | ... | configure LISP eid IP address. [Ver1] Check DUT1 configured data +| | ... | is correct. [Cfg2] Remove configured data. [Ver2] Check DUT1 all +| | ... | eid IP addresses are removed. [Ref] RFC6830. +| | Given Enable lisp | ${nodes['DUT1']} +| | When Lisp eid address is set | ${nodes['DUT1']} | ${eid_table} +| | Then Lisp eid address is set correctly to eid table +| | ... | ${nodes['DUT1']} | ${eid_table_vat} +| | When Delete all lisp eid address from VPP | ${nodes['DUT1']} | ${eid_table} +| | Then Lisp eid table should be empty | ${nodes['DUT1']} + +| TC05: DUT can add and delete LISP map resolver address +| | [Documentation] +| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP map resolver address \ +| | ... | API; on DUT1 configure LISP map resolver address. [Ver1] Check +| | ... | DUT1 configured data is correct. [Cfg2] Remove configured data. +| | ... | [Ver2] Check DUT1 all map resolver addresses are removed. [Ref] +| | ... | RFC6830. +| | Given Enable lisp | ${nodes['DUT1']} +| | When Lisp map resolver address is set | ${nodes['DUT1']} | ${map_resolver} +| | Then Lisp map resolver address is set correctly +| | ... | ${nodes['DUT1']} | ${map_resolver} +| | When Delete all lisp map resolver address from VPP +| | ... | ${nodes['DUT1']} | ${map_resolver} +| | Then Lip map resolver address should be empty | ${nodes['DUT1']} diff --git a/tests/func/lisp/api.robot b/tests/func/lisp/api.robot deleted file mode 100644 index 013eb7258c..0000000000 --- a/tests/func/lisp/api.robot +++ /dev/null @@ -1,112 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.LispUtil -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/lisp/lisp_api.robot -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/api/lisp_api_resources.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *API test cases* -| ... -| ... | *[Top] Network Topologies:* DUT1 1-node topology. -| ... | *[Enc] Packet Encapsulations:* None. -| ... | *[Cfg] DUT configuration:* DUT1 gets configured with all LISP -| ... | parameters. -| ... | *[Ver] Verification:* DUT1 operational data gets verified following -| ... | configuration. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Variables *** -| ${locator_set_num}= | 3 - -*** Test Cases *** - -| TC01: DUT can enable and disable LISP -| | [Documentation] -| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP enable/disable API; On \ -| | ... | DUT1 enable LISP. [Ver1] Check DUT1 if LISP is enabled. [Cfg2] -| | ... | Then disable LISP. [Ver2] Check DUT1 if LISP is disabled. [Ref] -| | ... | RFC6830. -| | When Enable lisp | ${nodes['DUT1']} -| | Then Check if lisp is enabled | ${nodes['DUT1']} | ${lisp_status} -| | When Disable lisp | ${nodes['DUT1']} -| | Then Check if lisp is disabled | ${nodes['DUT1']} | ${lisp_status} - -| TC02: DUT can add and delete locator_set -| | [Documentation] -| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \ -| | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1 -| | ... | configured locator_set and locator are correct. [Cfg2] Then -| | ... | remove locator_set and locator. [Ver2] check DUT1 locator_set -| | ... | and locator are removed. [Ref] RFC6830. -| | Given Lisp locator_set data is prepared -| | ... | ${nodes['DUT1']} | ${locator_set_num} -| | And Enable lisp | ${nodes['DUT1']} -| | When Lisp locator_set data is set | ${nodes['DUT1']} -| | Then Lisp locator_set is set correctly | ${nodes['DUT1']} -| | When Delete all lisp locator_set from VPP | ${nodes['DUT1']} -| | Then Lisp locator_set should be unset | ${nodes['DUT1']} - -| TC03: DUT can add, reset and delete locator_set -| | [Documentation] -| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \ -| | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1 -| | ... | locator_set and locator are correct. [Cfg2] Then reset -| | ... | locator_set and set it again. [Ver2] Check DUT1 locator_set and -| | ... | locator are correct. [Cfg3] Then remove locator_set and locator. -| | ... | [Ver3] Check DUT1 all locator_set and locators are removed. -| | ... | [Ref] RFC6830. -| | Given Lisp locator_set data use for test reset locator_set are prepared -| | ... | ${nodes['DUT1']} | ${locator_set_num} -| | And Enable lisp | ${nodes['DUT1']} -| | When Lisp locator_set data is set | ${nodes['DUT1']} -| | Then Lisp locator_set is set correctly | ${nodes['DUT1']} -| | When Delete all lisp locator_set from VPP | ${nodes['DUT1']} -| | Then Lisp locator_set should be unset | ${nodes['DUT1']} - -| TC04: DUT can add and delete eid address -| | [Documentation] -| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP eid API; on DUT1 \ -| | ... | configure LISP eid IP address. [Ver1] Check DUT1 configured data -| | ... | is correct. [Cfg2] Remove configured data. [Ver2] Check DUT1 all -| | ... | eid IP addresses are removed. [Ref] RFC6830. -| | Given Enable lisp | ${nodes['DUT1']} -| | When Lisp eid address is set | ${nodes['DUT1']} | ${eid_table} -| | Then Lisp eid address is set correctly to eid table -| | ... | ${nodes['DUT1']} | ${eid_table_vat} -| | When Delete all lisp eid address from VPP | ${nodes['DUT1']} | ${eid_table} -| | Then Lisp eid table should be empty | ${nodes['DUT1']} - -| TC05: DUT can add and delete LISP map resolver address -| | [Documentation] -| | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP map resolver address \ -| | ... | API; on DUT1 configure LISP map resolver address. [Ver1] Check -| | ... | DUT1 configured data is correct. [Cfg2] Remove configured data. -| | ... | [Ver2] Check DUT1 all map resolver addresses are removed. [Ref] -| | ... | RFC6830. -| | Given Enable lisp | ${nodes['DUT1']} -| | When Lisp map resolver address is set | ${nodes['DUT1']} | ${map_resolver} -| | Then Lisp map resolver address is set correctly -| | ... | ${nodes['DUT1']} | ${map_resolver} -| | When Delete all lisp map resolver address from VPP -| | ... | ${nodes['DUT1']} | ${map_resolver} -| | Then Lip map resolver address should be empty | ${nodes['DUT1']} diff --git a/tests/func/lisp/dataplane_generic.robot b/tests/func/lisp/dataplane_generic.robot deleted file mode 100644 index 9ab69b2d71..0000000000 --- a/tests/func/lisp/dataplane_generic.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 *** -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IP AFI independent functional tests.* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ -| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv4 tunnel is\ -| ... | configured between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr,\ -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg1] On DUT1 and DUT2 configure IPv4 LISP static adjacencies. -| | ... | [Ver1] Make TG send ICMPv4 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Cfg2] Disable LISP. -| | ... | [Ver2] Verify packets are not received via LISP tunnel. -| | ... | [Cfg3] Re-enable LISP. -| | ... | [Ver3] Verify packets are received again via LISP tunnel. -| | ... | [Ref] RFC6830. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut1_to_dut2_ip4} | ${prefix4} -| | ... | ${dut1_node} | ${dut1_to_tg} -| | ... | ${dut1_to_tg_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${dut2_to_dut1_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_tg} -| | ... | ${dut2_to_tg_ip4} | ${prefix4} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} -| | When Set up Lisp topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | When Disable Lisp | ${dut1_node} -| | Then Send packet from Port to Port should failed -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send packet from Port to Port should failed -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | When Enable Lisp | ${dut1_node} -| | And Vpp Add Lisp Adjacency | ${dut1_node} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['vni']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['deid']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['seid']} -| | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']} -| | And Vpp Add Lisp Adjacency | ${dut2_node} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['vni']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['deid']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['seid']} -| | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']} -| | Then Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..32477c02e0 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot @@ -0,0 +1,226 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.IPsecUtil +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/lisp/l2lisp.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *IPv4-ip4-ipsec-lispgpe-ip4 - main fib, vrf (gpe_vni-to-vrf)* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* ICMPv4-IPv4-IPSec-LISPGPE-IPv4-ICMPv4. +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1\ +| ... | via VM to DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Variables *** +| ${dut2_spi}= | ${1000} +| ${dut1_spi}= | ${1001} + +| ${ESP_PROTO}= | ${50} + +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +| ${bid}= | 10 + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMP on DUT1-DUT2, Eth-IPv4-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ +| | ... | between two vhosts. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Show VPP Settings | ${dut1_node} +| | ... | AND | Show VPP Settings | ${dut2_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup 3-node Topology +| | And Add IP Neighbors +| | And Setup Qemu DUT1 +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ +| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Show VPP Settings | ${dut1_node} +| | ... | AND | Show VPP Settings | ${dut2_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup 3-node Topology +| | And Add IP Neighbors +| | And Setup Qemu DUT1 +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.Get Sw If Index +| | ... | ${dut1_node} | lisp_gpe0 +| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.Get Sw If Index +| | ... | ${dut2_node} | lisp_gpe0 +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup 3-node Topology +| | [Documentation] +| | ... | Setup 3-node topology for this test suite. Set all physical\ +| | ... | interfaces up and assing IP adresses to them.\ +| | ... | You can specify fib table ID where the DUT-TG interfaces assign to.\ +| | ... | Default is 0. +| | ... +| | [Arguments] | ${fib_table}=0 +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table} +| | Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table} +| | Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} +| | ... | ${prefix4} +| | Set Interface Address | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} +| | ... | ${prefix4} +| | Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} +| | ... | ${prefix4} +| | Set Interface Address | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} +| | ... | ${prefix4} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} + +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup \ +| | ... | Qemu and bridge the vhosts. +| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | 6.6.1.9 +| | ... | ${prefix4} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-func.robot b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-func.robot new file mode 100644 index 0000000000..f3af311fd0 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-func.robot @@ -0,0 +1,274 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.IPsecUtil +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/lisp/l2lisp.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *IPv4-ip4-ipsec-lispgpe-ip4 - main fib, vrf (gpe_vni-to-vrf)* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* ICMPv4-IPv4-IPSec-LISPGPE-IPv4-ICMPv4. +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ +| ... | DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Variables *** +| ${dut2_spi}= | ${1000} +| ${dut1_spi}= | ${1001} + +| ${ESP_PROTO}= | ${50} + +| ${bid}= | 10 + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ +| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTs. +| | ... | [Ver] Case: ip4-lispgpe-ipsec-ip4 - main fib +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup 3-node Topology +| | And Add IP Neighbors +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ +| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTs. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - main fib +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup 3-node Topology +| | And Add IP Neighbors +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.Get sw if index +| | ... | ${dut1_node} | lisp_gpe0 +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} | ${tg1_ip4} +| | ... | ${tg2_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} | ${tg2_ip4} +| | ... | ${tg1_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC03: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int and VRF on EID is enabled. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ +| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTs. +| | ... | [Ver] Case: ip4-lispgpe-ipsec-ip4 - vrf, main fib +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup 3-node Topology | ${fib_table_1} +| | And Add IP Neighbors | ${fib_table_1} +| | When IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC04: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int and VRF is enabled. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ +| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTs. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - vrf, main fib +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup 3-node Topology | ${fib_table_1} +| | And Add IP Neighbors | ${fib_table_1} +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | When IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.Get sw if index +| | ... | ${dut1_node} | lisp_gpe0 +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} | ${tg1_ip4} +| | ... | ${tg2_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} | ${tg2_ip4} +| | ... | ${tg1_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup 3-node Topology +| | [Documentation] +| | ... | Setup 3-node topology for this test suite. Set all physical\ +| | ... | interfaces up and assing IP adresses to them.\ +| | ... | You can specify fib table ID where the DUT-TG interfaces assign to.\ +| | ... | Default is 0. +| | ... +| | [Arguments] | ${fib_table}=0 +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table} +| | Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table} +| | Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} +| | ... | ${prefix4} +| | Set Interface Address | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} +| | ... | ${prefix4} +| | Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} +| | ... | ${prefix4} +| | Set Interface Address | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} +| | ... | ${prefix4} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..d8bdab78fb --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot @@ -0,0 +1,198 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | resources.libraries.python.VPPUtil +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv4/ipv6_lispgpe_ipsec_ipv4.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\ +| ... | phy2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP,\ +| ... | Eth-IPv4-IPSec-LISPGPE-IPv6-ICMP +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1\ +| ... | via VM to DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ +| | ... | between two vhosts. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And Setup Qemu DUT1 +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ +| | ... | Eth-IPv6-ICMPv6, on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And Setup Qemu DUT1 +| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut1_node} | ${lisp_gpe_int} +| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut2_node} | ${lisp_gpe_int} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology And Lisp +| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ +| | ... | and then setup LISP. +| | [Arguments] | ${fib_table}=0 | ${vni_table}=0 | ${ip6}=${FALSE} +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} +| | ... | ${prefix6} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_table} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_table} +| | Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip_static_adjacency} +| | ... | ${dut2_to_dut1_ip_static_adjacency} +| | ... | ${vni_table} | ${fib_table} + +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup\ +| | ... | Qemu and bridge the vhosts. +| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix6} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} + diff --git a/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-func.robot b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-func.robot new file mode 100644 index 0000000000..2bc4a2cb93 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-func.robot @@ -0,0 +1,161 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | resources.libraries.python.VPPUtil +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv4/ipv6_lispgpe_ipsec_ipv4.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\ +| ... | phy2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP,\ +| ... | Eth-IPv4-IPSec-LISPGPE-IPv6-ICMP +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ +| ... | DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut1_node} | ${lisp_gpe_int} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology And Lisp +| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ +| | ... | and then setup LISP. +| | [Arguments] | ${fib_table}=0 | ${vni_table}=0 | ${ip6}=${FALSE} +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} +| | ... | ${prefix6} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_table} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_table} +| | Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip_static_adjacency} +| | ... | ${dut2_to_dut1_ip_static_adjacency} +| | ... | ${vni_table} | ${fib_table} diff --git a/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6basevrf-func.robot b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6basevrf-func.robot new file mode 100644 index 0000000000..06b883281c --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6basevrf-func.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | resources.libraries.python.VPPUtil +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv4/ipv6_lispgpe_ipsec_ipv4.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\ +| ... | phy2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP,\ +| ... | Eth-IPv4-IPSec-LISPGPE-IPv6-ICMP +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ +| ... | DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ +| | ... | Eth-IPv6-ICMPv6, on TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - vrf, phy2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ip6=${TRUE} +| | Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ip6=${TRUE} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} +| | Setup Topology And Lisp | ${fib_table_1} | ${dut1_dut2_vni} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology And Lisp +| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ +| | ... | and then setup LISP. +| | [Arguments] | ${fib_table}=0 | ${vni_table}=0 | ${ip6}=${FALSE} +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} +| | ... | ${prefix6} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_table} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_table} +| | Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip_static_adjacency} +| | ... | ${dut2_to_dut1_ip_static_adjacency} +| | ... | ${vni_table} | ${fib_table} diff --git a/tests/func/lisp/eth2p-ethip4lisp-ip4base-func.robot b/tests/func/lisp/eth2p-ethip4lisp-ip4base-func.robot new file mode 100644 index 0000000000..9ab69b2d71 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lisp-ip4base-func.robot @@ -0,0 +1,120 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IP AFI independent functional tests.* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is\ +| ... | configured between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ +| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ +| | ... | TG-DUTn. +| | ... | [Cfg1] On DUT1 and DUT2 configure IPv4 LISP static adjacencies. +| | ... | [Ver1] Make TG send ICMPv4 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Cfg2] Disable LISP. +| | ... | [Ver2] Verify packets are not received via LISP tunnel. +| | ... | [Cfg3] Re-enable LISP. +| | ... | [Ver3] Verify packets are received again via LISP tunnel. +| | ... | [Ref] RFC6830. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} +| | ... | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} +| | ... | ${dut2_to_tg_ip4} | ${prefix4} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | When Set up Lisp topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} +| | When Disable Lisp | ${dut1_node} +| | Then Send packet from Port to Port should failed +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send packet from Port to Port should failed +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} +| | When Enable Lisp | ${dut1_node} +| | And Vpp Add Lisp Adjacency | ${dut1_node} +| | ... | ${dut1_to_dut2_ip4_static_adjacency['vni']} +| | ... | ${dut1_to_dut2_ip4_static_adjacency['deid']} +| | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']} +| | ... | ${dut1_to_dut2_ip4_static_adjacency['seid']} +| | ... | ${dut1_to_dut2_ip4_static_adjacency['prefix']} +| | And Vpp Add Lisp Adjacency | ${dut2_node} +| | ... | ${dut2_to_dut1_ip4_static_adjacency['vni']} +| | ... | ${dut2_to_dut1_ip4_static_adjacency['deid']} +| | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']} +| | ... | ${dut2_to_dut1_ip4_static_adjacency['seid']} +| | ... | ${dut2_to_dut1_ip4_static_adjacency['prefix']} +| | Then Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip4lisp-l2bdbasemaclrn-func.robot b/tests/func/lisp/eth2p-ethip4lisp-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..c0a411cc4a --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lisp-l2bdbasemaclrn-func.robot @@ -0,0 +1,96 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.L2Util +| Resource | resources/libraries/robot/traffic.robot +| 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/lisp/l2lisp.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/l2/l2_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| ... +| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4-LISPGpe-IP4 +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: Route IPv4 packet through LISP with Bridge Domain setup. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4-LISPGpe-IP4 +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. Also\ +| | ... | configure BD and assign it to LISP VNI. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP tunnel between them; verify IPv4, Ether headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} +| | When Create L2 BD | ${dut1_node} | ${vpp_bd_id} +| | And Add Interface To L2 BD | ${dut1_node} | ${dut1_to_tg} | ${vpp_bd_id} +| | And Create L2 BD | ${dut2_node} | ${vpp_bd_id} +| | And Add Interface To L2 BD | ${dut2_node} | ${dut2_to_tg} | ${vpp_bd_id} +| | And Set up L2 Lisp on DUT | ${dut1_node} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${lisp_dut_settings} +| | And Set up L2 Lisp on DUT | ${dut2_node} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${lisp_dut_settings} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_if1_mac} | ${tg_if2_mac} +| | ... | ${tg_to_dut2} | ${tg_if1_mac} | ${tg_if2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_if2_mac} | ${tg_if1_mac} +| | ... | ${tg_to_dut1} | ${tg_if2_mac} | ${tg_if1_mac} + + diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..a63925bcd4 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot @@ -0,0 +1,131 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.VhostUser +| Resource | resources/libraries/robot/traffic.robot +| 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/vrf.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using vhost interfaces +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip4-lispgpe-ip4 - main fib, virt2lisp +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | 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 IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | And Setup Qemu DUT1 +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ +| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ +| | ... | where the vhost2 interface should be assigned to. +| | ... +| | [Arguments] | ${fib_table}=0 +| | ... +| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${vhost2} | ${fib_table} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip4base-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip4base-func.robot new file mode 100644 index 0000000000..29e58ea005 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip4base-func.robot @@ -0,0 +1,109 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.VhostUser +| Resource | resources/libraries/robot/traffic.robot +| 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/vrf.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | And Add IP Neighbors +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..8241d32664 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot @@ -0,0 +1,145 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.VhostUser +| Resource | resources/libraries/robot/traffic.robot +| 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/vrf.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using vhost interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip4-lispgpe-ip4 - vrf, virt2lisp +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | 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 Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} +| | And Add IP Neighbors | ${fib_table_1} +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | And Setup Qemu DUT1 | ${fib_table_1} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ +| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ +| | ... | where the vhost2 interface should be assigned to. +| | ... +| | [Arguments] | ${fib_table}=0 +| | ... +| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${vhost2} | ${fib_table} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot new file mode 100644 index 0000000000..0f3b34db2f --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot @@ -0,0 +1,114 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.VhostUser +| Resource | resources/libraries/robot/traffic.robot +| 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/vrf.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip4-lispgpe-ip4 - vrf, phy2lisp +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} +| | And Add IP Neighbors | ${fib_table_1} +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip4_static_adjacency} +| | ... | ${dut2_to_dut1_ip4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip6base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip6base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..77c0df952e --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip6base-eth-2vhost-1vm-func.robot @@ -0,0 +1,119 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.VPPUtil +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *LISP static adjacency test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured\ +| ... | between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ +| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using vhost interfaces +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-lispgpe-ip4 - main fib, virt2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | 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 IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut_prefix6o4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} +| | ... | ${tg_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut2_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut1_to_dut2_mac} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} +| | ... | ${dut1_ip6o4_static_adjacency} +| | ... | ${dut2_ip6o4_static_adjacency} +| | And Setup Qemu DUT1 +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ +| | ... | Qemu and bridge the vhosts. +| | ... +| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip6base-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip6base-func.robot new file mode 100644 index 0000000000..b959ff20d0 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip6base-func.robot @@ -0,0 +1,117 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.VPPUtil +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *LISP static adjacency test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured\ +| ... | between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ +| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] On DUT1 and DUT2 configure IPv4 LISP static adjacencies. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP tunnel between them; verify IPv6 headers on received\ +| | ... | packets are correct. +| | ... | [Cfg2] Reconf LISP. +| | ... | [Ver2] Verify packets are received again via LISP tunnel. +| | ... | [Ref] RFC6830. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4} +| | ... | ${dut1_node} | ${dut1_to_tg} +| | ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_tg} +| | ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} +| | And Add IP Neighbors +| | When Set up Lisp topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} +| | ... | ${dut1_ip6o4_static_adjacency} | ${dut2_ip6o4_static_adjacency} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} +| | When Change Lisp Configuration | ${dut1_node} | ${dut2_node} +| | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac} +| | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut2_to_dut1_ip6o4_reconf} | ${dut_prefix6o4} +| | ... | ${dut1_ip6o4_static_adjacency} +| | ... | ${dut1_ip6o4_static_adjacency_reconf} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/func/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot b/tests/func/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot new file mode 100644 index 0000000000..41d5dcf8cb --- /dev/null +++ b/tests/func/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot @@ -0,0 +1,113 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/qemu.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.VPPUtil +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *LISP static adjacency test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv4 tunnel is configured\ +| ... | between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ +| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-lispgpe-ip4 - vrf, phy2lisp +| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | 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 Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ip6=${TRUE} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ip6=${TRUE} +| | And Add IP Neighbors | ${fib_table_1} +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut_prefix6o4} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut_prefix6o4} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} +| | ... | ${dut1_ip6o4_static_adjacency} +| | ... | ${dut2_ip6o4_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..ae846ad972 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot @@ -0,0 +1,195 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv6/ipv4_lispgpe_ipsec_ipv6.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp, phy2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP,\ +| ... | Eth-IPv6-IPSec-LISPGPE-IPv4-ICMP +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Test cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ +| ... | DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP on DUT1-DUT2, Eth-IPv4-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ +| | ... | between two vhosts. +| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip4 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | VPP Show Errors | ${nodes['DUT1']} +| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And Setup Qemu DUT1 +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ +| | ... | Eth-IPv6-ICMPv6, on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip4 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | VPP Show Errors | ${nodes['DUT1']} +| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And Setup Qemu DUT1 +| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut1_node} | ${lisp_gpe_int} +| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut2_node} | ${lisp_gpe_int} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology And Lisp +| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ +| | ... | and then setup LISP. +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} +| | ... | ${prefix4} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip_static_adjacency} +| | ... | ${dut2_to_dut1_ip_static_adjacency} + +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup\ +| | ... | Qemu and bridge the vhosts. +| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-func.robot b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-func.robot new file mode 100644 index 0000000000..3af4899e54 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-func.robot @@ -0,0 +1,155 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv6/ipv4_lispgpe_ipsec_ipv6.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| ... +| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp, phy2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP,\ +| ... | Eth-IPv6-IPSec-LISPGPE-IPv4-ICMP +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ +| ... | DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP on DUT1-DUT2, Eth-IPv4-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology And Lisp +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut1_node} | ${lisp_gpe_int} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology And Lisp +| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ +| | ... | and then setup LISP. +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} +| | ... | ${prefix4} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} +| | ... | ${prefix4} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} +| | ... | ${tg_to_dut1_mac} +| | Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} +| | ... | ${dut1_to_dut2_ip_static_adjacency} +| | ... | ${dut2_to_dut1_ip_static_adjacency} diff --git a/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..54091a7c9f --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot @@ -0,0 +1,211 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipsec_ipv6.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} +| Test Teardown | Func Test Teardown +| ... +| Documentation | *IPv6 - ip6-ipsec-lispgpe-ip6 - main fib, +| ... | vrf (gpe_vni-to-vrf), phy2lisp, virt2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6,\ +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1\ +| ... | via VM to DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Variables *** +| ${dut2_spi}= | ${1000} +| ${dut1_spi}= | ${1001} + +| ${ESP_PROTO}= | ${50} + +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +| ${bid}= | 10 + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\ +| | ... | on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ +| | ... | between two vhosts. +| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | VPP Show Errors | ${nodes['DUT1']} +| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Show VPP Settings | ${dut1_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology +| | And Setup Qemu DUT1 +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ +| | ... | Eth-IPv6-ICMPv6 on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, virt2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | VPP Show Errors | ${nodes['DUT1']} +| | ... | AND | VPP Show Errors | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Show VPP Settings | ${dut1_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology +| | And Setup Qemu DUT1 +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut1_node} | lisp_gpe0 +| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut2_node} | lisp_gpe0 +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} +| | ... | ${prefix6} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} + +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup \ +| | ... | Qemu and bridge the vhosts. +| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | 2001:cdba:1::9 +| | ... | ${prefix6} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-func.robot b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-func.robot new file mode 100644 index 0000000000..24860d1e86 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-func.robot @@ -0,0 +1,171 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.VPPUtil +| Library | resources.libraries.python.IPsecUtil +| Library | resources.libraries.python.VatJsonUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VhostUser +| Library | resources.libraries.python.QemuUtils +| Library | String +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/ipsec.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +| Resource | resources/libraries/robot/bridge_domain.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipsec_ipv6.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} +| Test Teardown | Func Test Teardown +| ... +| Documentation | *IPv6 - ip6-ipsec-lispgpe-ip6 - main fib, +| ... | vrf (gpe_vni-to-vrf), phy2lisp, virt2lisp* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6,\ +| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ +| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ +| ... | on RLOC interface or lisp_gpe0 interface. +| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1\ +| ... | to DUT2 where it is forwarded to TG(if2). +| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. + +*** Variables *** +| ${dut2_spi}= | ${1000} +| ${dut1_spi}= | ${1001} + +| ${ESP_PROTO}= | ${50} + +| ${bid}= | 10 + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ +| | ... | Eth-IPv6-ICMPv6 on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip6-lispgpe-ipsec-ip6 - main fib, phys2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} +| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} +| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +| TC02: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using IPsec (transport) lisp_gpe0 Int. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ +| | ... | Eth-IPv6-ICMPv6 on TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ +| | ... | IPsec in between DUTS. +| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, phys2lisp\ +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ +| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830, RFC4303. +| | ... +| | ${encr_alg}= | Crypto Alg AES CBC 128 +| | ${auth_alg}= | Integ Alg SHA1 96 +| | Given Setup Topology +| | And Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index +| | ... | ${dut1_node} | lisp_gpe0 +| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} +| | When VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} | ${tg1_ip6} +| | ... | ${tg2_ip6} +| | And VPP Setup IPsec Manual Keyed Connection +| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} +| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} | ${tg2_ip6} +| | ... | ${tg1_ip6} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Topology +| | Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Interfaces in 3-node path are up +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} +| | ... | ${prefix6} +| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} +| | ... | ${prefix6} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} diff --git a/tests/func/lisp/eth2p-ethip6lisp-l2bdbasemaclrn-func.robot b/tests/func/lisp/eth2p-ethip6lisp-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..8f421977f1 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6lisp-l2bdbasemaclrn-func.robot @@ -0,0 +1,96 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.LispUtil +| Library | resources.libraries.python.L2Util +| Resource | resources/libraries/robot/traffic.robot +| 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/lisp/l2lisp.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/l2/l2_ipv6.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| ... +| Documentation | *l2-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IP6-ICMPv6-LISPGpe-IP6 +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge\ +| ... | domains and neighbors. LISPoIPv6 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: Route IPv6 packet through LISP with Bridge Domain setup. +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IP6-ICMPv6-LISPGpe-IP6 +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. Also\ +| | ... | configure BD and assign it to LISP VNI. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP tunnel between them; verify IPv6, Ether headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | 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 IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} +| | When Create L2 BD | ${dut1_node} | ${vpp_bd_id} +| | And Add Interface To L2 BD | ${dut1_node} | ${dut1_to_tg} | ${vpp_bd_id} +| | And Create L2 BD | ${dut2_node} | ${vpp_bd_id} +| | And Add Interface To L2 BD | ${dut2_node} | ${dut2_to_tg} | ${vpp_bd_id} +| | And Set up L2 Lisp on DUT | ${dut1_node} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${lisp_dut_settings} +| | And Set up L2 Lisp on DUT | ${dut2_node} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | ... | ${lisp_dut_settings} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_if1_mac} | ${tg_if2_mac} +| | ... | ${tg_to_dut2} | ${tg_if1_mac} | ${tg_if2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_if2_mac} | ${tg_if1_mac} +| | ... | ${tg_to_dut1} | ${tg_if2_mac} | ${tg_if1_mac} + + diff --git a/tests/func/lisp/eth2p-ethip6lispgpe-ip4base-func.robot b/tests/func/lisp/eth2p-ethip6lispgpe-ip4base-func.robot new file mode 100644 index 0000000000..5a992787a1 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6lispgpe-ip4base-func.robot @@ -0,0 +1,102 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +# import additional Lisp settings from resource file +| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO +| ... | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *LISP static adjacency test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv4-ICMPv4 on\ +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv6\ +| ... | tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ +| ... | routing and static routes. LISPoIPv6 tunnel is configured\ +| ... | between DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ +| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv4 src-addr,\ +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISPoIPv6 tunnel +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] On DUT1 and DUT2 configure IPv6 LISP static adjacencies. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP tunnel between them; verify IPv4 headers on received\ +| | ... | packets are correct. +| | ... | [Cfg2] Reconf LISP. +| | ... | [Ver2] Verify packets are received again via LISP tunnel. +| | ... | [Ref] RFC6830. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut1_to_dut2_ip4o6} | ${dut_prefix4o6} +| | ... | ${dut1_node} | ${dut1_to_tg} +| | ... | ${dut1_to_tg_ip4o6} | ${tg_prefix4o6} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | ... | ${dut2_to_dut1_ip4o6} | ${dut_prefix4o6} +| | ... | ${dut2_node} | ${dut2_to_tg} +| | ... | ${dut2_to_tg_ip4o6} | ${tg_prefix4o6} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4o6} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4o6} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4o6} +| | ... | ${tg_to_dut2_mac} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4o6} +| | ... | ${tg_to_dut1_mac} +| | When Set up Lisp topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip4o6_eid} | ${dut2_ip4o6_eid} +| | ... | ${dut1_ip4o6_static_adjacency} | ${dut2_ip4o6_static_adjacency} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} +| | When Change Lisp Configuration | ${dut1_node} | ${dut2_node} +| | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac} +| | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip4o6} +| | ... | ${dut2_to_dut1_ip4o6_reconf} | ${dut_prefix4o6} +| | ... | ${dut1_ip4o6_static_adjacency} +| | ... | ${dut1_ip4o6_static_adjacency_reconf} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..1f860074e8 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot @@ -0,0 +1,142 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VPPUtil +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv6 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv6 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using vhost interfaces +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, virt2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | 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_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} +| | And Add IP Neighbors +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | And Setup Qemu DUT1 +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ +| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ +| | ... | where the vhost2 interface should be assigned to. +| | ... +| | [Arguments] | ${fib_table}=0 +| | ... +| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip} +| | ... | ${prefix6} +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${vhost2} | ${fib_table} | ipv6=${TRUE} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip6lispgpe-ip6base-func.robot b/tests/func/lisp/eth2p-ethip6lispgpe-ip6base-func.robot new file mode 100644 index 0000000000..d70656f316 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6lispgpe-ip6base-func.robot @@ -0,0 +1,111 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VPPUtil +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv6 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv6 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | Given 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_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} +| | And Add IP Neighbors +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot b/tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..0f48e4f74f --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot @@ -0,0 +1,148 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VPPUtil +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv6 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv6 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using vhost interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-lispgpe-ip6 - vrf, virt2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} +| | ... | AND | Check VPP PID in Teardown +| | ... +| | 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 Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ipv6=${TRUE} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ipv6=${TRUE} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} +| | And Add IP Neighbors | ${fib_table_1} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | And Setup Qemu DUT1 | ${fib_table_1} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Setup Qemu DUT1 +| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ +| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ +| | ... | where the vhost2 interface should be assigned to. +| | ... +| | [Arguments] | ${fib_table}=0 +| | ... +| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} +| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} +| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip} +| | ... | ${prefix6} +| | Assign Interface To Fib Table | ${dut1_node} +| | ... | ${vhost2} | ${fib_table} | ipv6=${TRUE} +| | Set Interface State | ${dut1_node} | ${vhost1} | up +| | Set Interface State | ${dut1_node} | ${vhost2} | up +| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${dut1_to_tg} | ${bid} | 0 +| | Interface is added to bridge domain | ${dut1_node} +| | ... | ${vhost1} | ${bid} | 0 +| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} +| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} +| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} + +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-func.robot b/tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-func.robot new file mode 100644 index 0000000000..5517e62012 --- /dev/null +++ b/tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-func.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.NodePath +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.VPPUtil +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/vrf.robot +| Resource | resources/libraries/robot/lisp/lispgpe.robot +# Import configuration and test data: +| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py +| ... +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP +| ... +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} +| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| ... | AND | Show vpp trace dump on all DUTs +| ... | AND | Show Vpp Settings | ${nodes['DUT1']} +| ... | AND | Show Vpp Settings | ${nodes['DUT2']} +| ... | AND | Check VPP PID in Teardown +| ... +| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ +| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv6 tunnel. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ +| ... | routing and static routes. LISPoIPv6 tunnel is configured between\ +| ... | DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ +| ... | both directions by TG on links to DUT1 and DUT2; on receive\ +| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC6830. + +*** Test Cases *** +| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ +| | ... | TG-DUTn. +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. +| | ... | [Ver] Case: ip6-lispgpe-ip6 - vrf, phy2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ +| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ +| | ... | received packets are correct. +| | ... | [Ref] RFC6830. +| | ... +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Assign Interface To Fib Table | ${dut1_node} +| | ... | ${dut1_to_tg} | ${fib_table_1} | ipv6=${TRUE} +| | And Assign Interface To Fib Table | ${dut2_node} +| | ... | ${dut2_to_tg} | ${fib_table_1} | ipv6=${TRUE} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} +| | And Vpp Set If IPv6 Addr +| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} +| | And Add IP Neighbors | ${fib_table_1} +| | When Set up LISP GPE topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} +| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} +| | ... | ${dut1_to_dut2_ip6_static_adjacency} +| | ... | ${dut2_to_dut1_ip6_static_adjacency} +| | ... | ${dut1_dut2_vni} | ${fib_table_1} +| | Then Send Packet And Check Headers +| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} +| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} +| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} +| | And Send Packet And Check Headers +| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} +| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} +| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} + +*** Keywords *** +| Add IP Neighbors +| | [Documentation] +| | ... | Add IP neighbors to physical interfaces on DUTs.\ +| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. +| | ... +| | [Arguments] | ${fib_id}=0 +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} +| | ... | ${tg_to_dut1_mac} | ${fib_id} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} +| | ... | ${tg_to_dut2_mac} | ${fib_id} +| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} +| | ... | ${dut2_to_dut1_mac} +| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} +| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot b/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot deleted file mode 100644 index 18494ab565..0000000000 --- a/tests/func/lisp/ipsec_ipv4_lispgpe_ipv4.robot +++ /dev/null @@ -1,393 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.LispUtil -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.QemuUtils -| Library | resources.libraries.python.VPPUtil -| Library | resources.libraries.python.IPsecUtil -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/vrf.robot -| Resource | resources/libraries/robot/ipsec.robot -| Resource | resources/libraries/robot/qemu.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/lisp/l2lisp.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv4_ipsec_lispgpe_ipv4/ipv4_ipsec_lispgpe_ipv4.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Func Test Setup -| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| ... | AND | Show vpp trace dump on all DUTs -| ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| ... | AND | Check VPP PID in Teardown -| ... -| Documentation | *IPv4-ip4-ipsec-lispgpe-ip4 - main fib, vrf (gpe_vni-to-vrf) -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* ICMPv4-IPv4-IPSec-LISPGPE-IPv4-ICMPv4. -| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ -| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ -| ... | on RLOC interface or lisp_gpe0 interface. -| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ -| ... | DUT2 where it is forwarded to TG(if2). -| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. - -*** Variables *** -| ${dut2_spi}= | ${1000} -| ${dut1_spi}= | ${1001} -| ${ESP_PROTO}= | ${50} -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 -| ${bid}= | 10 - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ -| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTs. -| | ... | [Ver] Case: ip4-lispgpe-ipsec-ip4 - main fib -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology -| | And Add IP Neighbors -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ -| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTs. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - main fib -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology -| | And Add IP Neighbors -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.Get sw if index -| | ... | ${dut1_node} | lisp_gpe0 -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} | ${tg1_ip4} -| | ... | ${tg2_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} | ${tg2_ip4} -| | ... | ${tg1_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int and VRF on EID is enabled. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ -| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTs. -| | ... | [Ver] Case: ip4-lispgpe-ipsec-ip4 - vrf, main fib -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology | ${fib_table_1} -| | And Add IP Neighbors | ${fib_table_1} -| | When IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC04: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int and VRF is enabled. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ -| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTs. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - vrf, main fib -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology | ${fib_table_1} -| | And Add IP Neighbors | ${fib_table_1} -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | When IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.Get sw if index -| | ... | ${dut1_node} | lisp_gpe0 -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} | ${tg1_ip4} -| | ... | ${tg2_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} | ${tg2_ip4} -| | ... | ${tg1_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC05: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMP on DUT1-DUT2, Eth-IPv4-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ -| | ... | between two vhosts. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Show VPP Settings | ${dut1_node} -| | ... | AND | Show VPP Settings | ${dut2_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology -| | And Add IP Neighbors -| | And Setup Qemu DUT1 -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC06: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2,\ -| | ... | Eth-IPv4-ICMPv4 on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip4 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Show VPP Settings | ${dut1_node} -| | ... | AND | Show VPP Settings | ${dut2_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup 3-node Topology -| | And Add IP Neighbors -| | And Setup Qemu DUT1 -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.Get Sw If Index -| | ... | ${dut1_node} | lisp_gpe0 -| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.Get Sw If Index -| | ... | ${dut2_node} | lisp_gpe0 -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Setup 3-node Topology -| | [Documentation] -| | ... | Setup 3-node topology for this test suite. Set all physical\ -| | ... | interfaces up and assing IP adresses to them.\ -| | ... | You can specify fib table ID where the DUT-TG interfaces assign to.\ -| | ... | Default is 0. -| | ... -| | [Arguments] | ${fib_table}=0 -| | Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Interfaces in 3-node path are up -| | Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table} -| | Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table} -| | Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} -| | ... | ${prefix4} -| | Set Interface Address | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} -| | ... | ${prefix4} -| | Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} -| | ... | ${prefix4} -| | Set Interface Address | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} -| | ... | ${prefix4} - -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs.\ -| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. -| | ... -| | [Arguments] | ${fib_id}=0 -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} | ${fib_id} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} | ${fib_id} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | ... | ${dut1_to_dut2_mac} - -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup \ -| | ... | Qemu and bridge the vhosts. -| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Set Interface Address | ${dut1_node} | ${vhost2} | 6.6.1.9 -| | ... | ${prefix4} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/ipsec_ipv4_lispgpe_ipv6.robot b/tests/func/lisp/ipsec_ipv4_lispgpe_ipv6.robot deleted file mode 100644 index 71ff7d721b..0000000000 --- a/tests/func/lisp/ipsec_ipv4_lispgpe_ipv6.robot +++ /dev/null @@ -1,259 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.L2Util -| Library | resources.libraries.python.LispUtil -| Library | resources.libraries.python.IPsecUtil -| Library | resources.libraries.python.VatJsonUtil -| Library | resources.libraries.python.IPv6Setup -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.QemuUtils -| Library | String -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/ipsec.robot -| Resource | resources/libraries/robot/qemu.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -| Resource | resources/libraries/robot/bridge_domain.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv6/ipv4_lispgpe_ipsec_ipv6.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| ... -| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp, phy2lisp* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:*Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP,\ -| ... | Eth-IPv6-IPSec-LISPGPE-IPv4-ICMP -| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ -| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ -| ... | on RLOC interface or lisp_gpe0 interface. -| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ -| ... | DUT2 where it is forwarded to TG(if2). -| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP on DUT1-DUT2, Eth-IPv4-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut1_node} | ${lisp_gpe_int} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPSec-IPv4-ICMP on DUT1-DUT2, Eth-IPv4-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ -| | ... | between two vhosts. -| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip4 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And Setup Qemu DUT1 -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC04: DUT1 and DUT2 route IPv4 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ -| | ... | Eth-IPv6-ICMPv6, on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip4 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And Setup Qemu DUT1 -| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut1_node} | ${lisp_gpe_int} -| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut2_node} | ${lisp_gpe_int} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Setup Topology And Lisp -| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ -| | ... | and then setup LISP. -| | Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Interfaces in 3-node path are up -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} -| | ... | ${prefix4} -| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} -| | ... | ${prefix4} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} -| | ... | ${dut1_to_dut2_mac} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} -| | Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip_static_adjacency} -| | ... | ${dut2_to_dut1_ip_static_adjacency} - -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup\ -| | ... | Qemu and bridge the vhosts. -| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/ipsec_ipv6_lispgpe_ipv4.robot b/tests/func/lisp/ipsec_ipv6_lispgpe_ipv4.robot deleted file mode 100644 index 2002d9e615..0000000000 --- a/tests/func/lisp/ipsec_ipv6_lispgpe_ipv4.robot +++ /dev/null @@ -1,313 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.L2Util -| Library | resources.libraries.python.LispUtil -| Library | resources.libraries.python.IPsecUtil -| Library | resources.libraries.python.VatJsonUtil -| Library | resources.libraries.python.IPv6Setup -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.QemuUtils -| Library | resources.libraries.python.VPPUtil -| Library | String -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/ipsec.robot -| Resource | resources/libraries/robot/qemu.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -| Resource | resources/libraries/robot/bridge_domain.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv4/ipv6_lispgpe_ipsec_ipv4.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Func Test Setup -| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| ... | AND | Show vpp trace dump on all DUTs -| ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| ... | AND | Check VPP PID in Teardown -| ... -| Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\ -| ... | phy2lisp* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:*Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP,\ -| ... | Eth-IPv4-IPSec-LISPGPE-IPv6-ICMP -| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ -| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ -| ... | on RLOC interface or lisp_gpe0 interface. -| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1 to\ -| ... | DUT2 where it is forwarded to TG(if2). -| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut1_node} | ${lisp_gpe_int} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPSec-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ -| | ... | between two vhosts. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And Setup Qemu DUT1 -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC04: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ -| | ... | Eth-IPv6-ICMPv6, on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology And Lisp -| | And Setup Qemu DUT1 -| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut1_node} | ${lisp_gpe_int} -| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut2_node} | ${lisp_gpe_int} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC05: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ -| | ... | Eth-IPv6-ICMPv6, on TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip4-ipsec-lispgpe-ip6 - vrf, phy2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table_1} | ip6=${TRUE} -| | Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table_1} | ip6=${TRUE} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4} -| | Setup Topology And Lisp | ${fib_table_1} | ${dut1_dut2_vni} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Setup Topology And Lisp -| | [Documentation] | Setup IPs and neighbors for interfaces on DUT1 and DUT2\ -| | ... | and then setup LISP. -| | [Arguments] | ${fib_table}=0 | ${vni_table}=0 | ${ip6}=${FALSE} -| | Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Interfaces in 3-node path are up -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} -| | ... | ${prefix4} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} -| | ... | ${prefix4} -| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} -| | ... | ${prefix6} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} -| | ... | ${tg_to_dut2_mac} | ${fib_table} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | ... | ${dut1_to_dut2_mac} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} -| | ... | ${tg_to_dut1_mac} | ${fib_table} -| | Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip_static_adjacency} -| | ... | ${dut2_to_dut1_ip_static_adjacency} -| | ... | ${vni_table} | ${fib_table} - -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup\ -| | ... | Qemu and bridge the vhosts. -| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix6} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} - diff --git a/tests/func/lisp/ipsec_ipv6_lispgpe_ipv6.robot b/tests/func/lisp/ipsec_ipv6_lispgpe_ipv6.robot deleted file mode 100644 index 16af411f70..0000000000 --- a/tests/func/lisp/ipsec_ipv6_lispgpe_ipv6.robot +++ /dev/null @@ -1,290 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.L2Util -| Library | resources.libraries.python.LispUtil -| Library | resources.libraries.python.VPPUtil -| Library | resources.libraries.python.IPsecUtil -| Library | resources.libraries.python.VatJsonUtil -| Library | resources.libraries.python.IPv6Setup -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.QemuUtils -| Library | String -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/ipsec.robot -| Resource | resources/libraries/robot/qemu.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -| Resource | resources/libraries/robot/bridge_domain.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipsec_ipv6.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} -| Test Teardown | Func Test Teardown -| ... -| Documentation | *IPv6 - ip6-ipsec-lispgpe-ip6 - main fib, -| ... | vrf (gpe_vni-to-vrf), phy2lisp, virt2lisp* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:*Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6,\ -| ... | *[Cfg] DUT configuration:* Each DUT is configured with LISP and IPsec.\ -| ... | IPsec is in transport mode. Tests cases are for IPsec configured both\ -| ... | on RLOC interface or lisp_gpe0 interface. -| ... | *[Ver] TG verification:* Packet is send from TG(if1) across the DUT1\ -| ... | to DUT2 where it is forwarded to TG(if2). -| ... | *[Ref] Applicable standard specifications:* RFC6830, RFC4303. - -*** Variables *** -| ${dut2_spi}= | ${1000} -| ${dut1_spi}= | ${1001} -| ${ESP_PROTO}= | ${50} -| ${sock1}= | /tmp/sock1 -| ${sock2}= | /tmp/sock2 -| ${bid}= | 10 - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ -| | ... | Eth-IPv6-ICMPv6 on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip6-lispgpe-ipsec-ip6 - main fib, phys2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using IPsec (transport) lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ -| | ... | Eth-IPv6-ICMPv6 on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, phys2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | ${lisp_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut1_node} | lisp_gpe0 -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} | ${tg1_ip6} -| | ... | ${tg2_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} | ${tg2_ip6} -| | ... | ${tg1_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on RLOC Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMP on DUT1-DUT2, Eth-IPv6-ICMP\ -| | ... | on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. Create Qemu vm on DUT1 and configure bridge\ -| | ... | between two vhosts. -| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Show VPP Settings | ${dut1_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology -| | And Setup Qemu DUT1 -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC04: DUT1 and DUT2 route IPv6 over Vhost to LISP GPE tunnel using IPsec (transport) on lisp_gpe0 Int. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-IPSec-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2,\ -| | ... | Eth-IPv6-ICMPv6 on TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2 with\ -| | ... | IPsec in between DUTS. -| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, virt2lisp\ -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across\ -| | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830, RFC4303. -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | VPP Show Errors | ${nodes['DUT1']} -| | ... | AND | VPP Show Errors | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Show VPP Settings | ${dut1_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | ${encr_alg}= | Crypto Alg AES CBC 128 -| | ${auth_alg}= | Integ Alg SHA1 96 -| | Given Setup Topology -| | And Setup Qemu DUT1 -| | And Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | ${lisp1_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut1_node} | lisp_gpe0 -| | ${lisp2_if_idx}= | resources.libraries.python.InterfaceUtil.get sw if index -| | ... | ${dut2_node} | lisp_gpe0 -| | And IPsec Generate Keys | ${encr_alg} | ${auth_alg} -| | When VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut1_node} | ${lisp1_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi} -| | ... | ${dut1_to_dut2_ip6} | ${dut2_to_dut1_ip6} -| | And VPP Setup IPsec Manual Keyed Connection -| | ... | ${dut2_node} | ${lisp2_if_idx} | ${encr_alg} | ${encr_key} -| | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi} -| | ... | ${dut2_to_dut1_ip6} | ${dut1_to_dut2_ip6} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Setup Topology -| | Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Interfaces in 3-node path are up -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} -| | ... | ${prefix6} -| | Vpp Set If IPv6 Addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} -| | ... | ${prefix6} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} -| | ... | ${tg_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} -| | ... | ${tg_to_dut2_mac} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} -| | ... | ${dut1_to_dut2_mac} - -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP to one of them. Setup \ -| | ... | Qemu and bridge the vhosts. -| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | 2001:cdba:1::9 -| | ... | ${prefix6} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/ipv4_lispgpe_ipv4.robot b/tests/func/lisp/ipv4_lispgpe_ipv4.robot deleted file mode 100644 index 7caba043da..0000000000 --- a/tests/func/lisp/ipv4_lispgpe_ipv4.robot +++ /dev/null @@ -1,277 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.VPPUtil -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.VhostUser -| Resource | resources/libraries/robot/traffic.robot -| 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/vrf.robot -| Resource | resources/libraries/robot/qemu.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Func Test Setup -| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| ... | AND | Show vpp trace dump on all DUTs -| ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| ... | AND | Check VPP PID in Teardown -| ... -| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\ -| ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ -| ... | DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ -| ... | both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip4-lispgpe-ip4 - vrf, phy2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table_1} -| | And Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table_1} -| | Add IP Neighbors | ${fib_table_1} -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using vhost interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip4-lispgpe-ip4 - main fib, virt2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | 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 IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | ... | ${dut2_to_dut1_mac} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | ... | ${dut1_to_dut2_mac} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | And Setup Qemu DUT1 -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC04: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using vhost interfaces and VRF is enabled -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip4-lispgpe-ip4 - vrf, virt2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | 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 Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table_1} -| | And Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table_1} -| | Add IP Neighbors | ${fib_table_1} -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | And Setup Qemu DUT1 | ${fib_table_1} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ -| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ -| | ... | where the vhost2 interface should be assigned to. -| | ... -| | [Arguments] | ${fib_table}=0 -| | ... -| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} -| | Assign Interface To Fib Table | ${dut1_node} -| | ... | ${vhost2} | ${fib_table} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} - -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs.\ -| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. -| | ... -| | [Arguments] | ${fib_id}=0 -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} | ${fib_id} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} | ${fib_id} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/ipv4_lispgpe_ipv6.robot b/tests/func/lisp/ipv4_lispgpe_ipv6.robot deleted file mode 100644 index fe92ee0882..0000000000 --- a/tests/func/lisp/ipv4_lispgpe_ipv6.robot +++ /dev/null @@ -1,242 +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/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/qemu.robot -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.VhostUser -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.VPPUtil -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *LISP static adjacency test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ -| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ -| ... | routing and static routes. LISPoIPv4 tunnel is configured\ -| ... | between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\ -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv6 src-addr,\ -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] On DUT1 and DUT2 configure IPv4 LISP static adjacencies. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP tunnel between them; verify IPv6 headers on received\ -| | ... | packets are correct. -| | ... | [Cfg2] Reconf LISP. -| | ... | [Ver2] Verify packets are received again via LISP tunnel. -| | ... | [Ref] RFC6830. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4} -| | ... | ${dut1_node} | ${dut1_to_tg} -| | ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4} -| | ... | ${dut2_node} | ${dut2_to_tg} -| | ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} -| | ... | ${tg_to_dut1_mac} -| | When Set up Lisp topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} -| | ... | ${dut1_ip6o4_static_adjacency} | ${dut2_ip6o4_static_adjacency} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | When Change Lisp Configuration | ${dut1_node} | ${dut2_node} -| | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac} -| | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip6o4} -| | ... | ${dut2_to_dut1_ip6o4_reconf} | ${dut_prefix6o4} -| | ... | ${dut1_ip6o4_static_adjacency} -| | ... | ${dut1_ip6o4_static_adjacency_reconf} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-lispgpe-ip4 - vrf, phy2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | 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 Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table_1} | ip6=${TRUE} -| | And Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table_1} | ip6=${TRUE} -| | And Add IP Neighbors | ${fib_table_1} -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6o4} -| | ... | ${dut_prefix6o4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6o4} -| | ... | ${dut_prefix6o4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} -| | ... | ${dut1_ip6o4_static_adjacency} -| | ... | ${dut2_ip6o4_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using vhost interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-lispgpe-ip4 - main fib, virt2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | 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 IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6o4} -| | ... | ${dut_prefix6o4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6o4} -| | ... | ${dut_prefix6o4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} -| | ... | ${tg_to_dut1_mac} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} -| | ... | ${dut2_to_dut1_mac} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} -| | ... | ${dut1_to_dut2_mac} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid} -| | ... | ${dut1_ip6o4_static_adjacency} -| | ... | ${dut2_ip6o4_static_adjacency} -| | And Setup Qemu DUT1 -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - - -*** Keywords *** -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs.\ -| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. -| | ... -| | [Arguments] | ${fib_id}=0 -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4} -| | ... | ${tg_to_dut1_mac} | ${fib_id} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4} -| | ... | ${tg_to_dut2_mac} | ${fib_id} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4} -| | ... | ${dut1_to_dut2_mac} - -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ -| | ... | Qemu and bridge the vhosts. -| | ... -| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Set Interface Address | ${dut1_node} | ${vhost2} | ${vhost_ip} | ${prefix4} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} diff --git a/tests/func/lisp/ipv6_lispgpe_ipv4.robot b/tests/func/lisp/ipv6_lispgpe_ipv4.robot deleted file mode 100644 index 5a992787a1..0000000000 --- a/tests/func/lisp/ipv6_lispgpe_ipv4.robot +++ /dev/null @@ -1,102 +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/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -# import additional Lisp settings from resource file -| Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO -| ... | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *LISP static adjacency test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv4-ICMPv4 on\ -| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv6\ -| ... | tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv6 tunnel is configured\ -| ... | between DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets\ -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr,\ -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISPoIPv6 tunnel -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISP-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] On DUT1 and DUT2 configure IPv6 LISP static adjacencies. -| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP tunnel between them; verify IPv4 headers on received\ -| | ... | packets are correct. -| | ... | [Cfg2] Reconf LISP. -| | ... | [Ver2] Verify packets are received again via LISP tunnel. -| | ... | [Ref] RFC6830. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut1_to_dut2_ip4o6} | ${dut_prefix4o6} -| | ... | ${dut1_node} | ${dut1_to_tg} -| | ... | ${dut1_to_tg_ip4o6} | ${tg_prefix4o6} -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | ... | ${dut2_to_dut1_ip4o6} | ${dut_prefix4o6} -| | ... | ${dut2_node} | ${dut2_to_tg} -| | ... | ${dut2_to_tg_ip4o6} | ${tg_prefix4o6} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4o6} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4o6} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4o6} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4o6} -| | ... | ${tg_to_dut1_mac} -| | When Set up Lisp topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip4o6_eid} | ${dut2_ip4o6_eid} -| | ... | ${dut1_ip4o6_static_adjacency} | ${dut2_ip4o6_static_adjacency} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | When Change Lisp Configuration | ${dut1_node} | ${dut2_node} -| | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac} -| | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip4o6} -| | ... | ${dut2_to_dut1_ip4o6_reconf} | ${dut_prefix4o6} -| | ... | ${dut1_ip4o6_static_adjacency} -| | ... | ${dut1_ip4o6_static_adjacency_reconf} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} \ No newline at end of file diff --git a/tests/func/lisp/ipv6_lispgpe_ipv6.robot b/tests/func/lisp/ipv6_lispgpe_ipv6.robot deleted file mode 100644 index 8b00eda574..0000000000 --- a/tests/func/lisp/ipv6_lispgpe_ipv6.robot +++ /dev/null @@ -1,291 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.IPv6Setup -| Library | resources.libraries.python.VPPUtil -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/default.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/qemu.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/vrf.robot -| Resource | resources/libraries/robot/lisp/lispgpe.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/ipv6_lispgpe_ipv6/ipv6_lispgpe_ipv6.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Vpp All Ra Suppress Link Layer | ${nodes} -| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| ... | AND | Show vpp trace dump on all DUTs -| ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| ... | AND | Check VPP PID in Teardown -| ... -| Documentation | *ip6-lispgpe-ip6 encapsulation test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2,\ -| ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv6 tunnel. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\ -| ... | routing and static routes. LISPoIPv6 tunnel is configured between\ -| ... | DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ -| ... | both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given 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_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} -| | ... | ${tg_to_dut1_mac} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} -| | ... | ${tg_to_dut2_mac} -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} -| | ... | ${dut2_to_dut1_mac} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} -| | ... | ${dut1_to_dut2_mac} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC02: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-lispgpe-ip6 - vrf, phy2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table_1} | ipv6=${TRUE} -| | And Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table_1} | ipv6=${TRUE} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Add IP Neighbors | ${fib_table_1} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC03: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using vhost interfaces -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-ipsec-lispgpe-ip6 - main fib, virt2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | 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_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} -| | ... | ${tg_to_dut1_mac} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} -| | ... | ${tg_to_dut2_mac} -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} -| | ... | ${dut2_to_dut1_mac} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} -| | ... | ${dut1_to_dut2_mac} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | And Setup Qemu DUT1 -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -| TC04: DUT1 and DUT2 route IPv6 bidirectionally over LISP GPE tunnel using vhost interfaces and VRF is enabled -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\ -| | ... | TG-DUTn. -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. -| | ... | [Ver] Case: ip6-lispgpe-ip6 - vrf, virt2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Show vpp trace dump on all DUTs -| | ... | AND | Show Vpp Settings | ${nodes['DUT1']} -| | ... | AND | Show Vpp Settings | ${nodes['DUT2']} -| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node} -| | ... | AND | Check VPP PID in Teardown -| | ... -| | 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 Assign Interface To Fib Table | ${dut1_node} -| | ... | ${dut1_to_tg} | ${fib_table_1} | ipv6=${TRUE} -| | And Assign Interface To Fib Table | ${dut2_node} -| | ... | ${dut2_to_tg} | ${fib_table_1} | ipv6=${TRUE} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} -| | And Vpp Set If IPv6 Addr -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Add IP Neighbors | ${fib_table_1} -| | When Set up LISP GPE topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE} -| | ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | ... | ${dut1_dut2_vni} | ${fib_table_1} -| | And Setup Qemu DUT1 | ${fib_table_1} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dst_vhost_mac} -| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac} -| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} - -*** Keywords *** -| Setup Qemu DUT1 -| | [Documentation] | Setup Vhosts on DUT1 and setup IP on one of them. Setup\ -| | ... | Qemu and bridge the vhosts. Optionally, you can set fib table ID\ -| | ... | where the vhost2 interface should be assigned to. -| | ... -| | [Arguments] | ${fib_table}=0 -| | ... -| | ${vhost1}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock1} -| | ${vhost2}= | Vpp Create Vhost User Interface | ${dut1_node} | ${sock2} -| | Vpp Set If IPv6 Addr | ${dut1_node} | ${vhost2} | ${vhost_ip} -| | ... | ${prefix6} -| | Assign Interface To Fib Table | ${dut1_node} -| | ... | ${vhost2} | ${fib_table} | ipv6=${TRUE} -| | Set Interface State | ${dut1_node} | ${vhost1} | up -| | Set Interface State | ${dut1_node} | ${vhost2} | up -| | Bridge domain on DUT node is created | ${dut1_node} | ${bid} | learn=${TRUE} -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${dut1_to_tg} | ${bid} | 0 -| | Interface is added to bridge domain | ${dut1_node} -| | ... | ${vhost1} | ${bid} | 0 -| | ${vhost_mac}= | Get Vhost User Mac By SW Index | ${dut1_node} | ${vhost2} -| | Set test variable | ${dst_vhost_mac} | ${vhost_mac} -| | VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} | ${sock2} - -| Add IP Neighbors -| | [Documentation] -| | ... | Add IP neighbors to physical interfaces on DUTs.\ -| | ... | You can specify fib table ID for DUT-TG interfaces. Default is 0. -| | ... -| | [Arguments] | ${fib_id}=0 -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} -| | ... | ${tg_to_dut1_mac} | ${fib_id} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} -| | ... | ${tg_to_dut2_mac} | ${fib_id} -| | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} -| | ... | ${dut2_to_dut1_mac} -| | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} -| | ... | ${dut1_to_dut2_mac} \ No newline at end of file diff --git a/tests/func/lisp/l2_lisp_ipv4.robot b/tests/func/lisp/l2_lisp_ipv4.robot deleted file mode 100644 index c0a411cc4a..0000000000 --- a/tests/func/lisp/l2_lisp_ipv4.robot +++ /dev/null @@ -1,96 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.LispUtil -| Library | resources.libraries.python.L2Util -| Resource | resources/libraries/robot/traffic.robot -| 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/lisp/l2lisp.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/l2/l2_ipv4.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| ... -| Documentation | *ip4-lispgpe-ip4 encapsulation test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4-LISPGpe-IP4 -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\ -| ... | routing and static routes. LISPoIPv4 tunnel is configured between\ -| ... | DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\ -| ... | both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\ -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: Route IPv4 packet through LISP with Bridge Domain setup. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4-LISPGpe-IP4 -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2. Also\ -| | ... | configure BD and assign it to LISP VNI. -| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP tunnel between them; verify IPv4, Ether headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} -| | ... | ${dut2_to_dut1_mac} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} -| | ... | ${dut1_to_dut2_mac} -| | When Create L2 BD | ${dut1_node} | ${vpp_bd_id} -| | And Add Interface To L2 BD | ${dut1_node} | ${dut1_to_tg} | ${vpp_bd_id} -| | And Create L2 BD | ${dut2_node} | ${vpp_bd_id} -| | And Add Interface To L2 BD | ${dut2_node} | ${dut2_to_tg} | ${vpp_bd_id} -| | And Set up L2 Lisp on DUT | ${dut1_node} -| | ... | ${dut1_to_dut2_ip4_static_adjacency} -| | ... | ${lisp_dut_settings} -| | And Set up L2 Lisp on DUT | ${dut2_node} -| | ... | ${dut2_to_dut1_ip4_static_adjacency} -| | ... | ${lisp_dut_settings} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4} -| | ... | ${tg_to_dut1} | ${tg_if1_mac} | ${tg_if2_mac} -| | ... | ${tg_to_dut2} | ${tg_if1_mac} | ${tg_if2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4} -| | ... | ${tg_to_dut2} | ${tg_if2_mac} | ${tg_if1_mac} -| | ... | ${tg_to_dut1} | ${tg_if2_mac} | ${tg_if1_mac} - - diff --git a/tests/func/lisp/l2_lisp_ipv6.robot b/tests/func/lisp/l2_lisp_ipv6.robot deleted file mode 100644 index 8f421977f1..0000000000 --- a/tests/func/lisp/l2_lisp_ipv6.robot +++ /dev/null @@ -1,96 +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.topology.Topology -| Library | resources.libraries.python.NodePath -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.LispUtil -| Library | resources.libraries.python.L2Util -| Resource | resources/libraries/robot/traffic.robot -| 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/lisp/l2lisp.robot -# Import configuration and test data: -| Variables | resources/test_data/lisp/l2/l2_ipv6.py -| ... -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP -| ... -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| ... -| Documentation | *l2-lispgpe-ip6 encapsulation test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\ -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IP6-ICMPv6-LISPGpe-IP6 -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge\ -| ... | domains and neighbors. LISPoIPv6 tunnel is configured between\ -| ... | DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\ -| ... | both directions by TG on links to DUT1 and DUT2; on receive\ -| ... | TG verifies packets for correctness and their IPv6 src-addr, dst-addr\ -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC6830. - -*** Test Cases *** -| TC01: Route IPv6 packet through LISP with Bridge Domain setup. -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Enc] Eth-IP6-ICMPv6-LISPGpe-IP6 -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1 and DUT2. Also\ -| | ... | configure BD and assign it to LISP VNI. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\ -| | ... | DUTs and LISP tunnel between them; verify IPv6, Ether headers on\ -| | ... | received packets are correct. -| | ... | [Ref] RFC6830. -| | ... -| | 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 IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip6} | ${prefix6} -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip6} | ${prefix6} -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip6} | ${prefix6} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip6} | ${prefix6} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6} -| | ... | ${tg_to_dut2_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6} -| | ... | ${tg_to_dut1_mac} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6} -| | ... | ${dut2_to_dut1_mac} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6} -| | ... | ${dut1_to_dut2_mac} -| | When Create L2 BD | ${dut1_node} | ${vpp_bd_id} -| | And Add Interface To L2 BD | ${dut1_node} | ${dut1_to_tg} | ${vpp_bd_id} -| | And Create L2 BD | ${dut2_node} | ${vpp_bd_id} -| | And Add Interface To L2 BD | ${dut2_node} | ${dut2_to_tg} | ${vpp_bd_id} -| | And Set up L2 Lisp on DUT | ${dut1_node} -| | ... | ${dut1_to_dut2_ip6_static_adjacency} -| | ... | ${lisp_dut_settings} -| | And Set up L2 Lisp on DUT | ${dut2_node} -| | ... | ${dut2_to_dut1_ip6_static_adjacency} -| | ... | ${lisp_dut_settings} -| | Then Send Packet And Check Headers -| | ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6} -| | ... | ${tg_to_dut1} | ${tg_if1_mac} | ${tg_if2_mac} -| | ... | ${tg_to_dut2} | ${tg_if1_mac} | ${tg_if2_mac} -| | And Send Packet And Check Headers -| | ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6} -| | ... | ${tg_to_dut2} | ${tg_if2_mac} | ${tg_if1_mac} -| | ... | ${tg_to_dut1} | ${tg_if2_mac} | ${tg_if1_mac} - - diff --git a/tests/func/policer/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot b/tests/func/policer/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot new file mode 100644 index 0000000000..4cb3686788 --- /dev/null +++ b/tests/func/policer/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot @@ -0,0 +1,162 @@ +# 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 *** +| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV +| Resource | resources/libraries/robot/policer.robot +| Library | resources.libraries.python.Trace +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Setup Topology for IPv4 policer testing +| Test Teardown | Func Test Teardown +| Documentation | *IPv4 policer test cases* +| ... +| ... | *[Top] Network topologies:* TG=DUT1 2-node topology with two links\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT1 configure interfaces IPv4 adresses,\ +| ... | and static ARP record on the second interface. +| ... | *[Ver] TG verification:* Test packet is sent from TG on the first link\ +| ... | to DUT1. Packet is received on TG on the second link from DUT1. +| ... | *[Ref] Applicable standard specifications:* RFC2474, RFC2697, RFC2698. + +*** Variables *** +| ${tg_to_dut_if1_ip4}= | 192.168.122.2 +| ${tg_to_dut_if2_ip4}= | 192.168.123.2 +| ${dut_to_tg_if1_ip4}= | 192.168.122.1 +| ${dut_to_tg_if2_ip4}= | 192.168.123.1 +| ${ip4_plen}= | ${24} + +| ${cir}= | ${100} +| ${eir}= | ${150} +| ${cb}= | ${200} +| ${eb}= | ${300} + +*** Test Cases *** +| TC01: VPP policer 2R3C Color-aware marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2698. +| | ... | [Cfg] On DUT1 configure 2R3C color-aware policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${cir} +| | And Policer Set EIR | ${eir} +| | And Policer Set CB | ${cb} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 2R3C 2698 +| | And Policer Set Conform Action Transmit +| | And Policer Set Exceed Action Mark and Transmit | ${dscp} +| | And Policer Set Violate Action Drop +| | And Policer Enable Color Aware +| | And Policer Classify Set Precolor Exceed +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} + +| TC02: VPP policer 2R3C Color-blind marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2698. +| | ... | [Cfg] On DUT1 configure 2R3C color-blind policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${cir} +| | And Policer Set EIR | ${eir} +| | And Policer Set CB | ${cb} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 2R3C 2698 +| | And Policer Set Conform Action Mark and Transmit | ${dscp} +| | And Policer Set Exceed Action Transmit +| | And Policer Set Violate Action Drop +| | And Policer Classify Set Precolor Conform +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} + +| TC03: VPP policer 1R3C Color-aware marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2697. +| | ... | [Cfg] On DUT1 configure 1R3C color-aware policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${1} +| | And Policer Set CB | ${2} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 1R3C +| | And Policer Set Conform Action Transmit +| | And Policer Set Exceed Action Mark and Transmit | ${dscp} +| | And Policer Set Violate Action Drop +| | And Policer Enable Color Aware +| | And Policer Classify Set Precolor Exceed +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} + +| TC04: VPP policer 1R3C Color-blind marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2697. +| | ... | [Cfg] On DUT1 configure 1R3C color-blind policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${cir} +| | And Policer Set CB | ${cb} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 1R3C +| | And Policer Set Conform Action Mark and Transmit | ${dscp} +| | And Policer Set Exceed Action Transmit +| | And Policer Set Violate Action Drop +| | And Policer Classify Set Precolor Conform +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} \ No newline at end of file diff --git a/tests/func/policer/eth2p-ethip6-ip6base-ipolicemarkbase-func.robot b/tests/func/policer/eth2p-ethip6-ip6base-ipolicemarkbase-func.robot new file mode 100644 index 0000000000..6a7ae1a306 --- /dev/null +++ b/tests/func/policer/eth2p-ethip6-ip6base-ipolicemarkbase-func.robot @@ -0,0 +1,161 @@ +# 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 *** +| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV +| Resource | resources/libraries/robot/policer.robot +| Library | resources.libraries.python.Trace +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Setup Topology for IPv6 policer testing +| Test Teardown | Func Test Teardown +| Documentation | *IPv6 policer test cases* +| ... +| ... | *[Top] Network topologies:* TG=DUT1 2-node topology with two links\ +| ... | between nodes. +| ... | *[Cfg] DUT configuration:* On DUT1 configure interfaces IPv6 adresses,\ +| ... | and static neighbor record on the second interface. +| ... | *[Ver] TG verification:* Test packet is sent from TG on the first link\ +| ... | to DUT1. Packet is received on TG on the second link from DUT1. +| ... | *[Ref] Applicable standard specifications:* RFC2474, RFC2697, RFC2698. + +*** Variables *** +| ${tg_to_dut_if1_ip6}= | 3ffe:5f::2 +| ${tg_to_dut_if2_ip6}= | 3ffe:60::2 +| ${dut_to_tg_if1_ip6}= | 3ffe:5f::1 +| ${dut_to_tg_if2_ip6}= | 3ffe:60::1 +| ${ip6_plen}= | ${64} + +| ${cir}= | ${100} +| ${eir}= | ${150} +| ${cb}= | ${200} +| ${eb}= | ${300} + +*** Test Cases *** +| TC01: VPP policer 2R3C Color-aware marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2698. +| | ... | [Cfg] On DUT1 configure 2R3C color-aware policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${cir} +| | And Policer Set EIR | ${eir} +| | And Policer Set CB | ${cb} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 2R3C 2698 +| | And Policer Set Conform Action Transmit +| | And Policer Set Exceed Action Mark and Transmit | ${dscp} +| | And Policer Set Violate Action Drop +| | And Policer Enable Color Aware +| | And Policer Classify Set Precolor Exceed +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} + +| TC02: VPP policer 2R3C Color-blind marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2698. +| | ... | [Cfg] On DUT1 configure 2R3C color-blind policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${cir} +| | And Policer Set EIR | ${eir} +| | And Policer Set CB | ${cb} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 2R3C 2698 +| | And Policer Set Conform Action Mark and Transmit | ${dscp} +| | And Policer Set Exceed Action Transmit +| | And Policer Set Violate Action Drop +| | And Policer Classify Set Precolor Conform +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} + +| TC03: VPP policer 1R3C Color-aware marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2697. +| | ... | [Cfg] On DUT1 configure 1R3C color-aware policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${1} +| | And Policer Set CB | ${2} +| | And Policer Set EB | ${eb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 1R3C +| | And Policer Set Conform Action Transmit +| | And Policer Set Exceed Action Mark and Transmit | ${dscp} +| | And Policer Set Violate Action Drop +| | And Policer Enable Color Aware +| | And Policer Classify Set Precolor Exceed +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} + +| TC04: VPP policer 1R3C Color-blind marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2697. +| | ... | [Cfg] On DUT1 configure 1R3C color-blind policer on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ +| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ +| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. +| | ${dscp}= | DSCP AF22 +| | Given Policer Set Name | policer1 +| | And Policer Set Node | ${dut_node} +| | And Policer Set CIR | ${cir} +| | And Policer Set CB | ${cb} +| | And Policer Set Rate Type pps +| | And Policer Set Round Type Closest +| | And Policer Set Type 1R3C +| | And Policer Set Conform Action Mark and Transmit | ${dscp} +| | And Policer Set Exceed Action Transmit +| | And Policer Set Violate Action Drop +| | And Policer Classify Set Precolor Conform +| | And Policer Classify Set Interface | ${dut_to_tg_if1} +| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} +| | When Policer Set Configuration +| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} diff --git a/tests/func/policer/policer_ip4.robot b/tests/func/policer/policer_ip4.robot deleted file mode 100644 index 4cb3686788..0000000000 --- a/tests/func/policer/policer_ip4.robot +++ /dev/null @@ -1,162 +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 *** -| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV -| Resource | resources/libraries/robot/policer.robot -| Library | resources.libraries.python.Trace -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Setup Topology for IPv4 policer testing -| Test Teardown | Func Test Teardown -| Documentation | *IPv4 policer test cases* -| ... -| ... | *[Top] Network topologies:* TG=DUT1 2-node topology with two links\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 configure interfaces IPv4 adresses,\ -| ... | and static ARP record on the second interface. -| ... | *[Ver] TG verification:* Test packet is sent from TG on the first link\ -| ... | to DUT1. Packet is received on TG on the second link from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC2474, RFC2697, RFC2698. - -*** Variables *** -| ${tg_to_dut_if1_ip4}= | 192.168.122.2 -| ${tg_to_dut_if2_ip4}= | 192.168.123.2 -| ${dut_to_tg_if1_ip4}= | 192.168.122.1 -| ${dut_to_tg_if2_ip4}= | 192.168.123.1 -| ${ip4_plen}= | ${24} - -| ${cir}= | ${100} -| ${eir}= | ${150} -| ${cb}= | ${200} -| ${eb}= | ${300} - -*** Test Cases *** -| TC01: VPP policer 2R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] On DUT1 configure 2R3C color-aware policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set EIR | ${eir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 2R3C 2698 -| | And Policer Set Conform Action Transmit -| | And Policer Set Exceed Action Mark and Transmit | ${dscp} -| | And Policer Set Violate Action Drop -| | And Policer Enable Color Aware -| | And Policer Classify Set Precolor Exceed -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC02: VPP policer 2R3C Color-blind marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] On DUT1 configure 2R3C color-blind policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set EIR | ${eir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 2R3C 2698 -| | And Policer Set Conform Action Mark and Transmit | ${dscp} -| | And Policer Set Exceed Action Transmit -| | And Policer Set Violate Action Drop -| | And Policer Classify Set Precolor Conform -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC03: VPP policer 1R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2697. -| | ... | [Cfg] On DUT1 configure 1R3C color-aware policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${1} -| | And Policer Set CB | ${2} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 1R3C -| | And Policer Set Conform Action Transmit -| | And Policer Set Exceed Action Mark and Transmit | ${dscp} -| | And Policer Set Violate Action Drop -| | And Policer Enable Color Aware -| | And Policer Classify Set Precolor Exceed -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC04: VPP policer 1R3C Color-blind marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2697. -| | ... | [Cfg] On DUT1 configure 1R3C color-blind policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 1R3C -| | And Policer Set Conform Action Mark and Transmit | ${dscp} -| | And Policer Set Exceed Action Transmit -| | And Policer Set Violate Action Drop -| | And Policer Classify Set Precolor Conform -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} \ No newline at end of file diff --git a/tests/func/policer/policer_ip6.robot b/tests/func/policer/policer_ip6.robot deleted file mode 100644 index 6a7ae1a306..0000000000 --- a/tests/func/policer/policer_ip6.robot +++ /dev/null @@ -1,161 +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 *** -| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV -| Resource | resources/libraries/robot/policer.robot -| Library | resources.libraries.python.Trace -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Setup Topology for IPv6 policer testing -| Test Teardown | Func Test Teardown -| Documentation | *IPv6 policer test cases* -| ... -| ... | *[Top] Network topologies:* TG=DUT1 2-node topology with two links\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 configure interfaces IPv6 adresses,\ -| ... | and static neighbor record on the second interface. -| ... | *[Ver] TG verification:* Test packet is sent from TG on the first link\ -| ... | to DUT1. Packet is received on TG on the second link from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC2474, RFC2697, RFC2698. - -*** Variables *** -| ${tg_to_dut_if1_ip6}= | 3ffe:5f::2 -| ${tg_to_dut_if2_ip6}= | 3ffe:60::2 -| ${dut_to_tg_if1_ip6}= | 3ffe:5f::1 -| ${dut_to_tg_if2_ip6}= | 3ffe:60::1 -| ${ip6_plen}= | ${64} - -| ${cir}= | ${100} -| ${eir}= | ${150} -| ${cb}= | ${200} -| ${eb}= | ${300} - -*** Test Cases *** -| TC01: VPP policer 2R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] On DUT1 configure 2R3C color-aware policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set EIR | ${eir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 2R3C 2698 -| | And Policer Set Conform Action Transmit -| | And Policer Set Exceed Action Mark and Transmit | ${dscp} -| | And Policer Set Violate Action Drop -| | And Policer Enable Color Aware -| | And Policer Classify Set Precolor Exceed -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC02: VPP policer 2R3C Color-blind marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] On DUT1 configure 2R3C color-blind policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set EIR | ${eir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 2R3C 2698 -| | And Policer Set Conform Action Mark and Transmit | ${dscp} -| | And Policer Set Exceed Action Transmit -| | And Policer Set Violate Action Drop -| | And Policer Classify Set Precolor Conform -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC03: VPP policer 1R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2697. -| | ... | [Cfg] On DUT1 configure 1R3C color-aware policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${1} -| | And Policer Set CB | ${2} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 1R3C -| | And Policer Set Conform Action Transmit -| | And Policer Set Exceed Action Mark and Transmit | ${dscp} -| | And Policer Set Violate Action Drop -| | And Policer Enable Color Aware -| | And Policer Classify Set Precolor Exceed -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC04: VPP policer 1R3C Color-blind marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2697. -| | ... | [Cfg] On DUT1 configure 1R3C color-blind policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv6 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv6 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set CB | ${cb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 1R3C -| | And Policer Set Conform Action Mark and Transmit | ${dscp} -| | And Policer Set Exceed Action Transmit -| | And Policer Set Violate Action Drop -| | And Policer Classify Set Precolor Conform -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send Packet and Verify Marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} diff --git a/tests/func/rpf/eth2p-ethip4-ip4base-rpf-func.robot b/tests/func/rpf/eth2p-ethip4-ip4base-rpf-func.robot new file mode 100644 index 0000000000..372940dd82 --- /dev/null +++ b/tests/func/rpf/eth2p-ethip4-ip4base-rpf-func.robot @@ -0,0 +1,134 @@ +# 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 | *Source RPF check on IPv4 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 IP source check on link to TG, +| ... | *[Ver] TG verification:* Test ICMP 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 which source address +| ... | is not in routes are dropped. + +*** Variables *** +| ${dut1_to_tg_ip}= | 192.168.1.1 +| ${dut1_to_tg_ip_GW}= | 192.168.1.2 +| ${dut1_to_dut2_ip}= | 192.168.2.1 +| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 +| ${test_dst_ip}= | 32.0.0.1 +| ${pass_test_src_ip}= | 16.0.0.1 +| ${drop_test_src_ip}= | 24.0.0.1 +| ${prefix_length}= | 24 + +*** Test Cases *** +| TC01: VPP source RPF check on IPv4 src-addr +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG +| | ... | [Cfg] On DUT1 setup IP source check. +| | ... | [Ver] Make TG verify matching packets which source address +| | ... | is not in routes 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} | resolve_attempts=${NONE} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip_GW} +| | ... | ${tg_to_dut1_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${pass_test_src_ip} | ${prefix_length} +| | ... | ${dut1_to_tg_ip_GW} | ${dut1_to_tg} | resolve_attempts=${NONE} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${pass_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} +| | ... | ${drop_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} +| | ${dut1_to_tg_name}= | Get Interface Name | ${dut1_node} | ${dut1_to_tg} +| | When VPP IP Source Check Setup | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${pass_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} +| | ... | ${dut1_to_tg_ip_GW} | ${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 from Port to Port should failed | ${tg_node} +| | ... | ${drop_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} + +| TC02: VPP pass traffic on non-enabled RPF interface +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG +| | ... | [Cfg] On DUT1 setup IP source check. +| | ... | [Ver] Make TG verify matching packets on non-enabled RPF interface +| | ... | are passed. +| | 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} | resolve_attempts=${NONE} +| | And Add Arp On Dut +| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip_GW} +| | ... | ${tg_to_dut1_mac} +| | And Vpp Route Add +| | ... | ${dut1_node} | ${pass_test_src_ip} | ${prefix_length} +| | ... | ${dut1_to_tg_ip_GW} | ${dut1_to_tg} | resolve_attempts=${NONE} +| | And L2 setup xconnect on DUT +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} +| | ${dut1_to_tg_name}= | Get Interface Name | ${dut1_node} | ${dut1_to_tg} +| | When VPP IP Source Check Setup | ${dut1_node} | ${dut1_to_tg_name} +| | Then Send Packet And Check Headers | ${tg_node} +| | ... | ${test_dst_ip} | ${pass_test_src_ip} | ${tg_to_dut2} +| | ... | ${tg_to_dut2_mac} | ${dut1_to_dut2_mac} | ${tg_to_dut1} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${test_dst_ip} | ${dut1_to_tg_ip_GW} | ${tg_to_dut2} +| | ... | ${tg_to_dut2_mac} | ${dut1_to_dut2_mac} | ${tg_to_dut1} +| | ... | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} diff --git a/tests/func/rpf/ipv4_rpf_untagged.robot b/tests/func/rpf/ipv4_rpf_untagged.robot deleted file mode 100644 index 708477a71d..0000000000 --- a/tests/func/rpf/ipv4_rpf_untagged.robot +++ /dev/null @@ -1,134 +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 | *Source RPF check on IPv4 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 IP source check on link to TG, -| ... | *[Ver] TG verification:*Test ICMP 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 which source address -| ... | is not in routes are dropped. - -*** Variables *** -| ${dut1_to_tg_ip}= | 192.168.1.1 -| ${dut1_to_tg_ip_GW}= | 192.168.1.2 -| ${dut1_to_dut2_ip}= | 192.168.2.1 -| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 -| ${test_dst_ip}= | 32.0.0.1 -| ${pass_test_src_ip}= | 16.0.0.1 -| ${drop_test_src_ip}= | 24.0.0.1 -| ${prefix_length}= | 24 - -*** Test Cases *** -| TC01: VPP source RPF check on IPv4 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG -| | ... | [Cfg] On DUT1 setup IP source check. -| | ... | [Ver] Make TG verify matching packets which source address -| | ... | is not in routes 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} | resolve_attempts=${NONE} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip_GW} -| | ... | ${tg_to_dut1_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${pass_test_src_ip} | ${prefix_length} -| | ... | ${dut1_to_tg_ip_GW} | ${dut1_to_tg} | resolve_attempts=${NONE} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${pass_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} -| | ... | ${drop_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} -| | ${dut1_to_tg_name}= | Get Interface Name | ${dut1_node} | ${dut1_to_tg} -| | When VPP IP Source Check Setup | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${pass_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} -| | ... | ${dut1_to_tg_ip_GW} | ${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 from Port to Port should failed | ${tg_node} -| | ... | ${drop_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} - -| TC02: VPP pass traffic on non-enabled RPF interface -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG -| | ... | [Cfg] On DUT1 setup IP source check. -| | ... | [Ver] Make TG verify matching packets on non-enabled RPF interface -| | ... | are passed. -| | 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} | resolve_attempts=${NONE} -| | And Add Arp On Dut -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip_GW} -| | ... | ${tg_to_dut1_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${pass_test_src_ip} | ${prefix_length} -| | ... | ${dut1_to_tg_ip_GW} | ${dut1_to_tg} | resolve_attempts=${NONE} -| | And L2 setup xconnect on DUT -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | ${dut1_to_tg_name}= | Get Interface Name | ${dut1_node} | ${dut1_to_tg} -| | When VPP IP Source Check Setup | ${dut1_node} | ${dut1_to_tg_name} -| | Then Send Packet And Check Headers | ${tg_node} -| | ... | ${test_dst_ip} | ${pass_test_src_ip} | ${tg_to_dut2} -| | ... | ${tg_to_dut2_mac} | ${dut1_to_dut2_mac} | ${tg_to_dut1} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${test_dst_ip} | ${dut1_to_tg_ip_GW} | ${tg_to_dut2} -| | ... | ${tg_to_dut2_mac} | ${dut1_to_dut2_mac} | ${tg_to_dut1} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut1_mac} diff --git a/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot b/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot new file mode 100644 index 0000000000..f96ee19b4e --- /dev/null +++ b/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot @@ -0,0 +1,209 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/map.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 | *Lightweight 4 over 6 test cases* +| ... +| ... | LW4o6 is a subset of MAP-E, with per-subscriber rules. It uses the +| ... | same tunneling mechanism and configuration as MAP-E. It does not use +| ... | embedded address bits. +| ... +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG_if1-DUT, +| ... | Eth-IPv6-IPv4-UDP on TG_if2_DUT. +| ... | *[Cfg] DUT configuration:* DUT1 is configured as lwAFTR. +| ... | *[Ver] TG verification:* Test UDP ICMP Echo Request in IPv4 are +| ... | sent to lwAFTR and are verified by TG for correctness their +| ... | encapsulation in IPv6 src-addr, dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7596 RFC7597. + +*** Variables *** +| ${dut_ip4}= | 10.0.0.1 +| ${dut_ip6}= | 2001:0::1 +| ${tg_ip6}= | 2001:0::2 +| ${ipv4_prefix_len}= | 24 +| ${ipv6_prefix_len}= | 64 + +| ${lw_ipv4_pfx}= | 20.0.0.1/32 +| ${lw_ipv6_pfx}= | 2001:1::/64 +| ${lw_ipv6_src}= | 2001:1::1 +| ${lw_psid_length}= | ${8} +| ${lw_psid_offset}= | ${6} +| ${lw_rule_psid}= | ${52} +| ${lw_rule_ipv6_dst}= | 2001:1::2 +| ${lw_rule_2_psid}= | ${22} +| ${lw_rule_2_ipv6_dst}= | 2001:1::3 +| ${test_ipv4_inside}= | 20.0.0.1 +| ${test_ipv4_outside}= | 10.0.0.100 +# test_port depends on psid, length, offset +| ${test_port}= | ${1232} +| ${test_icmp_id}= | ${1232} +| ${test_2_port}= | ${6232} + +*** Test Cases *** +| TC01: Encapsulate IPv4 into IPv6. IPv6 dst depends on IPv4 and UDP destination +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv4-UDP on TG_if1-DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. +| | ... | [Cfg] On DUT1 configure Map domain and Map rule. +| | ... | [Ver] Make TG send non-encapsulated UDP to DUT; verify TG received +| | ... | IPv4oIPv6 encapsulated packet is correct. +| | ... | [Ref] RFC7596 RFC7597 +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add IP Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add +| | ... | ${dut_node} | ${lw_rule_ipv6_dst} | 128 +| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | Then Send IPv4 UDP and check headers for lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${test_ipv4_inside} | ${test_ipv4_outside} +| | ... | ${test_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${lw_rule_ipv6_dst} | ${lw_ipv6_src} + +TC02: Encapsulate IPv4 ICMP into IPv6. IPv6 dst depends on IPv4 addr and ICMP ID +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP +| | ... | on TG_if2_DUT. +| | ... | [Cfg] On DUT1 configure Map domain and Map rule. +| | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received +| | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 +| | ... | destination based on ICMP Identifier field. +| | ... | [Ref] RFC7596 section 8.1 +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add IP Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add +| | ... | ${dut_node} | ${lw_rule_ipv6_dst} | 128 +| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | Then Send IPv4 ICMP and check headers for lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${test_ipv4_inside} | ${test_ipv4_outside} +| | ... | ${test_icmp_id} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${lw_rule_ipv6_dst} | ${lw_ipv6_src} + +TC03: Decapsulate IPv4 UDP from IPv6. +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv4-UDP on TG_if1-DUT. +| | ... | [Cfg] On DUT1 configure Map domain and Map rule. +| | ... | [Ver] Make TG send encapsulated UDP to DUT; verify TG received +| | ... | IPv4 non-encapsulated packet is correct. +| | ... | [Ref] RFC7596 RFC7597 +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add Arp on DUT +| | ... | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${test_ipv4_outside} +| | ... | ${tg_to_dut_if1_mac} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | Then Send IPv4 UDP in IPv6 and check headers for lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${lw_ipv6_src} | ${lw_rule_ipv6_dst} +| | ... | ${test_ipv4_outside} | ${test_ipv4_inside} | ${test_port} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} + +TC04: Hairpinning of traffic between two lwB4 +| | [Documentation] +| | ... | [Top] DUT1-TG. +| | ... | [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. +| | ... | [Cfg] On DUT1 configure Map domain and two Map rules. +| | ... | [Ver] Make TG send encapsulated UDP to DUT; verify TG received +| | ... | encapsulated packet is correct. +| | ... | [Ref] RFC7596 RFC7597 +| | ... +| | Given Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | And IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Add IP Neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add +| | ... | ${dut_node} | ${lw_rule_2_ipv6_dst} | 128 +| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} +| | ${domain_index}= +| | ... | When Map Add Domain +| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} +| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} +| | ... | ${lw_psid_length} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} +| | ... | ${lw_rule_ipv6_dst} +| | And Map Add Rule +| | ... | ${dut_node} | ${domain_index} | ${lw_rule_2_psid} +| | ... | ${lw_rule_2_ipv6_dst} +| | Then Send IPv4 UDP in IPv6 and check headers for lightweight hairpinning +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if2_mac} +| | ... | ${lw_ipv6_src} | ${lw_rule_ipv6_dst} +| | ... | ${test_ipv4_inside} | ${test_ipv4_inside} +| | ... | ${test_2_port} | ${test_port} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${lw_rule_2_ipv6_dst} | ${lw_ipv6_src} diff --git a/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot b/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot new file mode 100644 index 0000000000..0ddac51a1b --- /dev/null +++ b/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot @@ -0,0 +1,436 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/map.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +| Variables | resources/test_data/softwire/map_e_domains.py | ${5} +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Test for Basic mapping rule for MAP-E*\ +| ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the +| ... | nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1. +| ... | Eth-IPv6-IPv4-UDP on TG-to-DUT-if2. +| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG +| ... | interface and IPv6 address on second DUT-to-TG interface. MAP-E domain +| ... | is configured in test template based on test parameters. +| ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to +| ... | destination in MAP domain. IPv6 packets with encapsulated IPv4 are +| ... | received on TG interface. +| ... | *[Ref] Applicable standard specifications:* RFC7597. + + +*** Variables *** +| ${dut_ip4}= | 10.0.0.1 +| ${dut_ip6}= | 2001:0::1 +| ${dut_ip4_gw}= | 10.0.0.2 +| ${dut_ip6_gw}= | 2001:0::2 +| ${ipv4_prefix_len}= | 24 +| ${ipv6_prefix_len}= | 64 +| ${ipv6_br_src}= | 2001:db8:ffff::1 +| ${ipv4_outside}= | 1.0.0.1 + + +*** Test Cases *** +| TC01: BMR, then an IPv4 prefix is assigned +| | [Documentation] +| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ +| | ... | IPv4 prefix length + ea bits length < 32 (o + r < 32) +| | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32 +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Func Test Setup | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |=================|===============|================|============|=============|==========|================|==========|==================================| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | +# |=================|===============|================|============|=============|==========|================|==========|==================================| +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a000::14a0:0:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a900::14a9:0:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c0::14a9:c000:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9::14a9:c900:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:d000:0:14a9:c9d0:0 | +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${23} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:da00:0:14a9:c9da:0 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:d000::14a9:c9d0:0 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${7} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:da00::14a9:c9da:0 | + + +| TC02: BMR, full IPv4 address is to be assigned +| | [Documentation] +| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ +| | ... | IPv4 prefix length + ea bits length == 32 (o + r == 32) +| | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32 +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Func Test Setup | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|===============|================|============|=============|==========|================|==========|==================================| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | +# |===================|===============|================|============|=============|==========|================|==========|==================================| +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:db00:0:14a9:c9db:0 | +| | 20.160.0.0/12 | 2001:db8::/32 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:9c9d:b000:0:14a9:c9db:0 | +| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:c9db::14a9:c9db:0 | +| | 20.169.200.0/22 | 2001:db8::/32 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:76c0::14a9:c9db:0 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:db00::14a9:c9db:0 | +| | 20.169.201.208/28 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:b000::14a9:c9db:0 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8::14a9:c9db:0 | +| | 20.0.0.0/8 | 2001:db8::/40 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9:c9db:0:14a9:c9db:0 | +| | 20.160.0.0/12 | 2001:db8::/44 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:9:c9db:0:14a9:c9db:0 | +| | 20.169.0.0/16 | 2001:db8::/48 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:0:c9db:0:14a9:c9db:0 | +| | 20.169.200.0/22 | 2001:db8::/54 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:0:1db:0:14a9:c9db:0 | + + +| TC03: BMR, shared IPv4 address is to be assigned +| | [Documentation] +| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ +| | ... | IPv4 prefix length + ea bits length > 32 (o + r > 32) +| | ... | ip6_prefix < 64, ip4_prefix <= 32 +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Func Test Setup | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|===============|================|============|=============|==========|================|==========|===================================| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | +# |===================|===============|================|============|=============|==========|================|==========|===================================| +| | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:3400::14a9:c9db:34 | + +| | 20.0.0.0/8 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:a9:c9db:3400:0:14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9:db34::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db:3400::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:34::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:3400::14a9:c9db:34 | + +| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:db34:0:14a9:c9db:34 | +| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:c9db:3400:0:14a9:c9db:34 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/24 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9:db34::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/24 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db:3400::14a9:c9db:34 | +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | +| | 20.169.201.0/24 | 2001::/16 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db34::14a9:c9db:34 | + +| | 20.160.0.0/12 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${5} | 20.169.201.219 | ${1232} | 2001:db8:9c9d:b300:0:14a9:c9db:6 | +| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:c9db:3400:0:14a9:c9db:34 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | + +| | 20.169.192.0/20 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${5} | 20.169.201.219 | ${1232} | 2001:db8:9db3::14a9:c9db:6 | +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | + +| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${12} | ${6} | ${4} | 20.169.201.219 | ${1232} | 2001:db8:db30::14a9:c9db:3 | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${12} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | + + +| TC04: End user IPv6 prefix is 64 +| | [Documentation] +| | ... | Supported End-User IPv6 prefix length is 64 bit. +| | ... +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Func Test Setup | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|=========================|================|============|=============|==========|================|==========| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | +# |===================|=========================|================|============|=============|==========|================|==========| +| | 20.0.0.0/8 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 20.169.201.208/28 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8} | ${5} | ${4} | 20.169.201.219 | ${3280} | +| | 20.0.0.0/8 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 20.169.201.219/32 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | + + +| TC05: IPv4 prefix is 0 +| | [Tags] | EXPECTED_FAILING +# TODO: replace setup when VPP-312 fixed +#| | [Setup] | Set Interfaces IP Addresses And Routes +| | [Setup] | Run Keywords +| | ... | Func Test Setup | AND +| | ... | Set Interfaces IP Addresses And Routes +| | [Template] | Check MAP Configuration With Traffic Script +# |===================|=========================|================|============|=============|==========|================|==========| +# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | +# |===================|=========================|================|============|=============|==========|================|==========| +| | 0.0.0.0/0 | 2001:db8:0000::/40 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001:db8:0000::/40 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${0} | ${0} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001:d00::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | +| | 0.0.0.0/0 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | + + +| TC06: Multiple domain and check with traffic script IPv4 source IPv6 destination +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ +| | ... | file. +| | ... | [Ver] Send IPv4 to destination in configured domain and receive IPv6\ +| | ... | packet. +| | ... | [Ref] RFC7597. +| | Given Path For 2-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces In 2-node Path Are Up +| | And IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | :FOR | ${domain_set} | IN | @{domain_sets} +| | | When Map Add Domain | ${dut_node} | @{domain_set} +| | :FOR | ${ip_set} | IN | @{ip_sets} +| | | ${ipv4}= | Get From List | ${ip_set} | 0 +| | | ${ipv6}= | Get From List | ${ip_set} | 1 +| | | ${port}= | Get From List | ${ip_set} | 2 +| | | ${ipv6_br}= | Get From List | ${ip_set} | 3 +| | | Then Send IPv4 UDP And Check Headers For Lightweight 4over6 +| | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | | ... | ${dut_to_tg_if1_mac} | ${ipv4} | ${ipv4_outside} | ${port} +| | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${ipv6} | ${ipv6_br} +| | | And Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6 +| | | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} | ${ipv6_br} | ${ipv6} +| | | ... | ${ipv4_outside} | ${ipv4} | ${port} | ${tg_to_dut_if1_mac} +| | | ... | ${dut_to_tg_if1_mac} + + +| TC07: Multiple domain and check with traffic script IPv6 source IPv6 destination +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ +| | ... | file. +| | ... | [Ver] Send IPv4 encapsulated in IPv6. Source and destination are from\ +| | ... | configured domains. Check if VPP translate IPv6 addresses. +| | ... | [Ref] RFC7597. +| | Given Path For 2-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces In 2-node Path Are Up +| | And IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | :FOR | ${domain_set} | IN | @{domain_sets} +| | | When Map Add Domain | ${dut_node} | @{domain_set} +| | ${ip_set_A}= | Get From List | ${ip_sets} | 0 +| | ${ip_set_B}= | Get From List | ${ip_sets} | 1 +| | ${ipv6_br}= | Get From List | ${ip_set_A} | 3 +| | ${port_A}= | Get From List | ${ip_set_A} | 2 +| | ${port_B}= | Get From List | ${ip_set_B} | 2 +| | ${ipv6_A}= | Get From List | ${ip_set_A} | 1 +| | ${ipv6_B}= | Get From List | ${ip_set_B} | 1 +| | ${ipv4_A}= | Get From List | ${ip_set_A} | 0 +| | ${ipv4_B}= | Get From List | ${ip_set_B} | 0 +| | Then Send IPv4 UDP In IPv6 And Check Headers For Lightweight Hairpinning +| | ... | ${tg_node} | ${tg_to_dut_if2} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_br} | ${ipv6_A} +| | ... | ${ipv4_B} | ${ipv4_A} +| | ... | ${port_B} | ${port_A} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_B} | ${ipv6_br} + + +| TC08: Encapsulate IPv4 ICMP into IPv6 +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP\ +| | ... | on TG_if2_DUT. +| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ +| | ... | file. +| | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received\ +| | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 destination\ +| | ... | based on ICMP Identifier field. +| | ... | [Ref] RFC7597 section 8.2. +| | Given Path For 2-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces In 2-node Path Are Up +| | And IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | :FOR | ${domain_set} | IN | @{domain_sets} +| | | When Map Add Domain | ${dut_node} | @{domain_set} +| | ${ip_set_A}= | Get From List | ${ip_sets} | 0 +| | ${ipv4_A}= | Get From List | ${ip_set_A} | 0 +| | ${ipv6_A}= | Get From List | ${ip_set_A} | 1 +| | ${icmp_id_A}= | Get From List | ${ip_set_A} | 2 +| | ${ipv6_br}= | Get From List | ${ip_set_A} | 3 +| | Then Send IPv4 ICMP And Check Headers For Lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${ipv4_A} | ${ipv4_outside} +| | ... | ${icmp_id_A} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_A} | ${ipv6_br} + + +| TC09: Repeated ip neighbor command doesnt put FIB to broken state +| | [Documentation] | +| | ... | Original issue described in https://jira.fd.io/browse/VPP-312. +| | ... | [Top] TG=DUT1. +| | ... | [Cfg] IP address are set on interfaces, ip neighbor multiple times +| | ... | [Ver] FIB is not in broken state. The steps are add route, \ +| | ... | check with traffic then add same route +| | ... | again and check with traffic script. +| | Given Path For 2-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces In 2-node Path Are Up +| | When IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | Then Check MAP Configuration With Traffic Script +| | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} +| | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 +| | When IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw} +| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} +| | Then Check MAP Configuration With Traffic Script +| | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} +| | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 + + +| Bug: VPP-318 +| | [Tags] | EXPECTED_FAILING +| | [Documentation] | qlen < psid length +| | Given Path For 2-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Interfaces In 2-node Path Are Up +| | And IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | Then Run Keyword And Expect Error | Unable to add map domain * +| | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32 +| | ... | ${ipv6_br_src} | ${20} | ${6} | ${8} + + +*** Keywords *** +| Set Interfaces IP Addresses And Routes +| | Path For 2-node Testing Is Set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Interfaces In 2-node Path Are Up +| | IP Addresses Are Set On Interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2} +| | ... | resolve_attempts=${NONE} | count=${NONE} +| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | Vpp Route Add | ${dut_node} | ${ipv4_outside} | 32 | ${dut_ip4_gw} +| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} +| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} + +| Check MAP Configuration With Traffic Script +| | [Documentation] +| | ... | Used as a test case template.\ +| | ... | Configure MAP-E domain with given parameters, with traffic script send +| | ... | UDP in IPv4 packet to given UDP destination port and IP destination +| | ... | address and check if correctly received IPv6 packet. Vice versa send +| | ... | IPv6 packet and check if received IPv4 packet with correct source +| | ... | address. +| | ... | The MAP domain is deleted in teardown. +| | ... | The expected IPv6 address is compared with computed IPv6 address. +| | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len} +| | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port} +| | ... | ${expected_ipv6_dst}=${EMPTY} +| | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx} +| | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len} +| | ${computed_ipv6_dst}= | Compute IPv6 Map Destination Address +| | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset} +| | ... | ${psid_len} | ${ipv4_dst} | ${dst_port} +| | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}" +| | ... | Set Variable | ${computed_ipv6_dst} +| | ... | ELSE | Set Variable | ${expected_ipv6_dst} +| | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}" +| | ... | IP Addresses Should Be Equal +| | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst} +| | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst} +| | Check Encapsulation With Traffic Script +| | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} +| | Check Decapsulation With Traffic Script +| | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port} +| | [Teardown] | Run Keywords +| | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND +| | ... | Show Packet Trace On All DUTs | ${nodes} | AND +| | ... | Clear Packet Trace On All DUTs | ${nodes} | AND +| | ... | Check VPP PID in Teardown + +| Check Encapsulation With Traffic Script +| | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} +| | Send IPv4 UDP And Check Headers For Lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside} +| | ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_dst} | ${ipv6_br_src} + +| Check Decapsulation With Traffic Script +| | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port} +| | Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6 +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${ipv6_br_src} | ${ipv6_ce_addr} +| | ... | ${ipv4_outside} | ${ipv4_inside} | ${port} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} diff --git a/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot b/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot new file mode 100644 index 0000000000..4167ca2bcf --- /dev/null +++ b/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremapt-func.robot @@ -0,0 +1,122 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/map.robot +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.Trace +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Set interfaces IP addresses and routes +| Test Teardown | Func Test Teardown +| Documentation | *Test for Basic mapping rule for MAP-T*\ +| ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the +| ... | nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1. +| ... | Eth-IPv6-UDP on TG-to-DUT-if2. +| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG +| ... | interface and IPv6 address on second DUT-to-TG interface. MAP-T domain +| ... | is configured in test template based on test parameters. +| ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to +| ... | destination in MAP domain. IPv6 packets with translated IPv4 addresses +| ... | are received on TG interface. +| ... | *[Ref] Applicable standard specifications:* RFC7599 + + +*** Variables *** +| ${dut_ip4}= | 10.0.0.1 +| ${dut_ip6}= | 2001:0::1 +| ${dut_ip4_gw}= | 10.0.0.2 +| ${dut_ip6_gw}= | 2001:0::2 +| ${ipv4_prefix_len}= | 24 +| ${ipv6_prefix_len}= | 64 +| ${ipv6_br_src}= | 2001:db8:ffff::/96 + + +*** Test Cases *** +| TC01: MAP-T test +| | [Documentation] | +| | ... | Test to check map-t address translation. +| | [Template] | Check MAP-T configuration with traffic script +# |===================|===============|================|============|=============|==========|===========|================|==========| +# | ipv4_pfx | ipv6_dst_pfx | ipv6_src_pfx | ea_bit_len | psid_offset | psid_len | ipv4_src | ipv4_dst | dst_port | +# |===================|===============|================|============|=============|==========|===========|================|==========| +| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${40} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | +| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | +| | 20.0.0.0/8 | 2001:db8::/40 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | +#| | 20.169.201.0/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${6} | ${8} | 100.0.0.1 | 20.169.201.219 | ${1232} | +#| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${6} | ${8} | 100.0.0.1 | 20.169.201.219 | ${1232} | + + +*** Keywords *** +| Set interfaces IP addresses and routes +| | Path for 2-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Interfaces in 2-node path are up +| | IP addresses are set on interfaces +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} +| | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2} +| | ... | resolve_attempts=${NONE} | count=${NONE} +| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} +| | ... | ${tg_to_dut_if2_mac} +| | Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} | ${dut_to_tg_if1} +| | ... | resolve_attempts=${NONE} | count=${NONE} +| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} +| | ... | ${tg_to_dut_if1_mac} + +| Check MAP-T configuration with traffic script +| | [Documentation] | +| | ... | Used as a test case template.\ +| | ... | Configure MAP-T domain with given parameters, with traffic script send +| | ... | UDP in IPv4 packet to given UDP destination port and IP destination +| | ... | address and check if correctly received IPv6 packet with translated +| | ... | source and destination addresses. Vice versa send IPv6 packet and +| | ... | check if received IPv4 packet with correct source and destination +| | ... | addresses. +| | ... | The MAP domain is deleted in teardown. +| | [Arguments] | ${ipv4_pfx} | ${ipv6_dst_pfx} | ${ipv6_src_pfx} +| | ... | ${ea_bit_len} | ${psid_offset} | ${psid_len} +| | ... | ${ipv4_outside} | ${ipv4_inside} | ${dst_port} +| | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} +| | ... | ${ipv6_dst_pfx} | ${ipv6_src_pfx} | ${ea_bit_len} | ${psid_offset} +| | ... | ${psid_len} | ${TRUE} +| | ${ipv6_ce_addr}= | Compute IPv6 map destination address +| | ... | ${ipv4_pfx} | ${ipv6_dst_pfx} | ${ea_bit_len} | ${psid_offset} +| | ... | ${psid_len} | ${ipv4_inside} | ${dst_port} +| | ${ipv6_br_addr}= | Compute IPv6 map source address +| | ... | ${ipv6_src_pfx} | ${ipv4_outside} +# Check translation from v4 to v6 with traffic script +| | Send IPv4 UDP and check IPv6 headers for MAP-T +| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_mac} | ${ipv4_inside} | ${ipv4_outside} | ${dst_port} +| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} +| | ... | ${ipv6_ce_addr} | ${ipv6_br_addr} +# Check translation from v6 to v4 with traffic script +| | Send IPv6 UDP and check IPv4 headers for MAP-T +| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${ipv6_br_addr} | ${ipv6_ce_addr} +| | ... | ${dst_port} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${ipv4_outside} | ${ipv4_inside} +| | [Teardown] | Run Keywords +| | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND +| | ... | Show packet trace on all DUTs | ${nodes} | AND +| | ... | Clear packet trace on all DUTs | ${nodes} | AND +| | ... | Check VPP PID in Teardown diff --git a/tests/func/softwire/lightweight_4over6.robot b/tests/func/softwire/lightweight_4over6.robot deleted file mode 100644 index f96ee19b4e..0000000000 --- a/tests/func/softwire/lightweight_4over6.robot +++ /dev/null @@ -1,209 +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/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/map.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 | *Lightweight 4 over 6 test cases* -| ... -| ... | LW4o6 is a subset of MAP-E, with per-subscriber rules. It uses the -| ... | same tunneling mechanism and configuration as MAP-E. It does not use -| ... | embedded address bits. -| ... -| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links -| ... | between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG_if1-DUT, -| ... | Eth-IPv6-IPv4-UDP on TG_if2_DUT. -| ... | *[Cfg] DUT configuration:* DUT1 is configured as lwAFTR. -| ... | *[Ver] TG verification:* Test UDP ICMP Echo Request in IPv4 are -| ... | sent to lwAFTR and are verified by TG for correctness their -| ... | encapsulation in IPv6 src-addr, dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC7596 RFC7597. - -*** Variables *** -| ${dut_ip4}= | 10.0.0.1 -| ${dut_ip6}= | 2001:0::1 -| ${tg_ip6}= | 2001:0::2 -| ${ipv4_prefix_len}= | 24 -| ${ipv6_prefix_len}= | 64 - -| ${lw_ipv4_pfx}= | 20.0.0.1/32 -| ${lw_ipv6_pfx}= | 2001:1::/64 -| ${lw_ipv6_src}= | 2001:1::1 -| ${lw_psid_length}= | ${8} -| ${lw_psid_offset}= | ${6} -| ${lw_rule_psid}= | ${52} -| ${lw_rule_ipv6_dst}= | 2001:1::2 -| ${lw_rule_2_psid}= | ${22} -| ${lw_rule_2_ipv6_dst}= | 2001:1::3 -| ${test_ipv4_inside}= | 20.0.0.1 -| ${test_ipv4_outside}= | 10.0.0.100 -# test_port depends on psid, length, offset -| ${test_port}= | ${1232} -| ${test_icmp_id}= | ${1232} -| ${test_2_port}= | ${6232} - -*** Test Cases *** -| TC01: Encapsulate IPv4 into IPv6. IPv6 dst depends on IPv4 and UDP destination -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Enc] Eth-IPv4-UDP on TG_if1-DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. -| | ... | [Cfg] On DUT1 configure Map domain and Map rule. -| | ... | [Ver] Make TG send non-encapsulated UDP to DUT; verify TG received -| | ... | IPv4oIPv6 encapsulated packet is correct. -| | ... | [Ref] RFC7596 RFC7597 -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Add IP Neighbor -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add -| | ... | ${dut_node} | ${lw_rule_ipv6_dst} | 128 -| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} -| | ${domain_index}= -| | ... | When Map Add Domain -| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} -| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} -| | ... | ${lw_psid_length} -| | And Map Add Rule -| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} -| | ... | ${lw_rule_ipv6_dst} -| | Then Send IPv4 UDP and check headers for lightweight 4over6 -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${test_ipv4_inside} | ${test_ipv4_outside} -| | ... | ${test_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${lw_rule_ipv6_dst} | ${lw_ipv6_src} - -TC02: Encapsulate IPv4 ICMP into IPv6. IPv6 dst depends on IPv4 addr and ICMP ID -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP -| | ... | on TG_if2_DUT. -| | ... | [Cfg] On DUT1 configure Map domain and Map rule. -| | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received -| | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 -| | ... | destination based on ICMP Identifier field. -| | ... | [Ref] RFC7596 section 8.1 -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Add IP Neighbor -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add -| | ... | ${dut_node} | ${lw_rule_ipv6_dst} | 128 -| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} -| | ${domain_index}= -| | ... | When Map Add Domain -| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} -| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} -| | ... | ${lw_psid_length} -| | And Map Add Rule -| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} -| | ... | ${lw_rule_ipv6_dst} -| | Then Send IPv4 ICMP and check headers for lightweight 4over6 -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${test_ipv4_inside} | ${test_ipv4_outside} -| | ... | ${test_icmp_id} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${lw_rule_ipv6_dst} | ${lw_ipv6_src} - -TC03: Decapsulate IPv4 UDP from IPv6. -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv4-UDP on TG_if1-DUT. -| | ... | [Cfg] On DUT1 configure Map domain and Map rule. -| | ... | [Ver] Make TG send encapsulated UDP to DUT; verify TG received -| | ... | IPv4 non-encapsulated packet is correct. -| | ... | [Ref] RFC7596 RFC7597 -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Add Arp on DUT -| | ... | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${test_ipv4_outside} -| | ... | ${tg_to_dut_if1_mac} -| | ${domain_index}= -| | ... | When Map Add Domain -| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} -| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} -| | ... | ${lw_psid_length} -| | And Map Add Rule -| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} -| | ... | ${lw_rule_ipv6_dst} -| | Then Send IPv4 UDP in IPv6 and check headers for lightweight 4over6 -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${lw_ipv6_src} | ${lw_rule_ipv6_dst} -| | ... | ${test_ipv4_outside} | ${test_ipv4_inside} | ${test_port} -| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} - -TC04: Hairpinning of traffic between two lwB4 -| | [Documentation] -| | ... | [Top] DUT1-TG. -| | ... | [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. -| | ... | [Cfg] On DUT1 configure Map domain and two Map rules. -| | ... | [Ver] Make TG send encapsulated UDP to DUT; verify TG received -| | ... | encapsulated packet is correct. -| | ... | [Ref] RFC7596 RFC7597 -| | ... -| | Given Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | And IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Add IP Neighbor -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_ip6} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add -| | ... | ${dut_node} | ${lw_rule_2_ipv6_dst} | 128 -| | ... | ${tg_ip6} | ${dut_to_tg_if2} | resolve_attempts=${NONE} -| | ${domain_index}= -| | ... | When Map Add Domain -| | ... | ${dut_node} | ${lw_ipv4_pfx} | ${lw_ipv6_pfx} -| | ... | ${lw_ipv6_src} | 0 | ${lw_psid_offset} -| | ... | ${lw_psid_length} -| | And Map Add Rule -| | ... | ${dut_node} | ${domain_index} | ${lw_rule_psid} -| | ... | ${lw_rule_ipv6_dst} -| | And Map Add Rule -| | ... | ${dut_node} | ${domain_index} | ${lw_rule_2_psid} -| | ... | ${lw_rule_2_ipv6_dst} -| | Then Send IPv4 UDP in IPv6 and check headers for lightweight hairpinning -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if2_mac} -| | ... | ${lw_ipv6_src} | ${lw_rule_ipv6_dst} -| | ... | ${test_ipv4_inside} | ${test_ipv4_inside} -| | ... | ${test_2_port} | ${test_port} -| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${lw_rule_2_ipv6_dst} | ${lw_ipv6_src} diff --git a/tests/func/softwire/map_e.robot b/tests/func/softwire/map_e.robot deleted file mode 100644 index 0ddac51a1b..0000000000 --- a/tests/func/softwire/map_e.robot +++ /dev/null @@ -1,436 +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/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/map.robot -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -| Variables | resources/test_data/softwire/map_e_domains.py | ${5} -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *Test for Basic mapping rule for MAP-E*\ -| ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the -| ... | nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1. -| ... | Eth-IPv6-IPv4-UDP on TG-to-DUT-if2. -| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG -| ... | interface and IPv6 address on second DUT-to-TG interface. MAP-E domain -| ... | is configured in test template based on test parameters. -| ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to -| ... | destination in MAP domain. IPv6 packets with encapsulated IPv4 are -| ... | received on TG interface. -| ... | *[Ref] Applicable standard specifications:* RFC7597. - - -*** Variables *** -| ${dut_ip4}= | 10.0.0.1 -| ${dut_ip6}= | 2001:0::1 -| ${dut_ip4_gw}= | 10.0.0.2 -| ${dut_ip6_gw}= | 2001:0::2 -| ${ipv4_prefix_len}= | 24 -| ${ipv6_prefix_len}= | 64 -| ${ipv6_br_src}= | 2001:db8:ffff::1 -| ${ipv4_outside}= | 1.0.0.1 - - -*** Test Cases *** -| TC01: BMR, then an IPv4 prefix is assigned -| | [Documentation] -| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ -| | ... | IPv4 prefix length + ea bits length < 32 (o + r < 32) -| | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32 -| | ... -# TODO: replace setup when VPP-312 fixed -#| | [Setup] | Set Interfaces IP Addresses And Routes -| | [Setup] | Run Keywords -| | ... | Func Test Setup | AND -| | ... | Set Interfaces IP Addresses And Routes -| | [Template] | Check MAP Configuration With Traffic Script -# |=================|===============|================|============|=============|==========|================|==========|==================================| -# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | -# |=================|===============|================|============|=============|==========|================|==========|==================================| -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a000::14a0:0:0 | -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a900::14a9:0:0 | -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c0::14a9:c000:0 | -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9::14a9:c900:0 | -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:d000:0:14a9:c9d0:0 | -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${23} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:da00:0:14a9:c9da:0 | -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:d000::14a9:c9d0:0 | -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${7} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:da00::14a9:c9da:0 | - - -| TC02: BMR, full IPv4 address is to be assigned -| | [Documentation] -| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ -| | ... | IPv4 prefix length + ea bits length == 32 (o + r == 32) -| | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32 -| | ... -# TODO: replace setup when VPP-312 fixed -#| | [Setup] | Set Interfaces IP Addresses And Routes -| | [Setup] | Run Keywords -| | ... | Func Test Setup | AND -| | ... | Set Interfaces IP Addresses And Routes -| | [Template] | Check MAP Configuration With Traffic Script -# |===================|===============|================|============|=============|==========|================|==========|==================================| -# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | -# |===================|===============|================|============|=============|==========|================|==========|==================================| -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:db00:0:14a9:c9db:0 | -| | 20.160.0.0/12 | 2001:db8::/32 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:9c9d:b000:0:14a9:c9db:0 | -| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:c9db::14a9:c9db:0 | -| | 20.169.200.0/22 | 2001:db8::/32 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:76c0::14a9:c9db:0 | -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:db00::14a9:c9db:0 | -| | 20.169.201.208/28 | 2001:db8::/32 | ${ipv6_br_src} | ${4} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:b000::14a9:c9db:0 | -| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8::14a9:c9db:0 | -| | 20.0.0.0/8 | 2001:db8::/40 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:a9:c9db:0:14a9:c9db:0 | -| | 20.160.0.0/12 | 2001:db8::/44 | ${ipv6_br_src} | ${20} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:9:c9db:0:14a9:c9db:0 | -| | 20.169.0.0/16 | 2001:db8::/48 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:0:c9db:0:14a9:c9db:0 | -| | 20.169.200.0/22 | 2001:db8::/54 | ${ipv6_br_src} | ${10} | ${0} | ${0} | 20.169.201.219 | ${1232} | 2001:db8:0:1db:0:14a9:c9db:0 | - - -| TC03: BMR, shared IPv4 address is to be assigned -| | [Documentation] -| | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\ -| | ... | IPv4 prefix length + ea bits length > 32 (o + r > 32) -| | ... | ip6_prefix < 64, ip4_prefix <= 32 -| | ... -# TODO: replace setup when VPP-312 fixed -#| | [Setup] | Set Interfaces IP Addresses And Routes -| | [Setup] | Run Keywords -| | ... | Func Test Setup | AND -| | ... | Set Interfaces IP Addresses And Routes -| | [Template] | Check MAP Configuration With Traffic Script -# |===================|===============|================|============|=============|==========|================|==========|===================================| -# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | expected_ipv6_dst | -# |===================|===============|================|============|=============|==========|================|==========|===================================| -| | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 | -| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | -| | 20.169.201.0/24 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db34::14a9:c9db:34 | -| | 20.169.201.219/32 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:3400::14a9:c9db:34 | - -| | 20.0.0.0/8 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:a9:c9db:3400:0:14a9:c9db:34 | -| | 20.169.0.0/16 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9:db34::14a9:c9db:34 | -| | 20.169.201.0/24 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db:3400::14a9:c9db:34 | -| | 20.169.201.219/32 | 2001::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:34::14a9:c9db:34 | -| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | -| | 20.169.201.219/32 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:3400::14a9:c9db:34 | - -| | 20.0.0.0/8 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:a9c9:db34:0:14a9:c9db:34 | -| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:c9db:3400:0:14a9:c9db:34 | -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | -| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | -| | 20.169.0.0/16 | 2001::/24 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9:db34::14a9:c9db:34 | -| | 20.169.201.0/24 | 2001::/24 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db:3400::14a9:c9db:34 | -| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:c9db:3400::14a9:c9db:34 | -| | 20.169.201.0/24 | 2001::/16 | ${ipv6_br_src} | ${32} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db34::14a9:c9db:34 | - -| | 20.160.0.0/12 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${5} | 20.169.201.219 | ${1232} | 2001:db8:9c9d:b300:0:14a9:c9db:6 | -| | 20.169.0.0/16 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:c9db:3400:0:14a9:c9db:34 | -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | -| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${25} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | - -| | 20.169.192.0/20 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${5} | 20.169.201.219 | ${1232} | 2001:db8:9db3::14a9:c9db:6 | -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:db34::14a9:c9db:34 | -| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${17} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | - -| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${12} | ${6} | ${4} | 20.169.201.219 | ${1232} | 2001:db8:db30::14a9:c9db:3 | -| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${12} | ${6} | ${8} | 20.169.201.219 | ${1232} | 2001:db8:3400::14a9:c9db:34 | - - -| TC04: End user IPv6 prefix is 64 -| | [Documentation] -| | ... | Supported End-User IPv6 prefix length is 64 bit. -| | ... -# TODO: replace setup when VPP-312 fixed -#| | [Setup] | Set Interfaces IP Addresses And Routes -| | [Setup] | Run Keywords -| | ... | Func Test Setup | AND -| | ... | Set Interfaces IP Addresses And Routes -| | [Template] | Check MAP Configuration With Traffic Script -# |===================|=========================|================|============|=============|==========|================|==========| -# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | -# |===================|=========================|================|============|=============|==========|================|==========| -| | 20.0.0.0/8 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | -| | 20.169.201.208/28 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8} | ${5} | ${4} | 20.169.201.219 | ${3280} | -| | 20.0.0.0/8 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | -| | 20.169.201.219/32 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 20.169.201.219 | ${1232} | - - -| TC05: IPv4 prefix is 0 -| | [Tags] | EXPECTED_FAILING -# TODO: replace setup when VPP-312 fixed -#| | [Setup] | Set Interfaces IP Addresses And Routes -| | [Setup] | Run Keywords -| | ... | Func Test Setup | AND -| | ... | Set Interfaces IP Addresses And Routes -| | [Template] | Check MAP Configuration With Traffic Script -# |===================|=========================|================|============|=============|==========|================|==========| -# | ipv4_pfx | ipv6_pfx | ipv6_src | ea_bit_len | psid_offset | psid_len | ipv4_dst | dst_port | -# |===================|=========================|================|============|=============|==========|================|==========| -| | 0.0.0.0/0 | 2001:db8:0000::/40 | ${ipv6_br_src} | ${8} | ${0} | ${0} | 20.169.201.219 | ${1232} | -| | 0.0.0.0/0 | 2001:db8:0000::/40 | ${ipv6_br_src} | ${16} | ${0} | ${0} | 20.169.201.219 | ${1232} | -| | 0.0.0.0/0 | 2001:db8::/32 | ${ipv6_br_src} | ${32} | ${0} | ${0} | 20.169.201.219 | ${1232} | -| | 0.0.0.0/0 | 2001:d00::/24 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | -| | 0.0.0.0/0 | 2001::/16 | ${ipv6_br_src} | ${40} | ${6} | ${8} | 20.169.201.219 | ${1232} | - - -| TC06: Multiple domain and check with traffic script IPv4 source IPv6 destination -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ -| | ... | file. -| | ... | [Ver] Send IPv4 to destination in configured domain and receive IPv6\ -| | ... | packet. -| | ... | [Ref] RFC7597. -| | Given Path For 2-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces In 2-node Path Are Up -| | And IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} -| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} -| | :FOR | ${domain_set} | IN | @{domain_sets} -| | | When Map Add Domain | ${dut_node} | @{domain_set} -| | :FOR | ${ip_set} | IN | @{ip_sets} -| | | ${ipv4}= | Get From List | ${ip_set} | 0 -| | | ${ipv6}= | Get From List | ${ip_set} | 1 -| | | ${port}= | Get From List | ${ip_set} | 2 -| | | ${ipv6_br}= | Get From List | ${ip_set} | 3 -| | | Then Send IPv4 UDP And Check Headers For Lightweight 4over6 -| | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | | ... | ${dut_to_tg_if1_mac} | ${ipv4} | ${ipv4_outside} | ${port} -| | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${ipv6} | ${ipv6_br} -| | | And Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6 -| | | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} | ${ipv6_br} | ${ipv6} -| | | ... | ${ipv4_outside} | ${ipv4} | ${port} | ${tg_to_dut_if1_mac} -| | | ... | ${dut_to_tg_if1_mac} - - -| TC07: Multiple domain and check with traffic script IPv6 source IPv6 destination -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ -| | ... | file. -| | ... | [Ver] Send IPv4 encapsulated in IPv6. Source and destination are from\ -| | ... | configured domains. Check if VPP translate IPv6 addresses. -| | ... | [Ref] RFC7597. -| | Given Path For 2-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces In 2-node Path Are Up -| | And IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} -| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} -| | :FOR | ${domain_set} | IN | @{domain_sets} -| | | When Map Add Domain | ${dut_node} | @{domain_set} -| | ${ip_set_A}= | Get From List | ${ip_sets} | 0 -| | ${ip_set_B}= | Get From List | ${ip_sets} | 1 -| | ${ipv6_br}= | Get From List | ${ip_set_A} | 3 -| | ${port_A}= | Get From List | ${ip_set_A} | 2 -| | ${port_B}= | Get From List | ${ip_set_B} | 2 -| | ${ipv6_A}= | Get From List | ${ip_set_A} | 1 -| | ${ipv6_B}= | Get From List | ${ip_set_B} | 1 -| | ${ipv4_A}= | Get From List | ${ip_set_A} | 0 -| | ${ipv4_B}= | Get From List | ${ip_set_B} | 0 -| | Then Send IPv4 UDP In IPv6 And Check Headers For Lightweight Hairpinning -| | ... | ${tg_node} | ${tg_to_dut_if2} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} -| | ... | ${ipv6_br} | ${ipv6_A} -| | ... | ${ipv4_B} | ${ipv4_A} -| | ... | ${port_B} | ${port_A} -| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${ipv6_B} | ${ipv6_br} - - -| TC08: Encapsulate IPv4 ICMP into IPv6 -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP\ -| | ... | on TG_if2_DUT. -| | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\ -| | ... | file. -| | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received\ -| | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 destination\ -| | ... | based on ICMP Identifier field. -| | ... | [Ref] RFC7597 section 8.2. -| | Given Path For 2-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces In 2-node Path Are Up -| | And IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} -| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} -| | :FOR | ${domain_set} | IN | @{domain_sets} -| | | When Map Add Domain | ${dut_node} | @{domain_set} -| | ${ip_set_A}= | Get From List | ${ip_sets} | 0 -| | ${ipv4_A}= | Get From List | ${ip_set_A} | 0 -| | ${ipv6_A}= | Get From List | ${ip_set_A} | 1 -| | ${icmp_id_A}= | Get From List | ${ip_set_A} | 2 -| | ${ipv6_br}= | Get From List | ${ip_set_A} | 3 -| | Then Send IPv4 ICMP And Check Headers For Lightweight 4over6 -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${ipv4_A} | ${ipv4_outside} -| | ... | ${icmp_id_A} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${ipv6_A} | ${ipv6_br} - - -| TC09: Repeated ip neighbor command doesnt put FIB to broken state -| | [Documentation] | -| | ... | Original issue described in https://jira.fd.io/browse/VPP-312. -| | ... | [Top] TG=DUT1. -| | ... | [Cfg] IP address are set on interfaces, ip neighbor multiple times -| | ... | [Ver] FIB is not in broken state. The steps are add route, \ -| | ... | check with traffic then add same route -| | ... | again and check with traffic script. -| | Given Path For 2-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces In 2-node Path Are Up -| | When IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw} -| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} -| | Then Check MAP Configuration With Traffic Script -| | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} -| | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 -| | When IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw} -| | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} -| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} -| | Then Check MAP Configuration With Traffic Script -| | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8} -| | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34 - - -| Bug: VPP-318 -| | [Tags] | EXPECTED_FAILING -| | [Documentation] | qlen < psid length -| | Given Path For 2-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Interfaces In 2-node Path Are Up -| | And IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | Then Run Keyword And Expect Error | Unable to add map domain * -| | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32 -| | ... | ${ipv6_br_src} | ${20} | ${6} | ${8} - - -*** Keywords *** -| Set Interfaces IP Addresses And Routes -| | Path For 2-node Testing Is Set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Interfaces In 2-node Path Are Up -| | IP Addresses Are Set On Interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2} -| | ... | resolve_attempts=${NONE} | count=${NONE} -| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | Vpp Route Add | ${dut_node} | ${ipv4_outside} | 32 | ${dut_ip4_gw} -| | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE} -| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} - -| Check MAP Configuration With Traffic Script -| | [Documentation] -| | ... | Used as a test case template.\ -| | ... | Configure MAP-E domain with given parameters, with traffic script send -| | ... | UDP in IPv4 packet to given UDP destination port and IP destination -| | ... | address and check if correctly received IPv6 packet. Vice versa send -| | ... | IPv6 packet and check if received IPv4 packet with correct source -| | ... | address. -| | ... | The MAP domain is deleted in teardown. -| | ... | The expected IPv6 address is compared with computed IPv6 address. -| | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len} -| | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port} -| | ... | ${expected_ipv6_dst}=${EMPTY} -| | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx} -| | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len} -| | ${computed_ipv6_dst}= | Compute IPv6 Map Destination Address -| | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset} -| | ... | ${psid_len} | ${ipv4_dst} | ${dst_port} -| | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}" -| | ... | Set Variable | ${computed_ipv6_dst} -| | ... | ELSE | Set Variable | ${expected_ipv6_dst} -| | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}" -| | ... | IP Addresses Should Be Equal -| | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst} -| | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst} -| | Check Encapsulation With Traffic Script -| | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} -| | Check Decapsulation With Traffic Script -| | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port} -| | [Teardown] | Run Keywords -| | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND -| | ... | Show Packet Trace On All DUTs | ${nodes} | AND -| | ... | Clear Packet Trace On All DUTs | ${nodes} | AND -| | ... | Check VPP PID in Teardown - -| Check Encapsulation With Traffic Script -| | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} -| | Send IPv4 UDP And Check Headers For Lightweight 4over6 -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside} -| | ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${ipv6_dst} | ${ipv6_br_src} - -| Check Decapsulation With Traffic Script -| | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port} -| | Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6 -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${ipv6_br_src} | ${ipv6_ce_addr} -| | ... | ${ipv4_outside} | ${ipv4_inside} | ${port} -| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} diff --git a/tests/func/softwire/map_t.robot b/tests/func/softwire/map_t.robot deleted file mode 100644 index 4167ca2bcf..0000000000 --- a/tests/func/softwire/map_t.robot +++ /dev/null @@ -1,122 +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/testing_path.robot -| Resource | resources/libraries/robot/ipv4.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/map.robot -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Set interfaces IP addresses and routes -| Test Teardown | Func Test Teardown -| Documentation | *Test for Basic mapping rule for MAP-T*\ -| ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the -| ... | nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1. -| ... | Eth-IPv6-UDP on TG-to-DUT-if2. -| ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG -| ... | interface and IPv6 address on second DUT-to-TG interface. MAP-T domain -| ... | is configured in test template based on test parameters. -| ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to -| ... | destination in MAP domain. IPv6 packets with translated IPv4 addresses -| ... | are received on TG interface. -| ... | *[Ref] Applicable standard specifications:* RFC7599 - - -*** Variables *** -| ${dut_ip4}= | 10.0.0.1 -| ${dut_ip6}= | 2001:0::1 -| ${dut_ip4_gw}= | 10.0.0.2 -| ${dut_ip6_gw}= | 2001:0::2 -| ${ipv4_prefix_len}= | 24 -| ${ipv6_prefix_len}= | 64 -| ${ipv6_br_src}= | 2001:db8:ffff::/96 - - -*** Test Cases *** -| TC01: MAP-T test -| | [Documentation] | -| | ... | Test to check map-t address translation. -| | [Template] | Check MAP-T configuration with traffic script -# |===================|===============|================|============|=============|==========|===========|================|==========| -# | ipv4_pfx | ipv6_dst_pfx | ipv6_src_pfx | ea_bit_len | psid_offset | psid_len | ipv4_src | ipv4_dst | dst_port | -# |===================|===============|================|============|=============|==========|===========|================|==========| -| | 20.169.0.0/16 | 2001::/16 | ${ipv6_br_src} | ${40} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | -| | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | -| | 20.0.0.0/8 | 2001:db8::/40 | ${ipv6_br_src} | ${24} | ${0} | ${0} | 100.0.0.1 | 20.169.201.219 | ${1232} | -#| | 20.169.201.0/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${6} | ${8} | 100.0.0.1 | 20.169.201.219 | ${1232} | -#| | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${0} | ${6} | ${8} | 100.0.0.1 | 20.169.201.219 | ${1232} | - - -*** Keywords *** -| Set interfaces IP addresses and routes -| | Path for 2-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Interfaces in 2-node path are up -| | IP addresses are set on interfaces -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len} -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len} -| | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2} -| | ... | resolve_attempts=${NONE} | count=${NONE} -| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} -| | ... | ${tg_to_dut_if2_mac} -| | Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} | ${dut_to_tg_if1} -| | ... | resolve_attempts=${NONE} | count=${NONE} -| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} -| | ... | ${tg_to_dut_if1_mac} - -| Check MAP-T configuration with traffic script -| | [Documentation] | -| | ... | Used as a test case template.\ -| | ... | Configure MAP-T domain with given parameters, with traffic script send -| | ... | UDP in IPv4 packet to given UDP destination port and IP destination -| | ... | address and check if correctly received IPv6 packet with translated -| | ... | source and destination addresses. Vice versa send IPv6 packet and -| | ... | check if received IPv4 packet with correct source and destination -| | ... | addresses. -| | ... | The MAP domain is deleted in teardown. -| | [Arguments] | ${ipv4_pfx} | ${ipv6_dst_pfx} | ${ipv6_src_pfx} -| | ... | ${ea_bit_len} | ${psid_offset} | ${psid_len} -| | ... | ${ipv4_outside} | ${ipv4_inside} | ${dst_port} -| | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} -| | ... | ${ipv6_dst_pfx} | ${ipv6_src_pfx} | ${ea_bit_len} | ${psid_offset} -| | ... | ${psid_len} | ${TRUE} -| | ${ipv6_ce_addr}= | Compute IPv6 map destination address -| | ... | ${ipv4_pfx} | ${ipv6_dst_pfx} | ${ea_bit_len} | ${psid_offset} -| | ... | ${psid_len} | ${ipv4_inside} | ${dst_port} -| | ${ipv6_br_addr}= | Compute IPv6 map source address -| | ... | ${ipv6_src_pfx} | ${ipv4_outside} -# Check translation from v4 to v6 with traffic script -| | Send IPv4 UDP and check IPv6 headers for MAP-T -| | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_mac} | ${ipv4_inside} | ${ipv4_outside} | ${dst_port} -| | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} -| | ... | ${ipv6_ce_addr} | ${ipv6_br_addr} -# Check translation from v6 to v4 with traffic script -| | Send IPv6 UDP and check IPv4 headers for MAP-T -| | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${ipv6_br_addr} | ${ipv6_ce_addr} -| | ... | ${dst_port} -| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${ipv4_outside} | ${ipv4_inside} -| | [Teardown] | Run Keywords -| | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND -| | ... | Show packet trace on all DUTs | ${nodes} | AND -| | ... | Clear packet trace on all DUTs | ${nodes} | AND -| | ... | Check VPP PID in Teardown diff --git a/tests/func/tap/api-crud-tap-func.robot b/tests/func/tap/api-crud-tap-func.robot new file mode 100644 index 0000000000..762c4e3df2 --- /dev/null +++ b/tests/func/tap/api-crud-tap-func.robot @@ -0,0 +1,69 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.Tap +| Library | resources.libraries.python.Namespaces +| Library | resources.libraries.python.IPUtil +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Test Teardown | Run Keywords | Func Test Teardown +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Documentation | *Tap Interface CRUD Tests* +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes. +| ... | *[Enc] Packet Encapsulations:* No packet sent. +| ... | *[Cfg] DUT configuration:* Add/Modify/Delete linux-TAP on DUT1. +| ... | *[Ver] Verification:* Check dump of tap interfaces for correctness. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tap_int1}= | tap_int1 +| ${tap_int2}= | tap_int2 +| ${mod_tap_name}= | tap_int1MOD + +*** Test Cases *** +| TC01: Tap Interface Modify And Delete +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] Set two TAP interfaces. +| | ... | [Ver] Verify that TAP interface can be modified, deleted, and no other +| | ... | TAP interface is affected. +| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} +| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} +| | And Set Interface State | ${dut_node} | ${int1} | up +| | And Set Interface State | ${dut_node} | ${int2} | up +| | When Modify Tap Interface | ${dut_node} | ${int1} | ${mod_tap_name} +| | Then Check Tap Present | ${dut_node} | ${mod_tap_name} +| | When Delete Tap Interface | ${dut_node} | ${int1} +| | Then Run Keyword And Expect Error +| | ... | Tap interface :${mod_tap_name} does not exist +| | ... | Check Tap Present | ${dut_node} | ${mod_tap_name} +| | And Check Tap Present | ${dut_node} | ${tap_int2} +| | When Delete Tap Interface | ${dut_node} | ${int2} +| | Then Run Keyword And Expect Error +| | ... | ValueError: No JSON object could be decoded +| | ... | Check Tap Present | ${dut_node} | ${tap_int2} diff --git a/tests/func/tap/eth2p-eth-l2bdbasemaclrn-eth-2tap-func.robot b/tests/func/tap/eth2p-eth-l2bdbasemaclrn-eth-2tap-func.robot new file mode 100644 index 0000000000..6c47c5c574 --- /dev/null +++ b/tests/func/tap/eth2p-eth-l2bdbasemaclrn-eth-2tap-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 *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.Tap +| Library | resources.libraries.python.Namespaces +| Library | resources.libraries.python.IPUtil +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Test Teardown | Run Keywords | Func Test Teardown +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Documentation | *Tap Interface Traffic Tests* +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG) +| ... | are set depending on test case; Namespaces (NM) +| ... | are set on DUT1 with attached linux-TAP. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets +| ... | are sent by TG on link to DUT1; On receipt TG verifies packets +| ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${bid_from_TG}= | 19 +| ${bid_to_TG}= | 20 +| ${bid_TAP}= | tapBr + +| ${tap_int1}= | tap_int1 +| ${tap_int2}= | tap_int2 + +*** Test Cases *** +| TC01: Tap Interface Simple BD +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] On DUT1 configure two +| | ... | L2BD with two if's for each L2BD with MAC learning and one L2BD +| | ... | joining two linux-TAP interfaces created by VPP located in namespace. +| | ... | [Ver] Packet sent from TG is passed through all L2BD and received +| | ... | back on TG. Then src_ip, dst_ip and MAC are checked. +| | ... +| | [Teardown] | Run Keywords +| | ... | Linux Del Bridge | ${dut_node} | ${bid_TAP} | AND +| | ... | Show Packet Trace on All DUTs | ${nodes} | AND +| | ... | Clean Up Namespaces | ${nodes['DUT1']} | AND +| | ... | Check VPP PID in Teardown +| | ... +| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} +| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} +| | And Set Interface State | ${dut_node} | ${int1} | up +| | And Set Interface State | ${dut_node} | ${int2} | up +| | And Bridge domain on DUT node is created | ${dut_node} +| | ... | ${bid_from_TG} | learn=${TRUE} +| | And Bridge domain on DUT node is created | ${dut_node} +| | ... | ${bid_to_TG} | learn=${TRUE} +| | And Linux Add Bridge | ${dut_node} +| | ... | ${bid_TAP} | ${tap_int1} | ${tap_int2} +| | And Interface is added to bridge domain | ${dut_node} +| | ... | ${int1} | ${bid_to_TG} | 0 +| | And Interface is added to bridge domain | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${bid_to_TG} | 0 +| | And Interface is added to bridge domain | ${dut_node} +| | ... | ${int2} | ${bid_from_TG} | 0 +| | And Interface is added to bridge domain | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${bid_from_TG} | 0 +| | Then Send and receive ICMP Packet | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} diff --git a/tests/func/tap/eth2p-eth-l2bdbasemaclrn-l2shg-eth-2tap-func.robot b/tests/func/tap/eth2p-eth-l2bdbasemaclrn-l2shg-eth-2tap-func.robot new file mode 100644 index 0000000000..8620dd05fd --- /dev/null +++ b/tests/func/tap/eth2p-eth-l2bdbasemaclrn-l2shg-eth-2tap-func.robot @@ -0,0 +1,170 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.Tap +| Library | resources.libraries.python.Namespaces +| Library | resources.libraries.python.IPUtil +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Test Teardown | Run Keywords | Func Test Teardown +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Documentation | *Tap Interface Traffic Tests* +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG) +| ... | are set depending on test case; Namespaces (NM) +| ... | are set on DUT1 with attached linux-TAP. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets +| ... | are sent by TG on link to DUT1; On receipt TG verifies packets +| ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tap1_NM_ip}= | 16.0.10.2 +| ${tap2_NM_SHG}= | 16.0.10.3 + +| ${bd_id1}= | 21 +| ${shg1}= | 2 +| ${shg2}= | 3 + +| ${tap1_NM_mac}= | 02:00:00:00:00:02 +| ${tap2_NM_mac}= | 02:00:00:00:00:04 + +| ${tap_int1}= | tap_int1 +| ${tap_int2}= | tap_int2 + +| ${namespace1}= | nmspace1 +| ${namespace2}= | nmspace2 + +| ${tg_ip_address_SHG}= | 16.0.10.20 +| ${prefix}= | 24 + +*** Test Cases *** +| TC01: Tap Interface BD - Different Split Horizon +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] On DUT1 +| | ... | configure one if into L2BD with MAC learning. Add two TAP interfaces +| | ... | into this L2BD and assign them different SHG. Setup two namespaces +| | ... | and assign two linux-TAP interfaces to it respectively. +| | ... | [Ver] Packet is sent from TG to both linux-TAP interfaces and reply +| | ... | is checked. Ping from First linux-TAP to another should pass. +| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} +| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} +| | And Set Interface State | ${dut_node} | ${int1} | up +| | And Set Interface State | ${dut_node} | ${int2} | up +| | When Create Namespace | ${dut_node} | ${namespace1} +| | And Attach Interface To Namespace | ${dut_node} +| | ... | ${namespace1} | ${tap_int1} +| | And Create Namespace | ${dut_node} | ${namespace2} +| | And Attach Interface To Namespace | ${dut_node} +| | ... | ${namespace2} | ${tap_int2} +| | And Set Linux Interface IP | ${dut_node} | ${tap_int1} +| | ... | ${tap1_NM_ip} | ${prefix} | ${namespace1} +| | And Set Linux Interface IP | ${dut_node} | ${tap_int2} +| | ... | ${tap2_NM_SHG} | ${prefix} | ${namespace2} +| | And Set Linux Interface MAC | ${dut_node} +| | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1} +| | And Set Linux Interface MAC | ${dut_node} +| | ... | ${tap_int2} | ${tap2_NM_mac} | ${namespace2} +| | And Set Linux Interface ARP | ${dut_node} | ${tap_int1} +| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace1} +| | And Set Linux Interface ARP | ${dut_node} | ${tap_int2} +| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace2} +| | And Bridge domain on DUT node is created | ${dut_node} +| | ... | ${bd_id1} | learn=${TRUE} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${int1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut_node} | ${int2} +| | ... | ${bd_id1} | ${shg2} +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tap1_NM_mac} | ${tg_to_dut_if1_mac} +| | ... | ${tap1_NM_ip} | ${tg_ip_address_SHG} +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tap2_NM_mac} | ${tg_to_dut_if1_mac} +| | ... | ${tap2_NM_SHG} | ${tg_ip_address_SHG} +| | And Send Ping From Node To Dst | ${dut_node} | ${tap1_NM_ip} | namespace=${namespace2} +| | And Send Ping From Node To Dst | ${dut_node} | ${tap2_NM_SHG} | namespace=${namespace1} + +| TC02: Tap Interface BD - Same Split Horizon +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] On DUT1 +| | ... | configure one if into L2BD with MAC learning. Add two TAP interfaces +| | ... | into this L2BD and assign them same SHG. Setup two namespaces +| | ... | and assign two linux-TAP interfaces to it respectively. +| | ... | [Ver] Packet is sent from TG to both linux-TAP interfaces and reply +| | ... | is checked. Ping from First linux-TAP to another should fail. +| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} +| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} +| | And Set Interface State | ${dut_node} | ${int1} | up +| | And Set Interface State | ${dut_node} | ${int2} | up +| | When Create Namespace | ${dut_node} | ${namespace1} +| | And Attach Interface To Namespace | ${dut_node} +| | ... | ${namespace1} | ${tap_int1} +| | And Create Namespace | ${dut_node} | ${namespace2} +| | And Attach Interface To Namespace | ${dut_node} +| | ... | ${namespace2} | ${tap_int2} +| | And Set Linux Interface IP | ${dut_node} | ${tap_int1} +| | ... | ${tap1_NM_ip} | ${prefix} | ${namespace1} +| | And Set Linux Interface IP | ${dut_node} | ${tap_int2} +| | ... | ${tap2_NM_SHG} | ${prefix} | ${namespace2} +| | And Set Linux Interface MAC | ${dut_node} +| | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1} +| | And Set Linux Interface MAC | ${dut_node} +| | ... | ${tap_int2} | ${tap2_NM_mac} | ${namespace2} +| | And Set Linux Interface ARP | ${dut_node} | ${tap_int1} +| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace1} +| | And Set Linux Interface ARP | ${dut_node} | ${tap_int2} +| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace2} +| | And Bridge domain on DUT node is created | ${dut_node} +| | ... | ${bd_id1} | learn=${TRUE} +| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut_node} | ${int1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut_node} | ${int2} +| | ... | ${bd_id1} | ${shg1} +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tap1_NM_mac} | ${tg_to_dut_if1_mac} +| | ... | ${tap1_NM_ip} | ${tg_ip_address_SHG} +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tap2_NM_mac} | ${tg_to_dut_if1_mac} +| | ... | ${tap2_NM_SHG} | ${tg_ip_address_SHG} +| | And Run Keyword And Expect Error | Ping Not Successful | Send Ping From Node To Dst +| | ... | ${dut_node} | ${tap2_NM_SHG} | namespace=${namespace1} +| | And Run Keyword And Expect Error | Ping Not Successful | Send Ping From Node To Dst +| | ... | ${dut_node} | ${tap1_NM_ip} | namespace=${namespace2} diff --git a/tests/func/tap/eth2p-ethip4-ip4base-eth-1tap-func.robot b/tests/func/tap/eth2p-ethip4-ip4base-eth-1tap-func.robot new file mode 100644 index 0000000000..bd767e704c --- /dev/null +++ b/tests/func/tap/eth2p-ethip4-ip4base-eth-1tap-func.robot @@ -0,0 +1,123 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/bridge_domain.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.Tap +| Library | resources.libraries.python.Namespaces +| Library | resources.libraries.python.IPUtil +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Test Teardown | Run Keywords | Func Test Teardown +| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} +| Documentation | *Tap Interface Traffic Tests* +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links +| ... | between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG) +| ... | are set depending on test case; Namespaces (NM) +| ... | are set on DUT1 with attached linux-TAP. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets +| ... | are sent by TG on link to DUT1; On receipt TG verifies packets +| ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${tap1_VPP_ip}= | 16.0.10.1 +| ${tap1_NM_ip}= | 16.0.10.2 +| ${tap1_NM_mac}= | 02:00:00:00:00:02 +| ${tap_int1}= | tap_int1 + +| ${namespace1}= | nmspace1 + +| ${dut_ip_address}= | 192.168.0.1 +| ${tg_ip_address}= | 192.168.0.2 +| ${tg_ip_address_GW}= | 192.168.0.0 +| ${prefix}= | 24 + +*** Test Cases *** +| TC01: Tap Interface IP Ping Without Namespace +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which +| | ... | one is TAP interface ( dut_to_tg_if and TAP ). +| | ... | and one is linux-TAP. +| | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is +| | ... | received on TG. +| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} | +| | And Set Interface Address +| | ... | ${dut_node} | ${int1} | ${tap1_VPP_ip} | ${prefix} +| | And Set Interface Address +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip_address} | ${prefix} +| | And Set Interface State | ${dut_node} | ${int1} | up +| | And Set Linux Interface MAC | ${dut_node} | ${tap_int1} | ${tap1_NM_mac} +| | And Set Linux Interface IP | ${dut_node} +| | ... | ${tap_int1} | ${tap1_NM_ip} | ${prefix} +| | And Add Route | ${dut_node} +| | ... | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${tg_ip_address} | ${tg_to_dut_if1_mac} +| | And Add Arp On Dut | ${dut_node} | ${int1} +| | ... | ${tap1_NM_ip} | ${tap1_NM_mac} +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} +| | ... | ${tap1_NM_ip} | ${tg_ip_address} + +| TC02: Tap Interface IP Ping With Namespace +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which +| | ... | one is TAP interface ( dut_to_tg_if and TAP ). +| | ... | and one is linux-TAP in namespace. +| | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is +| | ... | received on TG. +| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['TG']} +| | And Interfaces in 2-node path are up +| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} | +| | And Set Interface Address +| | ... | ${dut_node} | ${int1} | ${tap1_VPP_ip} | ${prefix} +| | And Set Interface Address +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip_address} | ${prefix} +| | And Set Interface State | ${dut_node} | ${int1} | up +| | When Create Namespace | ${dut_node} | ${namespace1} +| | And Attach Interface To Namespace | ${dut_node} +| | ... | ${namespace1} | ${tap_int1} +| | And Set Linux Interface MAC | ${dut_node} +| | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1} +| | And Set Linux Interface IP | ${dut_node} +| | ... | ${tap_int1} | ${tap1_NM_ip} | ${prefix} | ${namespace1} +| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${tg_ip_address} | ${tg_to_dut_if1_mac} +| | And Add Arp On Dut | ${dut_node} | ${int1} +| | ... | ${tap1_NM_ip} | ${tap1_NM_mac} +| | And Add Route | ${dut_node} +| | ... | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip} | ${namespace1} +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} +| | ... | ${tap1_NM_ip} | ${tg_ip_address} diff --git a/tests/func/tap/tap_interface.robot b/tests/func/tap/tap_interface.robot deleted file mode 100644 index 2acdad8d37..0000000000 --- a/tests/func/tap/tap_interface.robot +++ /dev/null @@ -1,316 +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/ipv4.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/bridge_domain.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/traffic.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.Tap -| Library | resources.libraries.python.Namespaces -| Library | resources.libraries.python.IPUtil -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Run Keywords | Func Test Setup -| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} -| Test Teardown | Run Keywords | Func Test Teardown -| ... | AND | Clean Up Namespaces | ${nodes['DUT1']} -| Documentation | *Tap Interface Traffic Tests* -| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links -| ... | between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of -| ... | IPv4. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG) -| ... | are set depending on test case; Namespaces (NM) -| ... | are set on DUT1 with attached linux-TAP. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets -| ... | are sent by TG on link to DUT1; On receipt TG verifies packets -| ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tap1_VPP_ip}= | 16.0.10.1 -| ${tap2_VPP_ip}= | 16.0.20.1 - -| ${tap1_NM_ip}= | 16.0.10.2 -| ${tap2_NM_ip}= | 16.0.20.2 -| ${tap2_NM_SHG}= | 16.0.10.3 - -| ${bid_from_TG}= | 19 -| ${bid_to_TG}= | 20 -| ${bid_NM}= | container1_br -| ${bid_TAP}= | tapBr -| ${bd_id1}= | 21 -| ${bd_id2}= | 22 -| ${shg1}= | 2 -| ${shg2}= | 3 - -| ${tap1_NM_mac}= | 02:00:00:00:00:02 -| ${tap2_NM_mac}= | 02:00:00:00:00:04 - -| ${tap_int1}= | tap_int1 -| ${tap_int2}= | tap_int2 -| ${mod_tap_name}= | tap_int1MOD - -| ${namespace1}= | nmspace1 -| ${namespace2}= | nmspace2 - -| ${dut_ip_address}= | 192.168.0.1 -| ${tg_ip_address}= | 192.168.0.2 -| ${tg_ip_address_SHG}= | 16.0.10.20 -| ${tg_ip_address_GW}= | 192.168.0.0 - -| ${prefix}= | 24 - -*** Test Cases *** -| TC01: Tap Interface Simple BD -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] On DUT1 configure two -| | ... | L2BD with two if's for each L2BD with MAC learning and one L2BD -| | ... | joining two linux-TAP interfaces created by VPP located in namespace. -| | ... | [Ver] Packet sent from TG is passed through all L2BD and received -| | ... | back on TG. Then src_ip, dst_ip and MAC are checked. -| | ... -| | [Teardown] | Run Keywords -| | ... | Linux Del Bridge | ${dut_node} | ${bid_TAP} | AND -| | ... | Show Packet Trace on All DUTs | ${nodes} | AND -| | ... | Clean Up Namespaces | ${nodes['DUT1']} | AND -| | ... | Check VPP PID in Teardown -| | ... -| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} -| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} -| | And Set Interface State | ${dut_node} | ${int1} | up -| | And Set Interface State | ${dut_node} | ${int2} | up -| | And Bridge domain on DUT node is created | ${dut_node} -| | ... | ${bid_from_TG} | learn=${TRUE} -| | And Bridge domain on DUT node is created | ${dut_node} -| | ... | ${bid_to_TG} | learn=${TRUE} -| | And Linux Add Bridge | ${dut_node} -| | ... | ${bid_TAP} | ${tap_int1} | ${tap_int2} -| | And Interface is added to bridge domain | ${dut_node} -| | ... | ${int1} | ${bid_to_TG} | 0 -| | And Interface is added to bridge domain | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${bid_to_TG} | 0 -| | And Interface is added to bridge domain | ${dut_node} -| | ... | ${int2} | ${bid_from_TG} | 0 -| | And Interface is added to bridge domain | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${bid_from_TG} | 0 -| | Then Send and receive ICMP Packet | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} - -| TC02: Tap Interface IP Ping Without Namespace -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which -| | ... | one is TAP interface ( dut_to_tg_if and TAP ). -| | ... | and one is linux-TAP. -| | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is -| | ... | received on TG. -| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} | -| | And Set Interface Address -| | ... | ${dut_node} | ${int1} | ${tap1_VPP_ip} | ${prefix} -| | And Set Interface Address -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip_address} | ${prefix} -| | And Set Interface State | ${dut_node} | ${int1} | up -| | And Set Linux Interface MAC | ${dut_node} | ${tap_int1} | ${tap1_NM_mac} -| | And Set Linux Interface IP | ${dut_node} -| | ... | ${tap_int1} | ${tap1_NM_ip} | ${prefix} -| | And Add Route | ${dut_node} -| | ... | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${tg_ip_address} | ${tg_to_dut_if1_mac} -| | And Add Arp On Dut | ${dut_node} | ${int1} -| | ... | ${tap1_NM_ip} | ${tap1_NM_mac} -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} -| | ... | ${tap1_NM_ip} | ${tg_ip_address} - -| TC03: Tap Interface IP Ping With Namespace -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which -| | ... | one is TAP interface ( dut_to_tg_if and TAP ). -| | ... | and one is linux-TAP in namespace. -| | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is -| | ... | received on TG. -| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} | -| | And Set Interface Address -| | ... | ${dut_node} | ${int1} | ${tap1_VPP_ip} | ${prefix} -| | And Set Interface Address -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip_address} | ${prefix} -| | And Set Interface State | ${dut_node} | ${int1} | up -| | When Create Namespace | ${dut_node} | ${namespace1} -| | And Attach Interface To Namespace | ${dut_node} -| | ... | ${namespace1} | ${tap_int1} -| | And Set Linux Interface MAC | ${dut_node} -| | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1} -| | And Set Linux Interface IP | ${dut_node} -| | ... | ${tap_int1} | ${tap1_NM_ip} | ${prefix} | ${namespace1} -| | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${tg_ip_address} | ${tg_to_dut_if1_mac} -| | And Add Arp On Dut | ${dut_node} | ${int1} -| | ... | ${tap1_NM_ip} | ${tap1_NM_mac} -| | And Add Route | ${dut_node} -| | ... | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip} | ${namespace1} -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac} -| | ... | ${tap1_NM_ip} | ${tg_ip_address} - -| TC04: Tap Interface BD - Different Split Horizon -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] On DUT1 -| | ... | configure one if into L2BD with MAC learning. Add two TAP interfaces -| | ... | into this L2BD and assign them different SHG. Setup two namespaces -| | ... | and assign two linux-TAP interfaces to it respectively. -| | ... | [Ver] Packet is sent from TG to both linux-TAP interfaces and reply -| | ... | is checked. Ping from First linux-TAP to another should pass. -| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} -| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} -| | And Set Interface State | ${dut_node} | ${int1} | up -| | And Set Interface State | ${dut_node} | ${int2} | up -| | When Create Namespace | ${dut_node} | ${namespace1} -| | And Attach Interface To Namespace | ${dut_node} -| | ... | ${namespace1} | ${tap_int1} -| | And Create Namespace | ${dut_node} | ${namespace2} -| | And Attach Interface To Namespace | ${dut_node} -| | ... | ${namespace2} | ${tap_int2} -| | And Set Linux Interface IP | ${dut_node} | ${tap_int1} -| | ... | ${tap1_NM_ip} | ${prefix} | ${namespace1} -| | And Set Linux Interface IP | ${dut_node} | ${tap_int2} -| | ... | ${tap2_NM_SHG} | ${prefix} | ${namespace2} -| | And Set Linux Interface MAC | ${dut_node} -| | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1} -| | And Set Linux Interface MAC | ${dut_node} -| | ... | ${tap_int2} | ${tap2_NM_mac} | ${namespace2} -| | And Set Linux Interface ARP | ${dut_node} | ${tap_int1} -| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace1} -| | And Set Linux Interface ARP | ${dut_node} | ${tap_int2} -| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace2} -| | And Bridge domain on DUT node is created | ${dut_node} -| | ... | ${bd_id1} | learn=${TRUE} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${int1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut_node} | ${int2} -| | ... | ${bd_id1} | ${shg2} -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tap1_NM_mac} | ${tg_to_dut_if1_mac} -| | ... | ${tap1_NM_ip} | ${tg_ip_address_SHG} -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tap2_NM_mac} | ${tg_to_dut_if1_mac} -| | ... | ${tap2_NM_SHG} | ${tg_ip_address_SHG} -| | And Send Ping From Node To Dst | ${dut_node} | ${tap1_NM_ip} | namespace=${namespace2} -| | And Send Ping From Node To Dst | ${dut_node} | ${tap2_NM_SHG} | namespace=${namespace1} - -| TC05: Tap Interface BD - Same Split Horizon -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] On DUT1 -| | ... | configure one if into L2BD with MAC learning. Add two TAP interfaces -| | ... | into this L2BD and assign them same SHG. Setup two namespaces -| | ... | and assign two linux-TAP interfaces to it respectively. -| | ... | [Ver] Packet is sent from TG to both linux-TAP interfaces and reply -| | ... | is checked. Ping from First linux-TAP to another should fail. -| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} -| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} -| | And Set Interface State | ${dut_node} | ${int1} | up -| | And Set Interface State | ${dut_node} | ${int2} | up -| | When Create Namespace | ${dut_node} | ${namespace1} -| | And Attach Interface To Namespace | ${dut_node} -| | ... | ${namespace1} | ${tap_int1} -| | And Create Namespace | ${dut_node} | ${namespace2} -| | And Attach Interface To Namespace | ${dut_node} -| | ... | ${namespace2} | ${tap_int2} -| | And Set Linux Interface IP | ${dut_node} | ${tap_int1} -| | ... | ${tap1_NM_ip} | ${prefix} | ${namespace1} -| | And Set Linux Interface IP | ${dut_node} | ${tap_int2} -| | ... | ${tap2_NM_SHG} | ${prefix} | ${namespace2} -| | And Set Linux Interface MAC | ${dut_node} -| | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1} -| | And Set Linux Interface MAC | ${dut_node} -| | ... | ${tap_int2} | ${tap2_NM_mac} | ${namespace2} -| | And Set Linux Interface ARP | ${dut_node} | ${tap_int1} -| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace1} -| | And Set Linux Interface ARP | ${dut_node} | ${tap_int2} -| | ... | ${tg_ip_address_SHG} | ${tg_to_dut_if1_mac} | ${namespace2} -| | And Bridge domain on DUT node is created | ${dut_node} -| | ... | ${bd_id1} | learn=${TRUE} -| | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut_node} | ${int1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut_node} | ${int2} -| | ... | ${bd_id1} | ${shg1} -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tap1_NM_mac} | ${tg_to_dut_if1_mac} -| | ... | ${tap1_NM_ip} | ${tg_ip_address_SHG} -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tap2_NM_mac} | ${tg_to_dut_if1_mac} -| | ... | ${tap2_NM_SHG} | ${tg_ip_address_SHG} -| | And Run Keyword And Expect Error | Ping Not Successful | Send Ping From Node To Dst -| | ... | ${dut_node} | ${tap2_NM_SHG} | namespace=${namespace1} -| | And Run Keyword And Expect Error | Ping Not Successful | Send Ping From Node To Dst -| | ... | ${dut_node} | ${tap1_NM_ip} | namespace=${namespace2} - -| TC06: Tap Interface Modify And Delete -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] Set two TAP interfaces. -| | ... | [Ver] Verify that TAP interface can be modified, deleted, and no other -| | ... | TAP interface is affected. -| | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['TG']} -| | And Interfaces in 2-node path are up -| | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} -| | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2} -| | And Set Interface State | ${dut_node} | ${int1} | up -| | And Set Interface State | ${dut_node} | ${int2} | up -| | When Modify Tap Interface | ${dut_node} | ${int1} | ${mod_tap_name} -| | Then Check Tap Present | ${dut_node} | ${mod_tap_name} -| | When Delete Tap Interface | ${dut_node} | ${int1} -| | Then Run Keyword And Expect Error -| | ... | Tap interface :${mod_tap_name} does not exist -| | ... | Check Tap Present | ${dut_node} | ${mod_tap_name} -| | And Check Tap Present | ${dut_node} | ${tap_int2} -| | When Delete Tap Interface | ${dut_node} | ${int2} -| | Then Run Keyword And Expect Error -| | ... | ValueError: No JSON object could be decoded -| | ... | Check Tap Present | ${dut_node} | ${tap_int2} diff --git a/tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixbase-func.robot b/tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixbase-func.robot new file mode 100644 index 0000000000..f3b02722cc --- /dev/null +++ b/tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixbase-func.robot @@ -0,0 +1,200 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/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/telemetry/ipfix.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.telemetry.IPFIXSetup +| 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 | *IPFIX ipv4 test cases* +| ... +| ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 is configured with IPv4 +| ... | routing and static routes. IPFIX is configured on DUT1 with +| ... | DUT1->TG interface as collector. Test packets are +| ... | sent from TG to DUT1. TG listens for flow report packets +| ... | and verifies that they contains flow record of test packets sent. + +*** Variables *** +| ${dut1_to_tg_ip}= | 192.168.1.1 +| ${tg_to_dut1_ip}= | 192.168.1.2 +| ${dut2_to_dut1_ip}= | 192.168.2.1 +| ${prefix_length}= | 24 +| ${ip_version}= | ip4 +| ${port}= | 80 + +*** Test Cases *** +| TC01: DUT sends IPFIX template and data packets +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and a basic classify session. +| | ... | [Ver] Make TG listen for IPFIX template and data packets, verify +| | ... | that packet is received and correct. No packets are sent from TG. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src +| | ... | ${tg_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | count=0 + +| TC02: DUT reports packet flow for traffic by source address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with TG source address. +| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packet. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src +| | ... | ${tg_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} + +| TC03: DUT reports packet flow for traffic with local destination address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with destination +| | ... | address of DUT1. +| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packet. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst +| | ... | ${dut1_to_tg_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} + +| TC04: DUT reports packet flow for traffic with remote destination address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with destination +| | ... | address of DUT2. +| | ... | [Ver] Make TG send a packet to DUT2 through DUT1, then listen +| | ... | for IPFIX template and data packets, verify that IPFIX reported +| | ... | the received packet. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip} +| | ... | ${dut2_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst +| | ... | ${dut2_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut2_to_dut1_ip} + +| TC05: DUT reports packet flow for traffic by source and destination port +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with TG source address +| | ... | and source and destination ports. +| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packet. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} +| | ... | src proto l4 src_port dst_port +| | And VPP configures classify session generic | ${dut1_node} +| | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} +| | ... | l3 ${ip_version} src ${tg_to_dut1_ip} +| | ... | proto 6 l4 src_port ${port} dst_port ${port} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | port=${port} + +# TODO: DUT reports packet flow when ACL is configured with wildcards diff --git a/tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixscale-func.robot b/tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixscale-func.robot new file mode 100644 index 0000000000..1331f1c883 --- /dev/null +++ b/tests/func/telemetry/ipfix/eth2p-ethip4-ip4base-ip4ipfixscale-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/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/ipv4.robot +| Resource | resources/libraries/robot/telemetry/ipfix.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.telemetry.IPFIXSetup +| 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 | *IPFIX ipv4 test cases* +| ... +| ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 is configured with IPv4 +| ... | routing and static routes. IPFIX is configured on DUT1 with +| ... | DUT1->TG interface as collector. Test packets are +| ... | sent from TG to DUT1. TG listens for flow report packets +| ... | and verifies that they contains flow record of test packets sent. + +*** Variables *** +| ${dut1_to_tg_ip}= | 192.168.1.1 +| ${tg_to_dut1_ip}= | 192.168.1.2 +| ${prefix_length}= | 24 +| ${ip_version}= | ip4 +| ${sessions}= | 80 + +*** Test Cases *** +| TC01: DUT reports packet flow with a large number of packets +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with TG source address. +| | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packets. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src +| | ... | ${tg_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | count=20000 | timeout=10 + +| TC02: DUT reports packet flow when multiple sessions are configured +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add several classify sessions with different +| | ... | ports. +| | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching +| | ... | configured sessions, then listen for IPFIX template and data packets, +| | ... | verify that IPFIX reported the received packets for each session. +| | ... | [Ref] RFC 7011 +| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} +| | ... | src proto l4 src_port dst_port +| | :FOR | ${index} | IN RANGE | ${sessions} +| | | VPP configures classify session generic | ${dut1_node} +| | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} +| | | ... | l3 ${ip_version} src ${tg_to_dut1_ip} +| | | ... | proto 6 l4 src_port ${index} dst_port ${index} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} +| | ... | ${dut1_to_tg_ip} +| | ... | mtu=1450 | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | ${sessions} | timeout=10 | count=3 + +# TODO: DUT reports packet flow when ACL is configured with wildcards diff --git a/tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixbase-func.robot b/tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixbase-func.robot new file mode 100644 index 0000000000..8451eb6940 --- /dev/null +++ b/tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixbase-func.robot @@ -0,0 +1,197 @@ +# 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/telemetry/ipfix.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.telemetry.IPFIXSetup +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.Trace + +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING +# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-204) +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IPFIX ipv6 test cases* +| ... +| ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 is configured with IPv4 and IPV6 +| ... | routing and static routes. IPFIX is configured on DUT1 with +| ... | DUT1->TG interface as collector.Test packets are +| ... | sent from TG to or through DUT1. TG listens for flow report packets +| ... | and verifies that they contains flow records of test packets sent. + +*** Variables *** +| ${dut1_to_tg_ip}= | 10::10 +| ${dut2_to_dut1_ip}= | 11::10 +| ${tg_to_dut1_ip}= | 12::10 +| ${prefix_length}= | 64 +| ${ip_version}= | ip6 +| ${port}= | 80 + +# IPv4 addresses used for IPFIX exporter. Export over IPv6 not (yet?) supported. +| ${dut1_to_tg_ip4}= | 192.168.1.1 +| ${tg_to_dut1_ip4}= | 192.168.1.2 + +*** Test Cases *** +| TC01: DUT reports packet flow for traffic by source address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with TG source address. +| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packet. +| | ... | [Ref] RFC 7011 +| | 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_tg} | ${dut1_to_tg_ip4} | ${24} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src +| | ... | ${tg_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} +| | ... | ${dut1_to_tg_ip4} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} + +| TC02: DUT reports packet flow for traffic with local destination address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with destination +| | ... | address of DUT1. +| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packet. +| | ... | [Ref] RFC 7011 +| | 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_tg} | ${dut1_to_tg_ip4} | ${24} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst +| | ... | ${dut1_to_tg_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} +| | ... | ${dut1_to_tg_ip4} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} + +| TC03: DUT reports packet flow for traffic with remote destination address +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with destination +| | ... | address of DUT2. +| | ... | [Ver] Make TG send a packet to DUT2 through DUT1, then listen +| | ... | for IPFIX template and data packets, verify that IPFIX reported +| | ... | the received packet. +| | ... | [Ref] RFC 7011 +| | 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_tg} | ${dut1_to_tg_ip4} | ${24} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip} +| | ... | ${dut2_to_dut1_mac} +| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst +| | ... | ${dut2_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} +| | ... | ${dut1_to_tg_ip4} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${dut2_to_dut1_ip} + +| TC04: DUT reports packet flow for traffic by source and destination port +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with TG source address +| | ... | and source and destination ports. +| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packet. +| | ... | [Ref] RFC 7011 +| | 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_tg} | ${dut1_to_tg_ip4} | ${24} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} +| | ... | src proto l4 src_port dst_port +| | And VPP configures classify session generic | ${dut1_node} +| | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} +| | ... | l3 ${ip_version} src ${tg_to_dut1_ip} +| | ... | proto 6 l4 src_port ${port} dst_port ${port} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} +| | ... | ${dut1_to_tg_ip4} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | port=${port} + +# TODO: DUT reports packet flow when ACL is configured with wildcards diff --git a/tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixscale-func.robot b/tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixscale-func.robot new file mode 100644 index 0000000000..125e8b92af --- /dev/null +++ b/tests/func/telemetry/ipfix/eth2p-ethip6-ip6base-ip6ipfixscale-func.robot @@ -0,0 +1,126 @@ +# 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/telemetry/ipfix.robot +| Library | resources.libraries.python.Classify.Classify +| Library | resources.libraries.python.telemetry.IPFIXSetup +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.Trace + +| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING +# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-204) +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *IPFIX ipv6 test cases* +| ... +| ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with +| ... | one link between the nodes. DUT1 is configured with IPv4 and IPV6 +| ... | routing and static routes. IPFIX is configured on DUT1 with +| ... | DUT1->TG interface as collector.Test packets are +| ... | sent from TG to or through DUT1. TG listens for flow report packets +| ... | and verifies that they contains flow records of test packets sent. + +*** Variables *** +| ${dut1_to_tg_ip}= | 10::10 +| ${tg_to_dut1_ip}= | 12::10 +| ${prefix_length}= | 64 +| ${ip_version}= | ip6 +| ${sessions}= | 45 + +# IPv4 addresses used for IPFIX exporter. Export over IPv6 not (yet?) supported. +| ${dut1_to_tg_ip4}= | 192.168.1.1 +| ${tg_to_dut1_ip4}= | 192.168.1.2 + +*** Test Cases *** +| TC01: DUT reports packet flow with a large number of packets +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add classify session with TG source address. +| | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template +| | ... | and data packets, verify that IPFIX reported the received packets. +| | ... | [Ref] RFC 7011 +| | 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_tg} | ${dut1_to_tg_ip4} | ${24} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src +| | And VPP configures classify session L3 | ${dut1_node} | permit +| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src +| | ... | ${tg_to_dut1_ip} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} +| | ... | ${dut1_to_tg_ip4} | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | count=20000 | timeout=10 + +| TC02: DUT reports packet flow when multiple sessions are configured +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface +| | ... | address as collector and add several classify sessions with different +| | ... | ports. +| | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching +| | ... | configured sessions, then listen for IPFIX template and data packets, +| | ... | verify that IPFIX reported the received packets for each session. +| | ... | [Ref] RFC 7011 +| | 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_tg} | ${dut1_to_tg_ip4} | ${24} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} +| | ... | ${tg_to_dut1_mac} +| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} +| | ... | ${tg_to_dut1_mac} +| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} +| | ${table_index} | ${skip_n} | ${match_n}= +| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} +| | ... | src proto l4 src_port dst_port +| | :FOR | ${index} | IN RANGE | ${sessions} +| | | VPP configures classify session generic | ${dut1_node} +| | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} +| | | ... | l3 ${ip_version} src ${tg_to_dut1_ip} +| | | ... | proto 6 l4 src_port ${index} dst_port ${index} +| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} +| | ... | ${table_index} | ip_version=${ip_version} +| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} +| | ... | ${dut1_to_tg_ip4} | interval=5 +| | ... | mtu=1450 | interval=5 +| | And Set IPFIX stream | ${dut1_node} | ${1} +| | And Assign classify table to exporter | ${dut1_node} | ${table_index} +| | ... | ${ip_version} +| | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node} +| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} +| | ... | ${sessions} | timeout=10 | count=3 + +# TODO: DUT reports packet flow when ACL is configured with wildcards diff --git a/tests/func/telemetry/ipfix_ipv4.robot b/tests/func/telemetry/ipfix_ipv4.robot deleted file mode 100644 index 1c85d1f8a4..0000000000 --- a/tests/func/telemetry/ipfix_ipv4.robot +++ /dev/null @@ -1,267 +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/telemetry/ipfix.robot -| Library | resources.libraries.python.Classify.Classify -| Library | resources.libraries.python.telemetry.IPFIXSetup -| Library | resources.libraries.python.Trace - -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING -# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-204) -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IPFIX ipv4 test cases* -| ... -| ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with -| ... | one link between the nodes. DUT1 is configured with IPv4 -| ... | routing and static routes. IPFIX is configured on DUT1 with -| ... | DUT1->TG interface as collector. Test packets are -| ... | sent from TG to DUT1. TG listens for flow report packets -| ... | and verifies that they contains flow record of test packets sent. - -*** Variables *** -| ${dut1_to_tg_ip}= | 192.168.1.1 -| ${tg_to_dut1_ip}= | 192.168.1.2 -| ${dut2_to_dut1_ip}= | 192.168.2.1 -| ${prefix_length}= | 24 -| ${ip_version}= | ip4 -| ${port}= | 80 -| ${sessions}= | 80 - -*** Test Cases *** -| TC01: DUT sends IPFIX template and data packets -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and a basic classify session. -| | ... | [Ver] Make TG listen for IPFIX template and data packets, verify -| | ... | that packet is received and correct. No packets are sent from TG. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src -| | ... | ${tg_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | count=0 - -| TC02: DUT reports packet flow for traffic by source address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with TG source address. -| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packet. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src -| | ... | ${tg_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} - -| TC03: DUT reports packet flow for traffic with local destination address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with destination -| | ... | address of DUT1. -| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packet. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst -| | ... | ${dut1_to_tg_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} - -| TC04: DUT reports packet flow for traffic with remote destination address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with destination -| | ... | address of DUT2. -| | ... | [Ver] Make TG send a packet to DUT2 through DUT1, then listen -| | ... | for IPFIX template and data packets, verify that IPFIX reported -| | ... | the received packet. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip} -| | ... | ${dut2_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst -| | ... | ${dut2_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut2_to_dut1_ip} - -| TC05: DUT reports packet flow for traffic by source and destination port -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with TG source address -| | ... | and source and destination ports. -| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packet. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} -| | ... | src proto l4 src_port dst_port -| | And VPP configures classify session generic | ${dut1_node} -| | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} -| | ... | l3 ${ip_version} src ${tg_to_dut1_ip} -| | ... | proto 6 l4 src_port ${port} dst_port ${port} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And Setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | port=${port} - -| TC06: DUT reports packet flow with a large number of packets -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with TG source address. -| | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packets. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src -| | ... | ${tg_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | count=20000 | timeout=10 - -| TC07: DUT reports packet flow when multiple sessions are configured -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add several classify sessions with different -| | ... | ports. -| | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching -| | ... | configured sessions, then listen for IPFIX template and data packets, -| | ... | verify that IPFIX reported the received packets for each session. -| | ... | [Ref] RFC 7011 -| | 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 Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} -| | ... | src proto l4 src_port dst_port -| | :FOR | ${index} | IN RANGE | ${sessions} -| | | VPP configures classify session generic | ${dut1_node} -| | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} -| | | ... | l3 ${ip_version} src ${tg_to_dut1_ip} -| | | ... | proto 6 l4 src_port ${index} dst_port ${index} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip} -| | ... | ${dut1_to_tg_ip} -| | ... | mtu=1450 | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | ${sessions} | timeout=10 | count=3 -# TODO: DUT reports packet flow when ACL is configured with wildcards diff --git a/tests/func/telemetry/ipfix_ipv6.robot b/tests/func/telemetry/ipfix_ipv6.robot deleted file mode 100644 index b8310b2a13..0000000000 --- a/tests/func/telemetry/ipfix_ipv6.robot +++ /dev/null @@ -1,274 +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/telemetry/ipfix.robot -| Library | resources.libraries.python.Classify.Classify -| Library | resources.libraries.python.telemetry.IPFIXSetup -| Library | resources.libraries.python.IPv6Setup -| Library | resources.libraries.python.Trace - -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING -# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-204) -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *IPFIX ipv6 test cases* -| ... -| ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with -| ... | one link between the nodes. DUT1 is configured with IPv4 and IPV6 -| ... | routing and static routes. IPFIX is configured on DUT1 with -| ... | DUT1->TG interface as collector.Test packets are -| ... | sent from TG to or through DUT1. TG listens for flow report packets -| ... | and verifies that they contains flow records of test packets sent. - -*** Variables *** -| ${dut1_to_tg_ip}= | 10::10 -| ${dut2_to_dut1_ip}= | 11::10 -| ${tg_to_dut1_ip}= | 12::10 -| ${prefix_length}= | 64 -| ${ip_version}= | ip6 -| ${port}= | 80 -| ${sessions}= | 45 - -# IPv4 addresses used for IPFIX exporter. Export over IPv6 not (yet?) supported. -| ${dut1_to_tg_ip4}= | 192.168.1.1 -| ${tg_to_dut1_ip4}= | 192.168.1.2 - -*** Test Cases *** -| TC01: DUT reports packet flow for traffic by source address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with TG source address. -| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packet. -| | ... | [Ref] RFC 7011 -| | 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_tg} | ${dut1_to_tg_ip4} | ${24} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src -| | ... | ${tg_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} -| | ... | ${dut1_to_tg_ip4} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} - -| TC02: DUT reports packet flow for traffic with local destination address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with destination -| | ... | address of DUT1. -| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packet. -| | ... | [Ref] RFC 7011 -| | 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_tg} | ${dut1_to_tg_ip4} | ${24} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst -| | ... | ${dut1_to_tg_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} -| | ... | ${dut1_to_tg_ip4} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} - -| TC03: DUT reports packet flow for traffic with remote destination address -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with destination -| | ... | address of DUT2. -| | ... | [Ver] Make TG send a packet to DUT2 through DUT1, then listen -| | ... | for IPFIX template and data packets, verify that IPFIX reported -| | ... | the received packet. -| | ... | [Ref] RFC 7011 -| | 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_tg} | ${dut1_to_tg_ip4} | ${24} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip} -| | ... | ${dut2_to_dut1_mac} -| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | dst -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | dst -| | ... | ${dut2_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} -| | ... | ${dut1_to_tg_ip4} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${dut2_to_dut1_ip} - -| TC04: DUT reports packet flow for traffic by source and destination port -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with TG source address -| | ... | and source and destination ports. -| | ... | [Ver] Make TG send a packet to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packet. -| | ... | [Ref] RFC 7011 -| | 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_tg} | ${dut1_to_tg_ip4} | ${24} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} -| | ... | src proto l4 src_port dst_port -| | And VPP configures classify session generic | ${dut1_node} -| | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} -| | ... | l3 ${ip_version} src ${tg_to_dut1_ip} -| | ... | proto 6 l4 src_port ${port} dst_port ${port} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} -| | ... | ${dut1_to_tg_ip4} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | port=${port} - -| TC05: DUT reports packet flow with a large number of packets -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add classify session with TG source address. -| | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template -| | ... | and data packets, verify that IPFIX reported the received packets. -| | ... | [Ref] RFC 7011 -| | 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_tg} | ${dut1_to_tg_ip4} | ${24} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src -| | And VPP configures classify session L3 | ${dut1_node} | permit -| | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src -| | ... | ${tg_to_dut1_ip} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} -| | ... | ${dut1_to_tg_ip4} | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | count=20000 | timeout=10 - -| TC06: DUT reports packet flow when multiple sessions are configured -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface -| | ... | address as collector and add several classify sessions with different -| | ... | ports. -| | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching -| | ... | configured sessions, then listen for IPFIX template and data packets, -| | ... | verify that IPFIX reported the received packets for each session. -| | ... | [Ref] RFC 7011 -| | 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_tg} | ${dut1_to_tg_ip4} | ${24} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4} -| | ... | ${tg_to_dut1_mac} -| | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip} -| | ... | ${tg_to_dut1_mac} -| | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg} -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} -| | ... | src proto l4 src_port dst_port -| | :FOR | ${index} | IN RANGE | ${sessions} -| | | VPP configures classify session generic | ${dut1_node} -| | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n} -| | | ... | l3 ${ip_version} src ${tg_to_dut1_ip} -| | | ... | proto 6 l4 src_port ${index} dst_port ${index} -| | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg} -| | ... | ${table_index} | ip_version=${ip_version} -| | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4} -| | ... | ${dut1_to_tg_ip4} | interval=5 -| | ... | mtu=1450 | interval=5 -| | And Set IPFIX stream | ${dut1_node} | ${1} -| | And Assign classify table to exporter | ${dut1_node} | ${table_index} -| | ... | ${ip_version} -| | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node} -| | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip} -| | ... | ${sessions} | timeout=10 | count=3 - -# TODO: DUT reports packet flow when ACL is configured with wildcards diff --git a/tests/func/telemetry/span.robot b/tests/func/telemetry/span.robot deleted file mode 100644 index 8a7af5f0d1..0000000000 --- a/tests/func/telemetry/span.robot +++ /dev/null @@ -1,103 +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/testing_path.robot -| Resource | resources/libraries/robot/telemetry/span.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPv4Util -| Library | resources.libraries.python.IPv4Setup -| Library | resources.libraries.python.telemetry.SPAN -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | EXPECTED_FAILING -# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-185) -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *SPAN test suite* -| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two -| ... | links between nodes. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with SPAN mirroring from -| ... | the first DUT1-TG interface to the second one. -| ... | *[Ver] TG verification:* Test ARP or ICMP packets are sent by TG -| ... | on first link to DUT1; On receipt through second link TG verifies -| ... | the copy of packet sent and the copy of DUT's reply packet. -| ... | *[Ref] Applicable standard specifications: None?* - -*** Variables *** -| ${tg_to_dut_if1_ip4}= | 192.168.1.1 -| ${dut_to_tg_if1_ip4}= | 192.168.1.2 -| ${tg_to_dut_if1_ip6}= | 11::1 -| ${dut_to_tg_if1_ip6}= | 10::1 -| ${prefix}= | 24 - -*** Test Cases *** -| TC01: DUT mirrors L2 packets from one interface to another -| | [Documentation] -| | ... | [Top] TG=DUT1 -| | ... | [Cfg] On DUT1 configure IPv4 address and set SPAN mirroring\ -| | ... | from one DUT interface to the other. -| | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\ -| | ... | then receive a copy of sent packet and of DUT's ARP reply\ -| | ... | on the second interface. -| | 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_if1} -| | ... | ${dut_to_tg_if1_ip4} | ${prefix} -| | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} -| | Then Send Packet And Check Received Copies | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2} -| | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ARP - -| TC02: DUT mirrors IPv4 packets from one interface to another -| | [Documentation] -| | ... | [Top] TG=DUT1 -| | ... | [Cfg] On DUT1 configure IPv4 address, add ARP entry for one TG \ -| | ... | interface and set SPAN mirroring from one DUT interface to the other. -| | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\ -| | ... | then receive a copy of sent packet and of DUT's ICMP reply\ -| | ... | on the other interface. -| | 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_if1} -| | ... | ${dut_to_tg_if1_ip4} | ${prefix} -| | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip4} -| | ... | ${tg_to_dut_if1_mac} -| | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} -| | Then Send Packet And Check Received Copies | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2} -| | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ICMP - -| TC03: DUT mirrors IPv6 packets from one interface to another -| | [Documentation] -| | ... | [Top] TG=DUT1 -| | ... | [Cfg] On DUT1 configure IPv6 address, add ARP entry for one TG \ -| | ... | interface and set SPAN mirroring from one DUT interface to the other. -| | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\ -| | ... | then receive a copy of sent packet and of DUT's ICMP reply\ -| | ... | on the other interface. -| | 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_if1} -| | ... | ${dut_to_tg_if1_ip6} | ${prefix} -| | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip6} -| | ... | ${tg_to_dut_if1_mac} -| | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} -| | Then Send Packet And Check Received Copies | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2} -| | ... | ${tg_to_dut_if1_ip6} | ${dut_to_tg_if1_ip6} | ICMP diff --git a/tests/func/telemetry/span/eth2p-ethip4-ip4base-spanrx-func.robot b/tests/func/telemetry/span/eth2p-ethip4-ip4base-spanrx-func.robot new file mode 100644 index 0000000000..62f76d847d --- /dev/null +++ b/tests/func/telemetry/span/eth2p-ethip4-ip4base-spanrx-func.robot @@ -0,0 +1,80 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/telemetry/span.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPv4Util +| Library | resources.libraries.python.IPv4Setup +| Library | resources.libraries.python.telemetry.SPAN +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | EXPECTED_FAILING +# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-185) +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *SPAN test suite* +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two +| ... | links between nodes. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with SPAN mirroring from +| ... | the first DUT1-TG interface to the second one. +| ... | *[Ver] TG verification:* Test ARP or ICMP packets are sent by TG +| ... | on first link to DUT1; On receipt through second link TG verifies +| ... | the copy of packet sent and the copy of DUT's reply packet. +| ... | *[Ref] Applicable standard specifications: None?* + +*** Variables *** +| ${tg_to_dut_if1_ip4}= | 192.168.1.1 +| ${dut_to_tg_if1_ip4}= | 192.168.1.2 +| ${prefix}= | 24 + +*** Test Cases *** +| TC01: DUT mirrors L2 packets from one interface to another +| | [Documentation] +| | ... | [Top] TG=DUT1 +| | ... | [Cfg] On DUT1 configure IPv4 address and set SPAN mirroring\ +| | ... | from one DUT interface to the other. +| | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\ +| | ... | then receive a copy of sent packet and of DUT's ARP reply\ +| | ... | on the second interface. +| | 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_if1} +| | ... | ${dut_to_tg_if1_ip4} | ${prefix} +| | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} +| | Then Send Packet And Check Received Copies | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2} +| | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ARP + +| TC02: DUT mirrors IPv4 packets from one interface to another +| | [Documentation] +| | ... | [Top] TG=DUT1 +| | ... | [Cfg] On DUT1 configure IPv4 address, add ARP entry for one TG \ +| | ... | interface and set SPAN mirroring from one DUT interface to the other. +| | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\ +| | ... | then receive a copy of sent packet and of DUT's ICMP reply\ +| | ... | on the other interface. +| | 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_if1} +| | ... | ${dut_to_tg_if1_ip4} | ${prefix} +| | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip4} +| | ... | ${tg_to_dut_if1_mac} +| | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} +| | Then Send Packet And Check Received Copies | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2} +| | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ICMP diff --git a/tests/func/telemetry/span/eth2p-ethip6-ip6base-spanrx-func.robot b/tests/func/telemetry/span/eth2p-ethip6-ip6base-spanrx-func.robot new file mode 100644 index 0000000000..5fa7d0c5e4 --- /dev/null +++ b/tests/func/telemetry/span/eth2p-ethip6-ip6base-spanrx-func.robot @@ -0,0 +1,61 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/telemetry/span.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPv4Util +| Library | resources.libraries.python.IPv4Setup +| Library | resources.libraries.python.telemetry.SPAN +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | EXPECTED_FAILING +# TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-185) +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *SPAN test suite* +| ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two +| ... | links between nodes. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with SPAN mirroring from +| ... | the first DUT1-TG interface to the second one. +| ... | *[Ver] TG verification:* Test ARP or ICMP packets are sent by TG +| ... | on first link to DUT1; On receipt through second link TG verifies +| ... | the copy of packet sent and the copy of DUT's reply packet. +| ... | *[Ref] Applicable standard specifications: None?* + +*** Variables *** +| ${tg_to_dut_if1_ip6}= | 11::1 +| ${dut_to_tg_if1_ip6}= | 10::1 +| ${prefix}= | 24 + +*** Test Cases *** +| TC01: DUT mirrors IPv6 packets from one interface to another +| | [Documentation] +| | ... | [Top] TG=DUT1 +| | ... | [Cfg] On DUT1 configure IPv6 address, add ARP entry for one TG \ +| | ... | interface and set SPAN mirroring from one DUT interface to the other. +| | ... | [Ver] Make TG send an ICMP packet to DUT through one interface,\ +| | ... | then receive a copy of sent packet and of DUT's ICMP reply\ +| | ... | on the other interface. +| | 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_if1} +| | ... | ${dut_to_tg_if1_ip6} | ${prefix} +| | And Add ARP on DUT | ${dut_node} | ${dut_to_tg_if1} | ${tg_to_dut_if1_ip6} +| | ... | ${tg_to_dut_if1_mac} +| | And Set SPAN Mirroring | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} +| | Then Send Packet And Check Received Copies | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${dut_to_tg__if1_mac} | ${tg_to_dut_if2} +| | ... | ${tg_to_dut_if1_ip6} | ${dut_to_tg_if1_ip6} | ICMP diff --git a/tests/func/vlan/eth2p-dot1ad--dot1q-l2bdbasemaclrn-vlantrans21-func.robot b/tests/func/vlan/eth2p-dot1ad--dot1q-l2bdbasemaclrn-vlantrans21-func.robot new file mode 100644 index 0000000000..73836c38f0 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1ad--dot1q-l2bdbasemaclrn-vlantrans21-func.robot @@ -0,0 +1,221 @@ +# 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/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with VLAN tag rewrite test cases - transalte-2-1* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 or +| ... | Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, Eth-dot1q-IPv4-ICMPv4 or +| ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv4-ICMPv4 or Eth-IPv6-ICMPv6 +| ... | on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD) +| ... | switching combined with MAC learning enabled and added VLAN +| ... | sub-interface with VLAN tag rewrite translate-2-1 method of interface +| ... | towards TG and interface towards DUT2. DUT2 is configured with L2 +| ... | bridge domain (L2BD) switching between VLAN sub-interface with VLAN tag +| ... | rewrite pop-1 method of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${bd_id1}= | 1 + +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 + +| ${src_ip6}= | 3ffe:63::1 +| ${dst_ip6}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method; on DUT2 configure L2 bridge domain (L2BD) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC02: DUT1 and DUT2 with L2BD and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method to set tag different from tag set on VLAN +| | ... | sub-interface of DUT2; on DUT2 configure L2 bridge domain (L2BD) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + + +| TC03: DUT1 and DUT2 with L2BD and VLAN translate-2-1 (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method; on DUT2 configure L2 bridge domain (L2BD) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip6} +| | ... | dst_ip=${dst_ip6} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC04: DUT1 and DUT2 with L2BD and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method to set tag different from tag set on VLAN +| | ... | sub-interface of DUT2; on DUT2 configure L2 bridge domain (L2BD) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1ad--dot1q-l2xcbase-vlantrans21-func.robot b/tests/func/vlan/eth2p-dot1ad--dot1q-l2xcbase-vlantrans21-func.robot new file mode 100644 index 0000000000..0e2749c5c9 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1ad--dot1q-l2xcbase-vlantrans21-func.robot @@ -0,0 +1,189 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2XC with VLAN tag rewrite test cases - translate-2-1* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 or +| ... | Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, Eth-dot1q-IPv4-ICMPv4 or +| ... | Eth-dot1aq-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2 +| ... | for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect +| ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite +| ... | translate-2-1 method of interface towards TG and interface towards DUT2. +| ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching +| ... | between VLAN sub-interface with VLAN tag rewrite pop-1 method +| ... | of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 + +| ${src_ip}= | 3ffe:63::1 +| ${dst_ip}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method; on DUT2 configure L2 cross-connect (L2XC) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC02: DUT1 and DUT2 with L2XC and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method to set tag different from tag set on VLAN +| | ... | sub-interface of DUT2; on DUT2 configure L2 cross-connect (L2XC) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC03: DUT1 and DUT2 with L2XC and VLAN translate-2-1 (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method; on DUT2 configure L2 cross-connect (L2XC) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagegd with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} +| | ... | dst_ip=${dst_ip} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC04: DUT1 and DUT2 with L2XC and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite +| | ... | translate-2-1 method to set tag different from tag set on VLAN +| | ... | sub-interface of DUT2; on DUT2 configure L2 cross-connect (L2XC) with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagegd with Dot1ad tags from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1ad-l2bdbasemaclrn-vlantrans22-func.robot b/tests/func/vlan/eth2p-dot1ad-l2bdbasemaclrn-vlantrans22-func.robot new file mode 100644 index 0000000000..4efa90d419 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1ad-l2bdbasemaclrn-vlantrans22-func.robot @@ -0,0 +1,405 @@ +# 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/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with VLAN tag rewrite test cases - translate-2-2* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 or +| ... | Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4 or +| ... | Eth-IPv6-ICMPv6 on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD) +| ... | switching combined with MAC learning enabled and added VLAN +| ... | sub-interface with VLAN tag rewrite translate-2-2 method of interface +| ... | towards TG and interface towards DUT2. DUT2 is configured with L2 +| ... | bridge domain (L2BD) switching between VLAN sub-interface with VLAN tag +| ... | rewrite pop-2 method of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${bd_id1}= | 1 + +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 +| ${inner_vlan_id2}= | 220 +| ${inner_vlan_wrong}= | 250 + +| ${src_ip6}= | 3ffe:63::1 +| ${dst_ip6}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VLAN translate-2-2 switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG and +| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-2 +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC02: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-2 tagged with Dot1ad tags from one of its interfaces to another +| | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC03: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-2 tagged with Dot1ad tags from one of its interfaces to another +| | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC04: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG +| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-2 +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC05: DUT1 and DUT2 with L2BD and VLAN translate-2-2 switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG and +| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip6} +| | ... | dst_ip=${dst_ip6} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC06: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another +| | ... | one method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC07: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another +| | ... | one method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC08: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG +| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1ad-l2xcbase-func.robot b/tests/func/vlan/eth2p-dot1ad-l2xcbase-func.robot new file mode 100644 index 0000000000..617447666a --- /dev/null +++ b/tests/func/vlan/eth2p-dot1ad-l2xcbase-func.robot @@ -0,0 +1,69 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| 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 with QinQ test cases* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology with +| ... | single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, +| ... | Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | cross-connect (L2XC) switching with 802.1ad QinQ VLAN tag push and pop. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr and +| ... | MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1ad. + +*** Variables *** +| ${subid}= | 10 +| ${outer_vlan_id}= | 100 +| ${inner_vlan_id}= | 200 +| ${type_subif}= | two_tags +| ${tag_rewrite_method}= | pop-2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and two VLAN push-pop switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure L2 cross-connect (L2XC), each with one interface to TG +| | ... | and one Ethernet interface towards the other DUT; each DUT +| | ... | pushes two VLAN tags on packets received from local TG, and +| | ... | popping two VLAN tags on packets transmitted to local TG. [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] IEEE 802.1ad. +| | 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 VLAN subinterfaces initialized on 3-node topology +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif} +| | And L2 tag rewrite method setup on interfaces +| | ... | ${dut1_node} | ${subif_index_1} | ${dut2_node} | ${subif_index_2} +| | ... | ${tag_rewrite_method} +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subif_index_1} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${subif_index_2} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vlan/eth2p-dot1ad-l2xcbase-vlantrans22-func.robot b/tests/func/vlan/eth2p-dot1ad-l2xcbase-vlantrans22-func.robot new file mode 100644 index 0000000000..49368ea003 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1ad-l2xcbase-vlantrans22-func.robot @@ -0,0 +1,346 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2XC with VLAN tag rewrite test cases - translate-2-2* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 or +| ... | Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4 or +| ... | Eth-IPv6-ICMPv6 on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect +| ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite +| ... | translate-2-2 method of interface towards TG and interface towards DUT2. +| ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching +| ... | between VLAN sub-interface with VLAN tag rewrite pop-2 method +| ... | of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 +| ${inner_vlan_id2}= | 220 +| ${inner_vlan_wrong}= | 250 + +| ${src_ip}= | 3ffe:63::1 +| ${dst_ip}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and VLAN translate-2-2 switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG and +| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC02: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC03: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another +| | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC04: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG +| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | tagged with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC05: DUT1 and DUT2 with L2XC and VLAN translate-2-2 switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG and +| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | tagegd with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} +| | ... | dst_ip=${dst_ip} | encaps=Dot1ad | vlan1=${outer_vlan_id1} +| | ... | vlan2=${inner_vlan_id1} + +| TC06: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-1 tagegd with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC07: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of +| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to +| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite +| | ... | pop-1 tagegd with Dot1ad tags from one of its interfaces to another +| | ... | one method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} + +| TC08: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad +| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to +| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG +| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | tagegd with Dot1ad tags from one of its interfaces to another one +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad +| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1q--dot1ad-l2bdbasemaclrn-vlantrans12-func.robot b/tests/func/vlan/eth2p-dot1q--dot1ad-l2bdbasemaclrn-vlantrans12-func.robot new file mode 100644 index 0000000000..3867baa5b4 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1q--dot1ad-l2bdbasemaclrn-vlantrans12-func.robot @@ -0,0 +1,394 @@ +# 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/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with VLAN tag rewrite test cases - translate-1-2* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or +| ... | Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, Eth-dot1ad-IPv4-ICMPv4 or +| ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv4-ICMPv4 or Eth-IPv6-ICMPv6 +| ... | on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD) +| ... | switching combined with MAC learning enabled and added VLAN +| ... | sub-interface with VLAN tag rewrite translate-1-2 method of interface +| ... | towards TG and interface towards DUT2. DUT2 is configured with L2 +| ... | bridge domain (L2BD) switching between VLAN sub-interface with VLAN tag +| ... | rewrite pop-2 method of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${bd_id1}= | 1 + +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 +| ${inner_vlan_id2}= | 220 +| ${inner_vlan_wrong}= | 250 + +| ${src_ip6}= | 3ffe:63::1 +| ${dst_ip6}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id1} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC02: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set inner tag different from inner tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC03: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer tag different from outer tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id1} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC04: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer and inner tags different from tags +| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 +| | ... | bridge domain with one interface to TG and one Dot1ad sub-interface +| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send +| | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces +| | ... | to another one via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC05: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip6} +| | ... | dst_ip=${dst_ip6} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC06: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set inner tag different from inner tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC07: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer tag different from outer tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC08: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer and inner tags different from tags +| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 +| | ... | bridge domain with one interface to TG and one Dot1ad sub-interface +| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send +| | ... | ICMPv6 Echo Req tagged with one Dot1q tag from one of its interfaces +| | ... | to another one via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1q--dot1ad-l2xcbase-vlantrans12-func.robot b/tests/func/vlan/eth2p-dot1q--dot1ad-l2xcbase-vlantrans12-func.robot new file mode 100644 index 0000000000..98f43799c0 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1q--dot1ad-l2xcbase-vlantrans12-func.robot @@ -0,0 +1,335 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2XC with VLAN tag rewrite test cases - translate-1-2* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or +| ... | Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, Eth-dot1ad-IPv4-ICMPv4 or +| ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv4-ICMPv4 or Eth-IPv6-ICMPv6 +| ... | on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect +| ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite +| ... | translate-1-2 method of interface towards TG and interface towards DUT2. +| ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching +| ... | between VLAN sub-interface with VLAN tag rewrite pop-2 method +| ... | of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 +| ${inner_vlan_id2}= | 220 +| ${inner_vlan_wrong}= | 250 + +| ${src_ip}= | 3ffe:63::1 +| ${dst_ip}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id1} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC02: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set inner tag different from inner tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer tag different from outer tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req +| | ... | tagged with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id1} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer and inner tags different from tags +| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 +| | ... | cross-connect with one interface to TG and one Dot1ad sub-interface +| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send +| | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces +| | ... | to another one via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC05: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagegd with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} +| | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC06: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set inner tag different from inner tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagegd with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC07: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer tag different from outer tag set on +| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with +| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with +| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req +| | ... | tagegd with one Dot1q tag from one of its interfaces to another one +| | ... | via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC08: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ +| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. +| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to +| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | translate-1-2 method to set outer and inner tags different from tags +| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 +| | ... | cross-connect with one interface to TG and one Dot1ad sub-interface +| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send +| | ... | ICMPv6 Echo Req tagegd with one Dot1q tag from one of its interfaces +| | ... | to another one via DUT1 and DUT2; verify that packet is not received. +| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} +| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} +| | ... | type_subif=two_tags dot1ad +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} +| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-2 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1q-l2bdbasemaclrn-vlantrans11-func.robot b/tests/func/vlan/eth2p-dot1q-l2bdbasemaclrn-vlantrans11-func.robot new file mode 100644 index 0000000000..a0c245e51d --- /dev/null +++ b/tests/func/vlan/eth2p-dot1q-l2bdbasemaclrn-vlantrans11-func.robot @@ -0,0 +1,206 @@ +# 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/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with VLAN tag rewrite test cases - translate-1-1* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or +| ... | Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4 or +| ... | Eth-IPv6-ICMPv6 on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD) +| ... | switching combined with MAC learning enabled and added VLAN +| ... | sub-interface with VLAN tag rewrite translate-1-1 method of interface +| ... | towards TG and interface towards DUT2. DUT2 is configured with L2 +| ... | bridge domain (L2BD) switching between VLAN sub-interface with VLAN tag +| ... | rewrite pop-1 method of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${bd_id1}= | 1 + +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${inner_vlan_id1}= | 210 +| ${inner_vlan_wrong}= | 250 + +| ${src_ip6}= | 3ffe:63::1 +| ${dst_ip6}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VLAN translate-1-1 (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1q +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC02: DUT1 and DUT2 with L2BD and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method +| | ... | to set tag different from tag set on VLAN sub-interface of DUT2; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1q +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC03: DUT1 and DUT2 with L2BD and VLAN translate-1-1 (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagged with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1q +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip6} +| | ... | dst_ip=${dst_ip6} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC04: DUT1 and DUT2 with L2BD and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method +| | ... | to set tag different from tag set on VLAN sub-interface of DUT2; +| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagged with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1q +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} +| | ... | ${bd_id1} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} +| | ... | ${bd_id1} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} diff --git a/tests/func/vlan/eth2p-dot1q-l2xcbase-vlantrans11-func.robot b/tests/func/vlan/eth2p-dot1q-l2xcbase-vlantrans11-func.robot new file mode 100644 index 0000000000..91869ba073 --- /dev/null +++ b/tests/func/vlan/eth2p-dot1q-l2xcbase-vlantrans11-func.robot @@ -0,0 +1,171 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/tagging.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2XC with VLAN tag rewrite test cases - translate-1-1* +| ... +| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or +| ... | Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4 or +| ... | Eth-IPv4-ICMPv4 on TG-DUT2 for L2 switching of IPv4/IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect +| ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite +| ... | translate-1-1 method of interface towards TG and interface towards DUT2. +| ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching +| ... | between VLAN sub-interface with VLAN tag rewrite pop-1 method +| ... | of interface towards DUT1 and interface towards TG. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; +| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, +| ... | dst-addr and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. + +*** Variables *** +| ${subid}= | 10 + +| ${outer_vlan_id1}= | 110 +| ${outer_vlan_id2}= | 120 +| ${outer_vlan_wrong}= | 150 + +| ${src_ip}= | 3ffe:63::1 +| ${dst_ip}= | 3ffe:63::2 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and VLAN translate-1-1 (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1q +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} + +| TC02: DUT1 and DUT2 with L2XC and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one VLAN tagged sub-interface to DUT2 and +| | ... | one VLAN sub-interface towards TG with VLAN tag rewrite +| | ... | (translate-1-1) on sub-interface to DUT2; on DUT2 configure L2XC with +| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with VLAN +| | ... | tag pop-1. [Ver] Make TG send ICMPv4 Echo Req tagged with one dot1q +| | ... | tag from one of its interfaces to another one via DUT1 and DUT2; +| | ... | verify that packet is not received. [Ref] IEEE 802.1q +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-1 (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagegd with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is received. [Ref] IEEE 802.1q +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Send and receive ICMP Packet +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} +| | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1} + +| TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ +| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 +| | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN +| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method +| | ... | to set tag different from tag set on VLAN sub-interface of DUT2; +| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG +| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 +| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagegd with one Dot1q tag +| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify +| | ... | that packet is not received. [Ref] IEEE 802.1q +| | [Tags] | SKIP_PATCH +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created +| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} +| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created +| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} +| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} +| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} +| | ... | ${vlan2_index} | pop-1 +| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect +| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} +| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} +| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q +| | ... | vlan1=${outer_vlan_id1} diff --git a/tests/func/vlan/qinq_l2_xconnect.robot b/tests/func/vlan/qinq_l2_xconnect.robot deleted file mode 100644 index 617447666a..0000000000 --- a/tests/func/vlan/qinq_l2_xconnect.robot +++ /dev/null @@ -1,69 +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/testing_path.robot -| Resource | resources/libraries/robot/tagging.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| 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 with QinQ test cases* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology with -| ... | single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, -| ... | Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | cross-connect (L2XC) switching with 802.1ad QinQ VLAN tag push and pop. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are -| ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG -| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr and -| ... | MAC addresses. -| ... | *[Ref] Applicable standard specifications:* IEEE 802.1ad. - -*** Variables *** -| ${subid}= | 10 -| ${outer_vlan_id}= | 100 -| ${inner_vlan_id}= | 200 -| ${type_subif}= | two_tags -| ${tag_rewrite_method}= | pop-2 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2XC and two VLAN push-pop switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on \ -| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 -| | ... | configure L2 cross-connect (L2XC), each with one interface to TG -| | ... | and one Ethernet interface towards the other DUT; each DUT -| | ... | pushes two VLAN tags on packets received from local TG, and -| | ... | popping two VLAN tags on packets transmitted to local TG. [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] IEEE 802.1ad. -| | 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 VLAN subinterfaces initialized on 3-node topology -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif} -| | And L2 tag rewrite method setup on interfaces -| | ... | ${dut1_node} | ${subif_index_1} | ${dut2_node} | ${subif_index_2} -| | ... | ${tag_rewrite_method} -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subif_index_1} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${subif_index_2} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv4.robot b/tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv4.robot deleted file mode 100644 index ebde7bf1c1..0000000000 --- a/tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv4.robot +++ /dev/null @@ -1,550 +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/tagging.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge domain with VLAN tag rewrite test cases - IPv4* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or -| ... | Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4 -| ... | on TG-DUT2 for L2 switching of IPv4. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD) -| ... | switching combined with MAC learning enabled and added VLAN -| ... | sub-interface with VLAN tag rewrite translate-1-1 method -| ... | of interface towards TG and interface towards DUT2. DUT2 is configured -| ... | with L2 bridge domain (L2BD) switching between VLAN sub-interface -| ... | with VLAN tag rewrite pop-1 method of interface towards DUT1 and -| ... | interface towards TG. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are -| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; -| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. - -*** Variables *** -| ${bd_id1}= | 1 - -| ${subid}= | 10 - -| ${outer_vlan_id1}= | 110 -| ${outer_vlan_id2}= | 120 -| ${outer_vlan_wrong}= | 150 - -| ${inner_vlan_id1}= | 210 -| ${inner_vlan_id2}= | 220 -| ${inner_vlan_wrong}= | 250 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2BD and VLAN translate-1-1 (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1q -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC02: DUT1 and DUT2 with L2BD and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method -| | ... | to set tag different from tag set on VLAN sub-interface of DUT2; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1q -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC03: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC04: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set inner tag different from inner tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC05: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer tag different from outer tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC06: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer and inner tags different from tags -| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 -| | ... | bridge domain with one interface to TG and one Dot1ad sub-interface -| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send -| | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces -| | ... | to another one via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC07: DUT1 and DUT2 with L2BD and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method; on DUT2 configure L2 bridge domain (L2BD) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC08: DUT1 and DUT2 with L2BD and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method to set tag different from tag set on VLAN -| | ... | sub-interface of DUT2; on DUT2 configure L2 bridge domain (L2BD) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC09: DUT1 and DUT2 with L2BD and VLAN translate-2-2 switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG and -| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC10: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another -| | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC11: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another -| | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC12: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG -| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv6.robot b/tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv6.robot deleted file mode 100644 index 6e3c76c3b0..0000000000 --- a/tests/func/vlan/vlan_tag_translate_l2_bridge_domain_ipv6.robot +++ /dev/null @@ -1,559 +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/tagging.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *L2 bridge domain with VLAN tag rewrite test cases - IPv6* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv6-ICMPv6 or -| ... | Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and DUT1-DUT2, Eth-IPv6-ICMPv6 -| ... | on TG-DUT2 for L2 switching of IPv6. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD) -| ... | switching combined with MAC learning enabled and added VLAN -| ... | sub-interface with VLAN tag rewrite translate-1-1 method -| ... | of interface towards TG and interface towards DUT2. DUT2 is configured -| ... | with L2 bridge domain (L2BD) switching between VLAN sub-interface -| ... | with VLAN tag rewrite pop-1 method of interface towards DUT1 and -| ... | interface towards TG. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are -| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; -| ... | on receive TG verifies packets for correctness and their IPv6 src-addr, -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. - -*** Variables *** -| ${bd_id1}= | 1 - -| ${subid}= | 10 - -| ${outer_vlan_id1}= | 110 -| ${outer_vlan_id2}= | 120 -| ${outer_vlan_wrong}= | 150 - -| ${inner_vlan_id1}= | 210 -| ${inner_vlan_id2}= | 220 -| ${inner_vlan_wrong}= | 250 - -| ${src_ip}= | 3ffe:63::1 -| ${dst_ip}= | 3ffe:63::2 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2BD and VLAN translate-1-1 (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagged with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1q -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC02: DUT1 and DUT2 with L2BD and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method -| | ... | to set tag different from tag set on VLAN sub-interface of DUT2; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagged with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1q -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC03: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC04: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set inner tag different from inner tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC05: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer tag different from outer tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC06: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer and inner tags different from tags -| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 -| | ... | bridge domain with one interface to TG and one Dot1ad sub-interface -| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send -| | ... | ICMPv6 Echo Req tagged with one Dot1q tag from one of its interfaces -| | ... | to another one via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC07: DUT1 and DUT2 with L2BD and VLAN translate-2-1 (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method; on DUT2 configure L2 bridge domain (L2BD) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC08: DUT1 and DUT2 with L2BD and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method to set tag different from tag set on VLAN -| | ... | sub-interface of DUT2; on DUT2 configure L2 bridge domain (L2BD) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC09: DUT1 and DUT2 with L2BD and VLAN translate-2-2 switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG and -| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC10: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another -| | ... | one method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC11: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another -| | ... | one method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC12: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; -| | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG -| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index} -| | ... | ${bd_id1} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index} -| | ... | ${bd_id1} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv4.robot b/tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv4.robot deleted file mode 100644 index bfca6d8f4a..0000000000 --- a/tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv4.robot +++ /dev/null @@ -1,459 +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/testing_path.robot -| Resource | resources/libraries/robot/tagging.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| 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 with VLAN tag rewrite test cases - IPv4* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or -| ... | Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4 -| ... | on TG-DUT2 for L2 switching of IPv4. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect -| ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite -| ... | translate-1-1 method of interface towards TG and interface towards DUT2. -| ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching -| ... | between VLAN sub-interface with VLAN tag rewrite pop-1 method -| ... | of interface towards DUT1 and interface towards TG. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are -| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; -| ... | on receive TG verifies packets for correctness and their IPv4 src-addr, -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. - -*** Variables *** -| ${subid}= | 10 -| ${outer_vlan_id1}= | 110 -| ${outer_vlan_id2}= | 120 -| ${outer_vlan_wrong}= | 150 -| ${inner_vlan_id1}= | 210 -| ${inner_vlan_id2}= | 220 -| ${inner_vlan_wrong}= | 250 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2XC and VLAN translate-1-1 (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1q -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC02: DUT1 and DUT2 with L2XC and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one VLAN tagged sub-interface to DUT2 and -| | ... | one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | (translate-1-1) on sub-interface to DUT2; on DUT2 configure L2XC with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with VLAN -| | ... | tag pop-1. [Ver] Make TG send ICMPv4 Echo Req tagged with one dot1q -| | ... | tag from one of its interfaces to another one via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1q -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set inner tag different from inner tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC05: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer tag different from outer tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC06: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer and inner tags different from tags -| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 -| | ... | cross-connect with one interface to TG and one Dot1ad sub-interface -| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send -| | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces -| | ... | to another one via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC07: DUT1 and DUT2 with L2XC and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method; on DUT2 configure L2 cross-connect (L2XC) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC08: DUT1 and DUT2 with L2XC and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method to set tag different from tag set on VLAN -| | ... | sub-interface of DUT2; on DUT2 configure L2 cross-connect (L2XC) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC09: DUT1 and DUT2 with L2XC and VLAN translate-2-2 switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG and -| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC10: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC11: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another -| | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC12: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv4 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG -| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagged with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} diff --git a/tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv6.robot b/tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv6.robot deleted file mode 100644 index 7f61443349..0000000000 --- a/tests/func/vlan/vlan_tag_translate_l2_xconnect_ipv6.robot +++ /dev/null @@ -1,471 +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/testing_path.robot -| Resource | resources/libraries/robot/tagging.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| 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 with VLAN tag rewrite test cases - IPv6* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv6-ICMPv6 or -| ... | Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and DUT1-DUT2, Eth-IPv6-ICMPv6 -| ... | on TG-DUT2 for L2 switching of IPv6. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect -| ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite -| ... | translate-1-1 method of interface towards TG and interface towards DUT2. -| ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching -| ... | between VLAN sub-interface with VLAN tag rewrite pop-1 method -| ... | of interface towards DUT1 and interface towards TG. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are -| ... | sent from TG on link to DUT1 and received in TG on link form DUT2; -| ... | on receive TG verifies packets for correctness and their IPv6 src-addr, -| ... | dst-addr and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad. - -*** Variables *** -| ${subid}= | 10 - -| ${outer_vlan_id1}= | 110 -| ${outer_vlan_id2}= | 120 -| ${outer_vlan_wrong}= | 150 - -| ${inner_vlan_id1}= | 210 -| ${inner_vlan_id2}= | 220 -| ${inner_vlan_wrong}= | 250 - -| ${src_ip}= | 3ffe:63::1 -| ${dst_ip}= | 3ffe:63::2 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2XC and VLAN translate-1-1 (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagegd with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1q -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC02: DUT1 and DUT2 with L2XC and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN -| | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method -| | ... | to set tag different from tag set on VLAN sub-interface of DUT2; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG -| | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req tagegd with one Dot1q tag -| | ... | from one of its interfaces to another one via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1q -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagegd with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1} - -| TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set inner tag different from inner tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagegd with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC05: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer tag different from outer tag set on -| | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with -| | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagegd with one Dot1q tag from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC06: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite -| | ... | translate-1-2 method to set outer and inner tags different from tags -| | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2 -| | ... | cross-connect with one interface to TG and one Dot1ad sub-interface -| | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send -| | ... | ICMPv6 Echo Req tagegd with one Dot1q tag from one of its interfaces -| | ... | to another one via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1} -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q -| | ... | vlan1=${outer_vlan_id1} - -| TC07: DUT1 and DUT2 with L2XC and VLAN translate-2-1 (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method; on DUT2 configure L2 cross-connect (L2XC) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagegd with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC08: DUT1 and DUT2 with L2XC and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1, \ -| | ... | Eth-dot1q-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. -| | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to -| | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite -| | ... | translate-2-1 method to set tag different from tag set on VLAN -| | ... | sub-interface of DUT2; on DUT2 configure L2 cross-connect (L2XC) with -| | ... | one interface to TG and one VLAN sub-interface towards DUT1 with -| | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv6 Echo Req -| | ... | tagegd with Dot1ad tags from one of its interfaces to another one -| | ... | via DUT1 and DUT2; verify that packet is not received. -| | ... | [Ref] IEEE 802.1q, IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-1 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC09: DUT1 and DUT2 with L2XC and VLAN translate-2-2 switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG and -| | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagegd with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is received. [Ref] IEEE 802.1ad -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Send and receive ICMP Packet -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip} -| | ... | dst_ip=${dst_ip} | encaps=Dot1ad | vlan1=${outer_vlan_id1} -| | ... | vlan2=${inner_vlan_id1} - -| TC10: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set inner tag different from inner tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagegd with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC11: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set outer tag different from outer tag set on Dot1ad sub-interface of -| | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to -| | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite -| | ... | pop-1 tagegd with Dot1ad tags from one of its interfaces to another -| | ... | one method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; -| | ... | verify that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} - -| TC12: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv6 between two TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv6-ICMPv6 on TG-DUT1 and \ -| | ... | on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2. [Cfg] On DUT1 configure L2 -| | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad -| | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to -| | ... | set tags different from tags set on Dot1ad sub-interface of DUT2; -| | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG -| | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1 -| | ... | tagegd with Dot1ad tags from one of its interfaces to another one -| | ... | method. [Ver] Make TG send ICMPv6 Echo Req via DUT1 and DUT2; verify -| | ... | that packet is not received. [Ref] IEEE 802.1ad -| | [Tags] | SKIP_PATCH -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created -| | ... | ${dut1_node} | ${dut1_to_tg} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1} -| | ... | type_subif=two_tags dot1ad -| | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid} -| | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2} -| | ... | type_subif=two_tags dot1ad -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node} -| | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False} -| | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong} -| | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node} -| | ... | ${vlan2_index} | pop-2 -| | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index} -| | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index} -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1} -| | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1ad -| | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1} diff --git a/tests/func/vrf/eth2p-ethip4-ip4basevrf-func.robot b/tests/func/vrf/eth2p-ethip4-ip4basevrf-func.robot new file mode 100644 index 0000000000..7a76a1805c --- /dev/null +++ b/tests/func/vrf/eth2p-ethip4-ip4basevrf-func.robot @@ -0,0 +1,391 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Vpn routed forwarding - baseline IPv4* +| ... | *[Top] Network Topologies:* TG=DUT1=DUT2=TG 3-node topology with two +| ... | links in between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of +| ... | IPv4. +| ... | *[Cfg] DUT configuration:* Each DUT is configured with two VRF tables; +| ... | Separation of traffic is tested by IP packets; Basic ARP and ROUTES are +| ... | set on DUT nodes; IP addresses are set on DUT interfaces. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets +| ... | are sent by TG on link to DUT1, DUT2 or back to TG; On receipt TG +| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr, +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${fib_table_1}= | 9 +| ${fib_table_2}= | 99 + +| ${dut1_to_tg_ip1}= | 10.0.0.3 +| ${dut1_to_tg_ip2}= | 10.0.0.4 +| ${dut2_to_tg_ip1}= | 30.0.0.3 +| ${dut2_to_tg_ip2}= | 30.0.0.4 + +| ${dut1_to_dut2_ip1}= | 20.0.0.1 +| ${dut1_to_dut2_ip2}= | 20.0.0.2 +| ${dut2_to_dut1_ip1}= | 20.0.0.3 +| ${dut2_to_dut1_ip2}= | 20.0.0.4 + +| ${tg_dut1_ip1}= | 10.0.0.1 +| ${tg_dut1_ip2}= | 10.0.0.2 +| ${tg_dut2_ip1}= | 30.0.0.1 +| ${tg_dut2_ip2}= | 30.0.0.2 + +| ${ip_prefix}= | 24 + +*** Test Cases *** +| TC01: TG packets routed to DUT ingress interface, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->TG-if1 and from +| | ... | TG->DUT1-if2 to DUT1->TG-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} +| | ... | ${tg_to_dut1_if1} | ${dut1_to_tg_if1_mac} +| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_ip1} | ${tg_dut1_ip1} | 5 +| | And Node replies to ICMP echo request | ${tg_node} +| | ... | ${tg_to_dut1_if2} | ${dut1_to_tg_if2_mac} +| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_ip2} | ${tg_dut1_ip2} | 5 + +| TC02: TG packets routed to DUT egress interface, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->DUT2-if1 and from +| | ... | TG->DUT1-if2 to DUT1->DUT2-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_dut2_ip1} | ${tg_dut1_ip1} | 5 +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip2} | 5 + +| TC03: TG packets routed to DUT2 ingress interface through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->DUT1-if1 and from +| | ... | TG->DUT1-if2 to DUT2->DUT1-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_dut1_ip1} | ${tg_dut1_ip1} | 5 +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip2} | 5 + +| TC04: TG packets routed to DUT2 egress interface through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->TG-if1 and from +| | ... | TG->DUT1-if2 to DUT2->TG-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_tg_ip1} | ${tg_dut1_ip1} | 5 +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip2} | 5 + +| TC05: TG packets routed to TG through DUT1 and DUT2, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to TG->DUT2-if1 and from +| | ... | TG->DUT1-if2 to TG->DUT2-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} +| | ... | ${tg_dut2_ip1} | ${tg_to_dut1_if1} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if1} | ${dut2_to_tg_if1_mac} +| | ... | ${tg_to_dut2_if1_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${tg_dut1_ip2} | ${tg_dut2_ip2} | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_if2_mac} | ${tg_to_dut2_if2} +| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} + +| TC06: TG packets not routed to DUT ingress interface in different VRF, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->TG-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_tg_ip2} | ${tg_dut1_ip1} | 5 + +| TC07: TG packets not routed to DUT egress interface in different VRF, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->DUT2-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip1} | 5 + +| TC08: TG packets not routed to DUT2 ingress interface in different VRF through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->DUT1-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip1} | 5 + +| TC09: TG packets not routed to DUT2 egress interface in different VRF through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->TG-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip1} | 5 + +| TC10: TG packets not routed to TG in different VRF through DUT1 and DUT2, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG. +| | ... | [Enc] Eth-IPv4-ICMPv4. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. On every ingress +| | ... | and egress port on DUT is configured ARP and each DUT is configured +| | ... | with one route. +| | ... | [Ver] Packet is send from TG->DUT1-if1 to TG->DUT2-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} +| | ... | ${tg_dut2_ip2} | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if2} +| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} + +*** Keywords *** +| Setup Env - 2xVRF Each Node +| | [Documentation] +| | ... | Environment is set up with 2 fib tables on each DUT. DUT1-TG-IF1 and \ +| | ... | DUT1-DUT2-IF1 are assigned to FIB1, and DUT1-TG-IF2 and DUT1-DUT2-IF2 +| | ... | are assigned to FIB2 (the some done on DUT2, just opposite). IP +| | ... | addresses are subsequently set on interfaces, and ARP is set for +| | ... | neighbors. The last setting is route for each fib table. +| | ... +| | ${dut1_if1_idx}= | Get Interface SW Index +| | ... | ${dut1_node} | ${dut1_to_dut2_if1} +| | ${dut1_if2_idx}= | Get Interface SW Index +| | ... | ${dut1_node} | ${dut1_to_dut2_if2} +| | ${dut2_if1_idx}= | Get Interface SW Index +| | ... | ${dut2_node} | ${dut2_to_dut1_if1} +| | ${dut2_if2_idx}= | Get Interface SW Index +| | ... | ${dut2_node} | ${dut2_to_dut1_if2} +| | And Add fib table | ${dut1_node} +| | ... | ${tg_dut2_ip1} | ${ip_prefix} | ${fib_table_1} +| | ... | via ${dut2_to_dut1_ip1} sw_if_index ${dut1_if1_idx} multipath +| | And Add fib table | ${dut1_node} +| | ... | ${tg_dut2_ip2} | ${ip_prefix} | ${fib_table_2} +| | ... | via ${dut1_to_dut2_ip2} sw_if_index ${dut1_if2_idx} multipath +| | And Add fib table | ${dut2_node} +| | ... | ${tg_dut1_ip1} | ${ip_prefix} | ${fib_table_1} +| | ... | via ${dut2_to_dut1_ip1} sw_if_index ${dut2_if1_idx} multipath +| | And Add fib table | ${dut2_node} +| | ... | ${tg_dut1_ip2} | ${ip_prefix} | ${fib_table_2} +| | ... | via ${dut2_to_dut1_ip2} sw_if_index ${dut2_if2_idx} multipath + +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_dut2_if1} | ${fib_table_1} +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_dut2_if2} | ${fib_table_2} +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${fib_table_1} +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${fib_table_2} + +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_dut1_if1} | ${fib_table_1} +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_dut1_if2} | ${fib_table_2} +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${fib_table_1} +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${fib_table_2} + +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${dut1_to_tg_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${dut1_to_tg_ip2} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2_if1} +| | ... | ${dut1_to_dut2_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2_if2} +| | ... | ${dut1_to_dut2_ip2} | ${ip_prefix} + +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${dut2_to_tg_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${dut2_to_tg_ip2} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_dut1_if1} +| | ... | ${dut2_to_dut1_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_dut1_if2} +| | ... | ${dut2_to_dut1_ip2} | ${ip_prefix} + +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg_if1} +| | ... | ${tg_dut1_ip1} | ${tg_to_dut1_if1_mac} | vrf=${fib_table_1} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2_if1} +| | ... | ${dut2_to_dut1_ip1} | ${dut2_to_dut1_if1_mac} | vrf=${fib_table_1} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg_if1} +| | ... | ${tg_dut2_ip1} | ${tg_to_dut2_if1_mac} | vrf=${fib_table_1} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1_if1} +| | ... | ${dut1_to_dut2_ip1} | ${dut1_to_dut2_if1_mac} | vrf=${fib_table_1} + +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${tg_dut1_ip2} | ${tg_to_dut1_if2_mac} | vrf=${fib_table_2} +| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2_if2} +| | ... | ${dut2_to_dut1_ip2} | ${dut2_to_dut1_if2_mac} | vrf=${fib_table_2} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${tg_dut2_ip2} | ${tg_to_dut2_if2_mac} | vrf=${fib_table_2} +| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1_if2} +| | ... | ${dut1_to_dut2_ip2} | ${dut1_to_dut2_if2_mac} | vrf=${fib_table_2} + +| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip1} | ${ip_prefix} +| | ... | ${dut2_to_dut1_ip1} | ${dut1_to_dut2_if1} | vrf=${fib_table_1} +| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip1} | ${ip_prefix} +| | ... | ${dut1_to_dut2_ip1} | ${dut2_to_dut1_if1} | vrf=${fib_table_1} + +| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip2} | ${ip_prefix} +| | ... | ${dut2_to_dut1_ip2} | ${dut1_to_dut2_if2} | vrf=${fib_table_2} +| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip2} | ${ip_prefix} +| | ... | ${dut1_to_dut2_ip2} | ${dut2_to_dut1_if2} | vrf=${fib_table_2} diff --git a/tests/func/vrf/eth2p-ethip6-ip6basevrf-func.robot b/tests/func/vrf/eth2p-ethip6-ip6basevrf-func.robot new file mode 100644 index 0000000000..b88b6fd577 --- /dev/null +++ b/tests/func/vrf/eth2p-ethip6-ip6basevrf-func.robot @@ -0,0 +1,409 @@ +# 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/ipv4.robot +| Resource | resources/libraries/robot/ipv6.robot +| Resource | resources/libraries/robot/interfaces.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/traffic.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPUtil +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Vpn routed forwarding - baseline IPv6* +| ... | *[Top] Network Topologies:* TG=DUT1=DUT2=TG 3-node topology with two +| ... | links in between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 +| ... | *[Cfg] DUT configuration:* Each DUT is configured with two VRF tables; +| ... | Separation of traffic is tested by IP packets; Neighbors and Routes are +| ... | set on DUT nodes; IP addresses are set on DUT interfaces. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets +| ... | are sent by TG on link to DUT1, DUT2 or back to TG; On receipt TG +| ... | verifies packets for correctness and their IPv6 src-addr, dst-addr, +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* + +*** Variables *** +| ${fib_table_1}= | 9 +| ${fib_table_2}= | 99 + +| ${dut1_to_tg_ip1}= | 2001:62::3 +| ${dut1_to_tg_ip2}= | 2001:62::4 +| ${dut2_to_tg_ip1}= | 2003:62::3 +| ${dut2_to_tg_ip2}= | 2003:62::4 + +| ${dut1_to_dut2_ip1}= | 2002:62::1 +| ${dut1_to_dut2_ip2}= | 2002:62::2 +| ${dut2_to_dut1_ip1}= | 2002:62::3 +| ${dut2_to_dut1_ip2}= | 2002:62::4 + +| ${tg_dut1_ip1}= | 2001:62::1 +| ${tg_dut1_ip2}= | 2001:62::2 +| ${tg_dut2_ip1}= | 2003:62::1 +| ${tg_dut2_ip2}= | 2003:62::2 + +| ${ip_prefix}= | 64 +| ${timeout}= | 5 + +*** Test Cases *** +| TC01: TG packets routed to DUT ingress interface, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->TG-if1 and from +| | ... | TG->DUT1-if2 to DUT1->TG-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} +| | ... | ${tg_to_dut1_if1} | ${dut1_to_tg_if1_mac} +| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_ip1} +| | ... | ${tg_dut1_ip1} | ${timeout} +| | And Node replies to ICMP echo request | ${tg_node} +| | ... | ${tg_to_dut1_if2} | ${dut1_to_tg_if2_mac} +| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_ip2} +| | ... | ${tg_dut1_ip2} | ${timeout} + +| TC02: TG packets routed to DUT egress interface, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->DUT2-if1 and from +| | ... | TG->DUT1-if2 to DUT1->DUT2-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_dut2_ip1} | ${tg_dut1_ip1} | ${timeout} +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip2} | ${timeout} + +| TC03: TG packets routed to DUT2 ingress interface through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->DUT1-if1 and from +| | ... | TG->DUT1-if2 to DUT2->DUT1-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_dut1_ip1} | ${tg_dut1_ip1} | ${timeout} +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip2} | ${timeout} + +| TC04: TG packets routed to DUT2 egress interface through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->TG-if1 and from +| | ... | TG->DUT1-if2 to DUT2->TG-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_tg_ip1} | ${tg_dut1_ip1} | ${timeout} +| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip2} | ${timeout} + +| TC05: TG packets routed to TG through DUT1 and DUT2, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to TG->DUT2-if1 and from +| | ... | TG->DUT1-if2 to TG->DUT2-if2 and checked if arrived. +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} +| | ... | ${tg_dut2_ip1} | ${tg_to_dut1_if1} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if1} | ${dut2_to_tg_if1_mac} +| | ... | ${tg_to_dut2_if1_mac} +| | And Send Packet And Check Headers | ${tg_node} +| | ... | ${tg_dut1_ip2} | ${tg_dut2_ip2} | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_if2_mac} | ${tg_to_dut2_if2} +| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} + +| TC06: TG packets not routed to DUT ingress interface in different VRF, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->TG-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_tg_ip2} | ${tg_dut1_ip1} | ${timeout} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut1_to_tg_ip1} | ${tg_dut1_ip2} | ${timeout} + +| TC07: TG packets not routed to DUT egress interface in different VRF, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->DUT2-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip1} | ${timeout} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut1_to_dut2_ip1} | ${tg_dut1_ip2} | ${timeout} + + +| TC08: TG packets not routed to DUT2 ingress interface in different VRF through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->DUT1-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip1} | ${timeout} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut2_to_dut1_ip1} | ${tg_dut1_ip2} | ${timeout} + +| TC09: TG packets not routed to DUT2 egress interface in different VRF through DUT1, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->TG-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if1} +| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} +| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip1} | ${timeout} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Node replies to ICMP echo request +| | ... | ${tg_node} | ${tg_to_dut1_if2} +| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} +| | ... | ${dut2_to_tg_ip1} | ${tg_dut1_ip2} | ${timeout} + +| TC10: TG packets not routed to TG in different VRF through DUT1 and DUT2, VPP configured with two VRFs +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG. +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each +| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces +| | ... | are configured with IP addresses from *Variables*. Neighbors are +| | ... | configured for each DUTs ingress/egress ports, and each VRF is +| | ... | configured with just one route. +| | ... | [Ver] Packet is sent from TG->DUT1-if1 to TG->DUT2-if2 where it +| | ... | should not arrive. +| | [Tags] | SKIP_PATCH +| | Given Path for Double-Link 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} +| | ... | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in Double-Link 3-node path are UP +| | When Setup Env - 2xVRF Each Node +| | Then Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} +| | ... | ${tg_dut2_ip2} | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if2} +| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip2} +| | ... | ${tg_dut2_ip1} | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_if2_mac} | ${tg_to_dut2_if1} +| | ... | ${dut2_to_tg_if1_mac} | ${tg_to_dut2_if1_mac} + +*** Keywords *** +| Setup Env - 2xVRF Each Node +| | [Documentation] +| | ... | Environment is set up with 2 fib tables on each DUT. DUT1-TG-IF1 and \ +| | ... | DUT1-DUT2-IF1 are assigned to FIB1, and DUT1-TG-IF2 and DUT1-DUT2-IF2 +| | ... | are assigned to FIB2 (the same done on DUT2, just opposite). +| | ... | IP addresses and IP Neighbors are subsequently set for interfaces. +| | ... | The last setting is route for each fib table. +| | ... +| | ${dut1_if1_idx}= | Get Interface SW Index +| | ... | ${dut1_node} | ${dut1_to_dut2_if1} +| | ${dut1_if2_idx}= | Get Interface SW Index +| | ... | ${dut1_node} | ${dut1_to_dut2_if2} +| | ${dut2_if1_idx}= | Get Interface SW Index +| | ... | ${dut2_node} | ${dut2_to_dut1_if1} +| | ${dut2_if2_idx}= | Get Interface SW Index +| | ... | ${dut2_node} | ${dut2_to_dut1_if2} + +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_dut2_if1} | ${fib_table_1} | ipv6=${TRUE} +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_dut2_if2} | ${fib_table_2} | ipv6=${TRUE} +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${fib_table_1} | ipv6=${TRUE} +| | Assign Interface To Fib Table +| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${fib_table_2} | ipv6=${TRUE} + +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_dut1_if1} | ${fib_table_1} | ipv6=${TRUE} +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_dut1_if2} | ${fib_table_2} | ipv6=${TRUE} +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${fib_table_1} | ipv6=${TRUE} +| | Assign Interface To Fib Table +| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${fib_table_2} | ipv6=${TRUE} + +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${dut1_to_tg_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${dut1_to_tg_ip2} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2_if1} +| | ... | ${dut1_to_dut2_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut1_node} | ${dut1_to_dut2_if2} +| | ... | ${dut1_to_dut2_ip2} | ${ip_prefix} + +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${dut2_to_tg_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${dut2_to_tg_ip2} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_dut1_if1} +| | ... | ${dut2_to_dut1_ip1} | ${ip_prefix} +| | And Set Interface Address +| | ... | ${dut2_node} | ${dut2_to_dut1_if2} +| | ... | ${dut2_to_dut1_ip2} | ${ip_prefix} + +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg_if1} +| | ... | ${tg_dut1_ip1} | ${tg_to_dut1_if1_mac} | vrf=${fib_table_1} +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2_if1} +| | ... | ${dut2_to_dut1_ip1} | ${dut2_to_dut1_if1_mac} | vrf=${fib_table_1} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg_if1} +| | ... | ${tg_dut2_ip1} | ${tg_to_dut2_if1_mac} | vrf=${fib_table_1} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1_if1} +| | ... | ${dut1_to_dut2_ip1} | ${dut1_to_dut2_if1_mac} | vrf=${fib_table_1} + +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${tg_dut1_ip2} | ${tg_to_dut1_if2_mac} | vrf=${fib_table_2} +| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2_if2} +| | ... | ${dut2_to_dut1_ip2} | ${dut2_to_dut1_if2_mac} | vrf=${fib_table_2} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${tg_dut2_ip2} | ${tg_to_dut2_if2_mac} | vrf=${fib_table_2} +| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1_if2} +| | ... | ${dut1_to_dut2_ip2} | ${dut1_to_dut2_if2_mac} | vrf=${fib_table_2} + +| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip1} | ${ip_prefix} +| | ... | ${dut2_to_dut1_ip1} | ${dut1_to_dut2_if1} | vrf=${fib_table_1} +| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip1} | ${ip_prefix} +| | ... | ${dut1_to_dut2_ip1} | ${dut2_to_dut1_if1} | vrf=${fib_table_1} + +| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip2} | ${ip_prefix} +| | ... | ${dut2_to_dut1_ip2} | ${dut1_to_dut2_if2} | vrf=${fib_table_2} +| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip2} | ${ip_prefix} +| | ... | ${dut1_to_dut2_ip2} | ${dut2_to_dut1_if2} | vrf=${fib_table_2} + +| | Vpp All RA Suppress Link Layer | ${nodes} diff --git a/tests/func/vrf/vrf_tests.robot b/tests/func/vrf/vrf_tests.robot deleted file mode 100644 index 0339573956..0000000000 --- a/tests/func/vrf/vrf_tests.robot +++ /dev/null @@ -1,391 +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/ipv4.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *Vpn routed forwarding - baseline IPv4* -| ... | *[Top] Network Topologies:* TG=DUT1=DUT2=TG 3-node topology with two -| ... | links in between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of -| ... | IPv4. -| ... | *[Cfg] DUT configuration:*Each DUT is configured with two VRF tables; -| ... | Separation of traffic is tested by IP packets; Basic ARP and ROUTES are -| ... | set on DUT nodes; IP addresses are set on DUT interfaces. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets -| ... | are sent by TG on link to DUT1, DUT2 or back to TG; On receipt TG -| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr, -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${fib_table_1}= | 9 -| ${fib_table_2}= | 99 - -| ${dut1_to_tg_ip1}= | 10.0.0.3 -| ${dut1_to_tg_ip2}= | 10.0.0.4 -| ${dut2_to_tg_ip1}= | 30.0.0.3 -| ${dut2_to_tg_ip2}= | 30.0.0.4 - -| ${dut1_to_dut2_ip1}= | 20.0.0.1 -| ${dut1_to_dut2_ip2}= | 20.0.0.2 -| ${dut2_to_dut1_ip1}= | 20.0.0.3 -| ${dut2_to_dut1_ip2}= | 20.0.0.4 - -| ${tg_dut1_ip1}= | 10.0.0.1 -| ${tg_dut1_ip2}= | 10.0.0.2 -| ${tg_dut2_ip1}= | 30.0.0.1 -| ${tg_dut2_ip2}= | 30.0.0.2 - -| ${ip_prefix}= | 24 - -*** Test Cases *** -| TC01: TG packets routed to DUT ingress interface, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->TG-if1 and from -| | ... | TG->DUT1-if2 to DUT1->TG-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} -| | ... | ${tg_to_dut1_if1} | ${dut1_to_tg_if1_mac} -| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_ip1} | ${tg_dut1_ip1} | 5 -| | And Node replies to ICMP echo request | ${tg_node} -| | ... | ${tg_to_dut1_if2} | ${dut1_to_tg_if2_mac} -| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_ip2} | ${tg_dut1_ip2} | 5 - -| TC02: TG packets routed to DUT egress interface, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->DUT2-if1 and from -| | ... | TG->DUT1-if2 to DUT1->DUT2-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_dut2_ip1} | ${tg_dut1_ip1} | 5 -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip2} | 5 - -| TC03: TG packets routed to DUT2 ingress interface through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->DUT1-if1 and from -| | ... | TG->DUT1-if2 to DUT2->DUT1-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_dut1_ip1} | ${tg_dut1_ip1} | 5 -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip2} | 5 - -| TC04: TG packets routed to DUT2 egress interface through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->TG-if1 and from -| | ... | TG->DUT1-if2 to DUT2->TG-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_tg_ip1} | ${tg_dut1_ip1} | 5 -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip2} | 5 - -| TC05: TG packets routed to TG through DUT1 and DUT2, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to TG->DUT2-if1 and from -| | ... | TG->DUT1-if2 to TG->DUT2-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} -| | ... | ${tg_dut2_ip1} | ${tg_to_dut1_if1} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if1} | ${dut2_to_tg_if1_mac} -| | ... | ${tg_to_dut2_if1_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${tg_dut1_ip2} | ${tg_dut2_ip2} | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_if2_mac} | ${tg_to_dut2_if2} -| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} - -| TC06: TG packets not routed to DUT ingress interface in different VRF, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->TG-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_tg_ip2} | ${tg_dut1_ip1} | 5 - -| TC07: TG packets not routed to DUT egress interface in different VRF, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT1->DUT2-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip1} | 5 - -| TC08: TG packets not routed to DUT2 ingress interface in different VRF through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->DUT1-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip1} | 5 - -| TC09: TG packets not routed to DUT2 egress interface in different VRF through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to DUT2->TG-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip1} | 5 - -| TC10: TG packets not routed to TG in different VRF through DUT1 and DUT2, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG. -| | ... | [Enc] Eth-IPv4-ICMPv4. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. On every ingress -| | ... | and egress port on DUT is configured ARP and each DUT is configured -| | ... | with one route. -| | ... | [Ver] Packet is send from TG->DUT1-if1 to TG->DUT2-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} -| | ... | ${tg_dut2_ip2} | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if2} -| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} - -*** Keywords *** -| Setup Env - 2xVRF Each Node -| | [Documentation] -| | ... | Environment is set up with 2 fib tables on each DUT. DUT1-TG-IF1 and \ -| | ... | DUT1-DUT2-IF1 are assigned to FIB1, and DUT1-TG-IF2 and DUT1-DUT2-IF2 -| | ... | are assigned to FIB2 (the some done on DUT2, just opposite). IP -| | ... | addresses are subsequently set on interfaces, and ARP is set for -| | ... | neighbors. The last setting is route for each fib table. -| | ... -| | ${dut1_if1_idx}= | Get Interface SW Index -| | ... | ${dut1_node} | ${dut1_to_dut2_if1} -| | ${dut1_if2_idx}= | Get Interface SW Index -| | ... | ${dut1_node} | ${dut1_to_dut2_if2} -| | ${dut2_if1_idx}= | Get Interface SW Index -| | ... | ${dut2_node} | ${dut2_to_dut1_if1} -| | ${dut2_if2_idx}= | Get Interface SW Index -| | ... | ${dut2_node} | ${dut2_to_dut1_if2} -| | And Add fib table | ${dut1_node} -| | ... | ${tg_dut2_ip1} | ${ip_prefix} | ${fib_table_1} -| | ... | via ${dut2_to_dut1_ip1} sw_if_index ${dut1_if1_idx} multipath -| | And Add fib table | ${dut1_node} -| | ... | ${tg_dut2_ip2} | ${ip_prefix} | ${fib_table_2} -| | ... | via ${dut1_to_dut2_ip2} sw_if_index ${dut1_if2_idx} multipath -| | And Add fib table | ${dut2_node} -| | ... | ${tg_dut1_ip1} | ${ip_prefix} | ${fib_table_1} -| | ... | via ${dut2_to_dut1_ip1} sw_if_index ${dut2_if1_idx} multipath -| | And Add fib table | ${dut2_node} -| | ... | ${tg_dut1_ip2} | ${ip_prefix} | ${fib_table_2} -| | ... | via ${dut2_to_dut1_ip2} sw_if_index ${dut2_if2_idx} multipath - -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_dut2_if1} | ${fib_table_1} -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_dut2_if2} | ${fib_table_2} -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${fib_table_1} -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${fib_table_2} - -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_dut1_if1} | ${fib_table_1} -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_dut1_if2} | ${fib_table_2} -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${fib_table_1} -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${fib_table_2} - -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${dut1_to_tg_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${dut1_to_tg_ip2} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2_if1} -| | ... | ${dut1_to_dut2_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2_if2} -| | ... | ${dut1_to_dut2_ip2} | ${ip_prefix} - -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${dut2_to_tg_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${dut2_to_tg_ip2} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_dut1_if1} -| | ... | ${dut2_to_dut1_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_dut1_if2} -| | ... | ${dut2_to_dut1_ip2} | ${ip_prefix} - -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg_if1} -| | ... | ${tg_dut1_ip1} | ${tg_to_dut1_if1_mac} | vrf=${fib_table_1} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2_if1} -| | ... | ${dut2_to_dut1_ip1} | ${dut2_to_dut1_if1_mac} | vrf=${fib_table_1} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg_if1} -| | ... | ${tg_dut2_ip1} | ${tg_to_dut2_if1_mac} | vrf=${fib_table_1} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1_if1} -| | ... | ${dut1_to_dut2_ip1} | ${dut1_to_dut2_if1_mac} | vrf=${fib_table_1} - -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${tg_dut1_ip2} | ${tg_to_dut1_if2_mac} | vrf=${fib_table_2} -| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2_if2} -| | ... | ${dut2_to_dut1_ip2} | ${dut2_to_dut1_if2_mac} | vrf=${fib_table_2} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${tg_dut2_ip2} | ${tg_to_dut2_if2_mac} | vrf=${fib_table_2} -| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1_if2} -| | ... | ${dut1_to_dut2_ip2} | ${dut1_to_dut2_if2_mac} | vrf=${fib_table_2} - -| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip1} | ${ip_prefix} -| | ... | ${dut2_to_dut1_ip1} | ${dut1_to_dut2_if1} | vrf=${fib_table_1} -| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip1} | ${ip_prefix} -| | ... | ${dut1_to_dut2_ip1} | ${dut2_to_dut1_if1} | vrf=${fib_table_1} - -| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip2} | ${ip_prefix} -| | ... | ${dut2_to_dut1_ip2} | ${dut1_to_dut2_if2} | vrf=${fib_table_2} -| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip2} | ${ip_prefix} -| | ... | ${dut1_to_dut2_ip2} | ${dut2_to_dut1_if2} | vrf=${fib_table_2} diff --git a/tests/func/vrf/vrf_tests_v6.robot b/tests/func/vrf/vrf_tests_v6.robot deleted file mode 100644 index b88b6fd577..0000000000 --- a/tests/func/vrf/vrf_tests_v6.robot +++ /dev/null @@ -1,409 +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/ipv4.robot -| Resource | resources/libraries/robot/ipv6.robot -| Resource | resources/libraries/robot/interfaces.robot -| Resource | resources/libraries/robot/testing_path.robot -| Resource | resources/libraries/robot/traffic.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *Vpn routed forwarding - baseline IPv6* -| ... | *[Top] Network Topologies:* TG=DUT1=DUT2=TG 3-node topology with two -| ... | links in between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 -| ... | *[Cfg] DUT configuration:* Each DUT is configured with two VRF tables; -| ... | Separation of traffic is tested by IP packets; Neighbors and Routes are -| ... | set on DUT nodes; IP addresses are set on DUT interfaces. -| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets -| ... | are sent by TG on link to DUT1, DUT2 or back to TG; On receipt TG -| ... | verifies packets for correctness and their IPv6 src-addr, dst-addr, -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${fib_table_1}= | 9 -| ${fib_table_2}= | 99 - -| ${dut1_to_tg_ip1}= | 2001:62::3 -| ${dut1_to_tg_ip2}= | 2001:62::4 -| ${dut2_to_tg_ip1}= | 2003:62::3 -| ${dut2_to_tg_ip2}= | 2003:62::4 - -| ${dut1_to_dut2_ip1}= | 2002:62::1 -| ${dut1_to_dut2_ip2}= | 2002:62::2 -| ${dut2_to_dut1_ip1}= | 2002:62::3 -| ${dut2_to_dut1_ip2}= | 2002:62::4 - -| ${tg_dut1_ip1}= | 2001:62::1 -| ${tg_dut1_ip2}= | 2001:62::2 -| ${tg_dut2_ip1}= | 2003:62::1 -| ${tg_dut2_ip2}= | 2003:62::2 - -| ${ip_prefix}= | 64 -| ${timeout}= | 5 - -*** Test Cases *** -| TC01: TG packets routed to DUT ingress interface, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->TG-if1 and from -| | ... | TG->DUT1-if2 to DUT1->TG-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} -| | ... | ${tg_to_dut1_if1} | ${dut1_to_tg_if1_mac} -| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_ip1} -| | ... | ${tg_dut1_ip1} | ${timeout} -| | And Node replies to ICMP echo request | ${tg_node} -| | ... | ${tg_to_dut1_if2} | ${dut1_to_tg_if2_mac} -| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_ip2} -| | ... | ${tg_dut1_ip2} | ${timeout} - -| TC02: TG packets routed to DUT egress interface, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->DUT2-if1 and from -| | ... | TG->DUT1-if2 to DUT1->DUT2-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_dut2_ip1} | ${tg_dut1_ip1} | ${timeout} -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip2} | ${timeout} - -| TC03: TG packets routed to DUT2 ingress interface through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->DUT1-if1 and from -| | ... | TG->DUT1-if2 to DUT2->DUT1-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_dut1_ip1} | ${tg_dut1_ip1} | ${timeout} -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip2} | ${timeout} - -| TC04: TG packets routed to DUT2 egress interface through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->TG-if1 and from -| | ... | TG->DUT1-if2 to DUT2->TG-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_tg_ip1} | ${tg_dut1_ip1} | ${timeout} -| | And Node replies to ICMP echo request | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip2} | ${timeout} - -| TC05: TG packets routed to TG through DUT1 and DUT2, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to TG->DUT2-if1 and from -| | ... | TG->DUT1-if2 to TG->DUT2-if2 and checked if arrived. -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} -| | ... | ${tg_dut2_ip1} | ${tg_to_dut1_if1} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if1} | ${dut2_to_tg_if1_mac} -| | ... | ${tg_to_dut2_if1_mac} -| | And Send Packet And Check Headers | ${tg_node} -| | ... | ${tg_dut1_ip2} | ${tg_dut2_ip2} | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_if2_mac} | ${tg_to_dut2_if2} -| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} - -| TC06: TG packets not routed to DUT ingress interface in different VRF, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->TG-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_tg_ip2} | ${tg_dut1_ip1} | ${timeout} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut1_to_tg_ip1} | ${tg_dut1_ip2} | ${timeout} - -| TC07: TG packets not routed to DUT egress interface in different VRF, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT1->DUT2-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut1_to_dut2_ip2} | ${tg_dut1_ip1} | ${timeout} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut1_to_dut2_ip1} | ${tg_dut1_ip2} | ${timeout} - - -| TC08: TG packets not routed to DUT2 ingress interface in different VRF through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->DUT1-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_dut1_ip2} | ${tg_dut1_ip1} | ${timeout} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut2_to_dut1_ip1} | ${tg_dut1_ip2} | ${timeout} - -| TC09: TG packets not routed to DUT2 egress interface in different VRF through DUT1, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to DUT2->TG-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if1} -| | ... | ${dut1_to_tg_if1_mac} | ${tg_to_dut1_if1_mac} -| | ... | ${dut2_to_tg_ip2} | ${tg_dut1_ip1} | ${timeout} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Node replies to ICMP echo request -| | ... | ${tg_node} | ${tg_to_dut1_if2} -| | ... | ${dut1_to_tg_if2_mac} | ${tg_to_dut1_if2_mac} -| | ... | ${dut2_to_tg_ip1} | ${tg_dut1_ip2} | ${timeout} - -| TC10: TG packets not routed to TG in different VRF through DUT1 and DUT2, VPP configured with two VRFs -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG. -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] DUT1 and DUT2 are both configured with two fib tables. Each -| | ... | table is assigned to 2 interfaces to separate the traffic. Interfaces -| | ... | are configured with IP addresses from *Variables*. Neighbors are -| | ... | configured for each DUTs ingress/egress ports, and each VRF is -| | ... | configured with just one route. -| | ... | [Ver] Packet is sent from TG->DUT1-if1 to TG->DUT2-if2 where it -| | ... | should not arrive. -| | [Tags] | SKIP_PATCH -| | Given Path for Double-Link 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} -| | ... | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in Double-Link 3-node path are UP -| | When Setup Env - 2xVRF Each Node -| | Then Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip1} -| | ... | ${tg_dut2_ip2} | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut1_if1_mac} | ${dut1_to_tg_if1_mac} | ${tg_to_dut2_if2} -| | ... | ${dut2_to_tg_if2_mac} | ${tg_to_dut2_if2_mac} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send Packet And Check Headers | ${tg_node} | ${tg_dut1_ip2} -| | ... | ${tg_dut2_ip1} | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut1_if2_mac} | ${dut1_to_tg_if2_mac} | ${tg_to_dut2_if1} -| | ... | ${dut2_to_tg_if1_mac} | ${tg_to_dut2_if1_mac} - -*** Keywords *** -| Setup Env - 2xVRF Each Node -| | [Documentation] -| | ... | Environment is set up with 2 fib tables on each DUT. DUT1-TG-IF1 and \ -| | ... | DUT1-DUT2-IF1 are assigned to FIB1, and DUT1-TG-IF2 and DUT1-DUT2-IF2 -| | ... | are assigned to FIB2 (the same done on DUT2, just opposite). -| | ... | IP addresses and IP Neighbors are subsequently set for interfaces. -| | ... | The last setting is route for each fib table. -| | ... -| | ${dut1_if1_idx}= | Get Interface SW Index -| | ... | ${dut1_node} | ${dut1_to_dut2_if1} -| | ${dut1_if2_idx}= | Get Interface SW Index -| | ... | ${dut1_node} | ${dut1_to_dut2_if2} -| | ${dut2_if1_idx}= | Get Interface SW Index -| | ... | ${dut2_node} | ${dut2_to_dut1_if1} -| | ${dut2_if2_idx}= | Get Interface SW Index -| | ... | ${dut2_node} | ${dut2_to_dut1_if2} - -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_dut2_if1} | ${fib_table_1} | ipv6=${TRUE} -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_dut2_if2} | ${fib_table_2} | ipv6=${TRUE} -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${fib_table_1} | ipv6=${TRUE} -| | Assign Interface To Fib Table -| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${fib_table_2} | ipv6=${TRUE} - -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_dut1_if1} | ${fib_table_1} | ipv6=${TRUE} -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_dut1_if2} | ${fib_table_2} | ipv6=${TRUE} -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${fib_table_1} | ipv6=${TRUE} -| | Assign Interface To Fib Table -| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${fib_table_2} | ipv6=${TRUE} - -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_tg_if1} | ${dut1_to_tg_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_tg_if2} | ${dut1_to_tg_ip2} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2_if1} -| | ... | ${dut1_to_dut2_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut1_node} | ${dut1_to_dut2_if2} -| | ... | ${dut1_to_dut2_ip2} | ${ip_prefix} - -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_tg_if1} | ${dut2_to_tg_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_tg_if2} | ${dut2_to_tg_ip2} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_dut1_if1} -| | ... | ${dut2_to_dut1_ip1} | ${ip_prefix} -| | And Set Interface Address -| | ... | ${dut2_node} | ${dut2_to_dut1_if2} -| | ... | ${dut2_to_dut1_ip2} | ${ip_prefix} - -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg_if1} -| | ... | ${tg_dut1_ip1} | ${tg_to_dut1_if1_mac} | vrf=${fib_table_1} -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2_if1} -| | ... | ${dut2_to_dut1_ip1} | ${dut2_to_dut1_if1_mac} | vrf=${fib_table_1} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg_if1} -| | ... | ${tg_dut2_ip1} | ${tg_to_dut2_if1_mac} | vrf=${fib_table_1} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1_if1} -| | ... | ${dut1_to_dut2_ip1} | ${dut1_to_dut2_if1_mac} | vrf=${fib_table_1} - -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${tg_dut1_ip2} | ${tg_to_dut1_if2_mac} | vrf=${fib_table_2} -| | And Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2_if2} -| | ... | ${dut2_to_dut1_ip2} | ${dut2_to_dut1_if2_mac} | vrf=${fib_table_2} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${tg_dut2_ip2} | ${tg_to_dut2_if2_mac} | vrf=${fib_table_2} -| | And Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1_if2} -| | ... | ${dut1_to_dut2_ip2} | ${dut1_to_dut2_if2_mac} | vrf=${fib_table_2} - -| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip1} | ${ip_prefix} -| | ... | ${dut2_to_dut1_ip1} | ${dut1_to_dut2_if1} | vrf=${fib_table_1} -| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip1} | ${ip_prefix} -| | ... | ${dut1_to_dut2_ip1} | ${dut2_to_dut1_if1} | vrf=${fib_table_1} - -| | And Vpp Route Add | ${dut1_node} | ${tg_dut2_ip2} | ${ip_prefix} -| | ... | ${dut2_to_dut1_ip2} | ${dut1_to_dut2_if2} | vrf=${fib_table_2} -| | And Vpp Route Add | ${dut2_node} | ${tg_dut1_ip2} | ${ip_prefix} -| | ... | ${dut1_to_dut2_ip2} | ${dut2_to_dut1_if2} | vrf=${fib_table_2} - -| | Vpp All RA Suppress Link Layer | ${nodes} diff --git a/tests/func/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot b/tests/func/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..592154845d --- /dev/null +++ b/tests/func/vxlan/eth2p-dot1qip4vxlan-l2bdbasemaclrn-func.robot @@ -0,0 +1,76 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *RFC7348 VXLAN: Bridge-domain with VXLAN over VLAN test cases* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology with +| ... | single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-dot1q-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with static MACs, MAC learning +| ... | enabled and Split Horizon Groups (SHG) depending on test case; VXLAN +| ... | tunnels are configured between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are +| ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr and +| ... | MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${VNI}= | 23 +| ${BID}= | 23 +| ${VLAN}= | 10 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4oVLAN tunnels switch ICMPv4 between TG links +| | [Tags] | EXPECTED_FAILING +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on\ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure L2 bridge-domain (MAC learning enabled), each with one +| | ... | interface to TG and one VXLAN tunnel interface towards the other DUT +| | ... | over VLAN sub-interface. [Ver] Make TG send ICMPv4 Echo Req between +| | ... | two of its interfaces, verify all packets are received. [Ref] RFC7348. +| | Given Path for 3-node testing is set +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | And Interfaces in 3-node path are up +| | And Vlan interfaces for VXLAN are created | ${VLAN} +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | And IP addresses are set on interfaces +| | ... | ${dut1_node} | ${dut1s_vlan_name} | ${dut1s_vlan_index} +| | ... | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${VNI} +| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan} +| | ... | up +| | And Interfaces are added to BD | ${dut1_node} | ${BID} +| | ... | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${VNI} +| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan} +| | ... | up +| | And Interfaces are added to BD | ${dut2_node} | ${BID} +| | ... | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send and receive ICMPv4 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot b/tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..357f339a7c --- /dev/null +++ b/tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot @@ -0,0 +1,119 @@ +# 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/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV | VPP_VM_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with VM combined with VXLAN test cases - IPv4* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled; +| ... | VXLAN tunnels are configured between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent +| ... | in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 + +| ${ip4_addr1}= | 172.16.0.1 +| ${ip4_addr2}= | 172.16.0.2 +| ${ip4_prefix}= | 24 + +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +| ${qemu1}= | qemu_instance_1 +| ${qemu2}= | qemu_instance_2 + +| ${dut1_vhost1}= | dut1_vhost_if1 +| ${dut1_vhost2}= | dut1_vhost_if2 +| ${dut2_vhost1}= | dut2_vhost_if1 +| ${dut2_vhost2}= | dut2_vhost_if2 + +*** Test Cases *** +| TC01:DUT1 and DUT2 with two L2BDs and VXLANoIPv4 tunnel switch ICMPv4 between TG links and VM links +| | [Documentation] +| | ... | [Top] TG-DUT1-VM-DUT1-DUT2-VM-DUT2-TG. +| | ... | [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on DUT1-DUT2; Eth-IPv4-ICMPv4 +| | ... | on TG-DUTn and DUTn=VM. +| | ... | [Cfg] On both DUTs configure two L2BDs (MAC learning enabled); first +| | ... | L2BD with untagged interface to TG and vhost-user interface to local +| | ... | VM, second one with vhost-user interface to local VM and VXLAN +| | ... | interface towards the other DUT. Configure linux bridge on both VMs +| | ... | to pass traffic between both vhost-user interfaces. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between two of its interfaces to +| | ... | be switched by DUT1 and DUT2; verify packets are switched between +| | ... | these TG interfaces. +| | ... | [Ref] RFC7348. +| | 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 VPP Vhost interfaces for L2BD forwarding are setup | ${dut1_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${dut1_vhost1} +| | ... | ${dut1_vhost2} +| | And VPP Vhost interfaces for L2BD forwarding are setup | ${dut2_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${dut2_vhost1} +| | ... | ${dut2_vhost2} +| | And VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} +| | ... | ${sock2} | ${qemu1} +| | And VM for Vhost L2BD forwarding is setup | ${dut2_node} | ${sock1} +| | ... | ${sock2} | ${qemu2} +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} +| | ... | ${ip4_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} +| | ... | ${ip4_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} +| | ${dut1s_vxlan}= | And Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | And Interfaces are added to BD | ${dut1_node} | ${bd_id1} +| | ... | ${dut1_to_tg} | ${${dut1_vhost1}} +| | And Interfaces are added to BD | ${dut1_node} | ${bd_id2} +| | ... | ${dut1s_vxlan} | ${${dut1_vhost2}} +| | And Interfaces are added to BD | ${dut2_node} | ${bd_id1} +| | ... | ${dut2_to_tg} | ${${dut2_vhost1}} +| | And Interfaces are added to BD | ${dut2_node} | ${bd_id2} +| | ... | ${dut2s_vxlan} | ${${dut2_vhost2}} +| | Then Send and receive ICMPv4 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Run keyword | Qemu Teardown | ${dut1_node} +| | ... | ${${qemu1}} | ${qemu1} +| | ... | AND | Run keyword | Qemu Teardown | ${dut2_node} +| | ... | ${${qemu2}} | ${qemu2} +| | ... | AND | Check VPP PID in Teardown diff --git a/tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot b/tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..543fec22b8 --- /dev/null +++ b/tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-func.robot @@ -0,0 +1,78 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Bridge-domain with VXLAN test cases - IPv4* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled; +| ... | VXLAN tunnels are configured between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent +| ... | in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 +| ${vni_2}= | 35 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 +| ${bd_id3}= | 30 +| ${shg1}= | 1 +| ${shg2}= | 2 + +| ${ip4_addr1}= | 172.16.0.1 +| ${ip4_addr2}= | 172.16.0.2 +| ${ip4_prefix}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure two i/fs into L2BD with MAC learning. [Ver] Make TG +| | ... | verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 in +| | ... | both directions and are correct on receive. [Ref] RFC7348. +| | Given 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_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2} +| | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1} +| | And IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} +| | And Interfaces are added to BD | ${dut1_node} | ${bd_id1} +| | ... | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} +| | And Interfaces are added to BD | ${dut2_node} | ${bd_id1} +| | ... | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send and receive ICMPv4 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot b/tests/func/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot new file mode 100644 index 0000000000..de38c56b2d --- /dev/null +++ b/tests/func/vxlan/eth2p-ethip4vxlan-l2xcbase-func.robot @@ -0,0 +1,66 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *RFC7348 VXLAN: L2 cross-connect with VXLAN test cases* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | cross-connect (L2XC) switching; VXLAN tunnels are configured between +| ... | L2XCs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets +| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive +| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${VNI}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2XC and VXLANoIPv4 tunnels switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | [Ref] RFC7348.DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On +| | ... | DUT1 and DUT2 configure L2 cross-connect (L2XC), each with one +| | ... | interface to TG and one VXLAN tunnel interface towards the other +| | ... | DUT. [Ver] Make TG send ICMPv4 Echo Req between two of its +| | ... | interfaces; verify all packets are received. [Ref] RFC7348. +| | Given 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_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2} +| | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1} +| | And IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE} +| | ... | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${VNI} +| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} +| | And Interfaces are added to xconnect | ${dut1_node} +| | ... | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${VNI} +| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} +| | And Interfaces are added to xconnect | ${dut2_node} +| | ... | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send and receive ICMPv4 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot b/tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot new file mode 100644 index 0000000000..19846294a3 --- /dev/null +++ b/tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot @@ -0,0 +1,120 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with VM combined with VXLAN test cases - IPv6* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on +| ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for L2 switching of IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled; +| ... | VXLAN tunnels are configured between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent +| ... | in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv6 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 + +| ${ip6_addr1}= | 3ffe:64::1 +| ${ip6_addr2}= | 3ffe:64::2 +| ${ip6_prefix}= | 64 + +| ${sock1}= | /tmp/sock1 +| ${sock2}= | /tmp/sock2 + +| ${qemu1}= | qemu_instance_1 +| ${qemu2}= | qemu_instance_2 + +| ${dut1_vhost1}= | dut1_vhost_if1 +| ${dut1_vhost2}= | dut1_vhost_if2 +| ${dut2_vhost1}= | dut2_vhost_if1 +| ${dut2_vhost2}= | dut2_vhost_if2 + +*** Test Cases *** +| TC01:DUT1 and DUT2 with two L2BDs and VXLANoIPv6 tunnel switch ICMPv6 between TG links and VM links +| | [Documentation] +| | ... | [Top] TG-DUT1-VM-DUT1-DUT2-VM-DUT2-TG. +| | ... | [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on DUT1-DUT2; Eth-IPv4-ICMPv4 +| | ... | on TG-DUTn and DUTn=VM. +| | ... | [Cfg] On both DUTs configure two L2BDs (MAC learning enabled); first +| | ... | L2BD with untagged interface to TG and vhost-user interface to local +| | ... | VM, second one with vhost-user interface to local VM and VXLAN +| | ... | interface towards the other DUT. Configure linux bridge on both VMs +| | ... | to pass traffic between both vhost-user interfaces. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between two of its interfaces to +| | ... | be switched by DUT1 and DUT2; verify packets are switched between +| | ... | these TG interfaces. +| | ... | [Ref] RFC7348. +| | [Tags] | VPP_VM_ENV +| | 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 VPP Vhost interfaces for L2BD forwarding are setup | ${dut1_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${dut1_vhost1} +| | ... | ${dut1_vhost2} +| | And VPP Vhost interfaces for L2BD forwarding are setup | ${dut2_node} +| | ... | ${sock1} +| | ... | ${sock2} +| | ... | ${dut2_vhost1} +| | ... | ${dut2_vhost2} +| | And VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1} +| | ... | ${sock2} | ${qemu1} +| | And VM for Vhost L2BD forwarding is setup | ${dut2_node} | ${sock1} +| | ... | ${sock2} | ${qemu2} +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} +| | ... | ${ip6_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} +| | ... | ${ip6_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} +| | ${dut1s_vxlan}= | And Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip6_addr1} | ${ip6_addr2} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip6_addr2} | ${ip6_addr1} +| | And Interfaces are added to BD | ${dut1_node} | ${bd_id1} +| | ... | ${dut1_to_tg} | ${${dut1_vhost1}} +| | And Interfaces are added to BD | ${dut1_node} | ${bd_id2} +| | ... | ${dut1s_vxlan} | ${${dut1_vhost2}} +| | And Interfaces are added to BD | ${dut2_node} | ${bd_id1} +| | ... | ${dut2_to_tg} | ${${dut2_vhost1}} +| | And Interfaces are added to BD | ${dut2_node} | ${bd_id2} +| | ... | ${dut2s_vxlan} | ${${dut2_vhost2}} +| | Then Send and receive ICMPv6 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Show vpp trace dump on all DUTs +| | ... | AND | Run keyword | Qemu Teardown | ${dut1_node} +| | ... | ${${qemu1}} | ${qemu1} +| | ... | AND | Run keyword | Qemu Teardown | ${dut2_node} +| | ... | ${${qemu2}} | ${qemu2} +| | ... | AND | Check VPP PID in Teardown diff --git a/tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-func.robot b/tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-func.robot new file mode 100644 index 0000000000..23b88d45f2 --- /dev/null +++ b/tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-func.robot @@ -0,0 +1,78 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *Bridge-domain with VXLAN test cases - IPv6* +| ... +| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet encapsulations:* Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on +| ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for L2 switching of IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled; +| ... | VXLAN tunnels are configured between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent +| ... | in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv6 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 + +| ${bd_id1}= | 10 + +| ${ip6_addr1}= | 3ffe:64::1 +| ${ip6_addr2}= | 3ffe:64::2 +| ${ip6_prefix}= | 64 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels switch ICMPv6 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \ +| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2 +| | ... | configure L2 bridge-domain (MAC learning enabled), each with one +| | ... | interface to TG and one VXLAN tunnel interface towards the other +| | ... | DUT. [Ver] Make TG send ICMPv6 Echo Req between two of its +| | ... | interfaces to be switched by DUT1 and DUT2; verify all packets +| | ... | are received. [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_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 +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} +| | ... | ${ip6_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} +| | ... | ${ip6_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} +| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip6_addr1} | ${ip6_addr2} +| | And Interfaces are added to BD | ${dut1_node} | ${bd_id1} +| | ... | ${dut1_to_tg} | ${dut1s_vxlan} +| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip6_addr2} | ${ip6_addr1} +| | And Interfaces are added to BD | ${dut2_node} | ${bd_id1} +| | ... | ${dut2_to_tg} | ${dut2s_vxlan} +| | Then Send and receive ICMPv6 bidirectionally +| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot b/tests/func/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot new file mode 100644 index 0000000000..8afb22a717 --- /dev/null +++ b/tests/func/vxlan/eth4p-ethip4vxlan-l2bdbasemaclrn-l2shg-func.robot @@ -0,0 +1,200 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with SHG combined with VXLAN test cases - IPv4* +| ... +| ... | *[Top] Network topologies:* TG=DUT1=DUT2=TG 3-node circular topology +| ... | with double parallel links. +| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on +| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled +| ... | and Split Horizon Groups (SHG); VXLAN tunnels are configured +| ... | between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent +| ... | in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 +| ${vni_2}= | 35 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 +| ${bd_id3}= | 30 +| ${shg1}= | 1 +| ${shg2}= | 2 + +| ${ip4_addr1}= | 172.16.0.1 +| ${ip4_addr2}= | 172.16.0.2 +| ${ip4_prefix}= | 24 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in SHG switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2 +| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces +| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN +| | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure +| | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged +| | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make +| | ... | TG send ICMPv4 Echo Reqs between all four of its interfaces to be +| | ... | switched by DUT1 and DUT2; verify packets are not switched between +| | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1. +| | ... | [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given 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 +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} +| | ... | ${ip4_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} +| | ... | ${ip4_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} +| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up +| | And Vpp Node Interfaces Ready Wait | ${dut1_node} +| | And Vpp Node Interfaces Ready Wait | ${dut2_node} +| | And 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} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} +| | ... | ${bd_id1} | ${shg1} +| | 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} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} +| | ... | ${bd_id2} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} +| | ... | ${bd_id3} +| | 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_dut2_if1} +| | | ... | ${tg_to_dut2_if2} + +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in different SHGs switch ICMPv4 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ +| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2 +| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces +| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN +| | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2 +| | ... | configure two L2 bridge-domain (MAC learning enabled), each with one +| | ... | untagged interface to TG and one VXLAN interface towards the DUT1. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between all four of its interfaces +| | ... | to be switched by DUT1 and DUT2; verify packets are switched between +| | ... | all TG interfaces. [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given 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 +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} +| | ... | ${ip4_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} +| | ... | ${ip4_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} +| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} +| | | ... | ${ip4_addr1} | ${ip4_addr2} +| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} +| | | ... | ${ip4_addr2} | ${ip4_addr1} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up +| | And Vpp Node Interfaces Ready Wait | ${dut1_node} +| | And Vpp Node Interfaces Ready Wait | ${dut2_node} +| | And 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} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} +| | ... | ${bd_id1} | ${shg2} +| | 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} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} +| | ... | ${bd_id2} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} +| | ... | ${bd_id3} +| | 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 Send and receive ICMPv4 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut2_if1} +| | ... | ${tg_to_dut2_if2} diff --git a/tests/func/vxlan/eth4p-ethip6vxlan-l2bdbasemaclrn-l2shg-func.robot b/tests/func/vxlan/eth4p-ethip6vxlan-l2bdbasemaclrn-l2shg-func.robot new file mode 100644 index 0000000000..2ed07462cf --- /dev/null +++ b/tests/func/vxlan/eth4p-ethip6vxlan-l2bdbasemaclrn-l2shg-func.robot @@ -0,0 +1,200 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/testing_path.robot +| Resource | resources/libraries/robot/vxlan.robot +| Resource | resources/libraries/robot/l2_traffic.robot +| Resource | resources/libraries/robot/qemu.robot +| Resource | resources/libraries/robot/double_qemu_setup.robot +| Library | resources.libraries.python.Trace +| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown +| Documentation | *L2BD with SHG combined with VXLAN test cases - IPv6* +| ... +| ... | *[Top] Network topologies:* TG=DUT1=DUT2=TG 3-node circular topology +| ... | with double parallel links. +| ... | *[Enc] Packet encapsulations:* th-IPv6-VXLAN-Eth-IPv6-ICMPv6 on +| ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for L2 switching of IPv6. +| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 +| ... | bridge-domain (L2BD) switching combined with MAC learning enabled +| ... | and Split Horizon Groups (SHG); VXLAN tunnels are configured +| ... | between L2BDs on DUT1 and DUT2. +| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent +| ... | in both directions by TG on links to DUT1 and DUT2; on receive TG +| ... | verifies packets for correctness and their IPv6 src-addr, dst-addr +| ... | and MAC addresses. +| ... | *[Ref] Applicable standard specifications:* RFC7348. + +*** Variables *** +| ${vni_1}= | 23 +| ${vni_2}= | 35 + +| ${bd_id1}= | 10 +| ${bd_id2}= | 20 +| ${bd_id3}= | 30 +| ${shg1}= | 1 +| ${shg2}= | 2 + +| ${ip6_addr1}= | 3ffe:64::1 +| ${ip6_addr2}= | 3ffe:64::2 +| ${ip6_prefix}= | 64 + +*** Test Cases *** +| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in SHG switch ICMPv6 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \ +| | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2 +| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces +| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN +| | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure +| | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged +| | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make +| | ... | TG send ICMPv6 Echo Reqs between all four of its interfaces to be +| | ... | switched by DUT1 and DUT2; verify packets are not switched between +| | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1. +| | ... | [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given 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 +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} +| | ... | ${ip6_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} +| | ... | ${ip6_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} +| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip6_addr1} | ${ip6_addr2} +| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} +| | | ... | ${ip6_addr1} | ${ip6_addr2} +| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip6_addr2} | ${ip6_addr1} +| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} +| | | ... | ${ip6_addr2} | ${ip6_addr1} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up +| | And Vpp Node Interfaces Ready Wait | ${dut1_node} +| | And Vpp Node Interfaces Ready Wait | ${dut2_node} +| | And 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} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} +| | ... | ${bd_id1} | ${shg1} +| | 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} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} +| | ... | ${bd_id2} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} +| | ... | ${bd_id3} +| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if1} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if2} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if1} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if2} +| | And Run Keyword And Expect Error | ICMP echo Rx timeout +| | ... | Send and receive ICMPv6 bidirectionally +| | | ... | ${tg_node} | ${tg_to_dut2_if1} +| | | ... | ${tg_to_dut2_if2} + +| TC02: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in different SHGs switch ICMPv6 between TG links +| | [Documentation] +| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \ +| | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2 +| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces +| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN +| | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2 +| | ... | configure two L2 bridge-domain (MAC learning enabled), each with one +| | ... | untagged interface to TG and one VXLAN interface towards the DUT1. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between all four of its interfaces +| | ... | to be switched by DUT1 and DUT2; verify packets are switched between +| | ... | all TG interfaces. [Ref] RFC7348. +| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO +| | Given 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 +| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} +| | ... | ${ip6_prefix} +| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} +| | ... | ${ip6_prefix} +| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} +| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} +| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} +| | | ... | ${ip6_addr1} | ${ip6_addr2} +| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} +| | | ... | ${ip6_addr1} | ${ip6_addr2} +| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} +| | | ... | ${ip6_addr2} | ${ip6_addr1} +| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} +| | | ... | ${ip6_addr2} | ${ip6_addr1} +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up +| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up +| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up +| | And Vpp Node Interfaces Ready Wait | ${dut1_node} +| | And Vpp Node Interfaces Ready Wait | ${dut2_node} +| | And 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} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} +| | ... | ${bd_id1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} +| | ... | ${bd_id1} | ${shg1} +| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} +| | ... | ${bd_id1} | ${shg2} +| | 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} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} +| | ... | ${bd_id2} +| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} +| | ... | ${bd_id3} +| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} +| | ... | ${bd_id3} +| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if1} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if1} +| | ... | ${tg_to_dut2_if2} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if1} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut1_if2} +| | ... | ${tg_to_dut2_if2} +| | And Send and receive ICMPv6 bidirectionally | ${tg_node} +| | ... | ${tg_to_dut2_if1} +| | ... | ${tg_to_dut2_if2} diff --git a/tests/func/vxlan/vxlan_bd_dot1q.robot b/tests/func/vxlan/vxlan_bd_dot1q.robot deleted file mode 100644 index 592154845d..0000000000 --- a/tests/func/vxlan/vxlan_bd_dot1q.robot +++ /dev/null @@ -1,76 +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/testing_path.robot -| Resource | resources/libraries/robot/vxlan.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *RFC7348 VXLAN: Bridge-domain with VXLAN over VLAN test cases* -| ... -| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology with -| ... | single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on -| ... | DUT1-DUT2, Eth-dot1q-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) switching combined with static MACs, MAC learning -| ... | enabled and Split Horizon Groups (SHG) depending on test case; VXLAN -| ... | tunnels are configured between L2BDs on DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are -| ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG -| ... | verifies packets for correctness and their IPv4 src-addr, dst-addr and -| ... | MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC7348. - -*** Variables *** -| ${VNI}= | 23 -| ${BID}= | 23 -| ${VLAN}= | 10 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4oVLAN tunnels switch ICMPv4 between TG links -| | [Tags] | EXPECTED_FAILING -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on\ -| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 -| | ... | configure L2 bridge-domain (MAC learning enabled), each with one -| | ... | interface to TG and one VXLAN tunnel interface towards the other DUT -| | ... | over VLAN sub-interface. [Ver] Make TG send ICMPv4 Echo Req between -| | ... | two of its interfaces, verify all packets are received. [Ref] RFC7348. -| | Given Path for 3-node testing is set -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Interfaces in 3-node path are up -| | And Vlan interfaces for VXLAN are created | ${VLAN} -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | And IP addresses are set on interfaces -| | ... | ${dut1_node} | ${dut1s_vlan_name} | ${dut1s_vlan_index} -| | ... | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index} -| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${VNI} -| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan} -| | ... | up -| | And Interfaces are added to BD | ${dut1_node} | ${BID} -| | ... | ${dut1_to_tg} | ${dut1s_vxlan} -| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${VNI} -| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan} -| | ... | up -| | And Interfaces are added to BD | ${dut2_node} | ${BID} -| | ... | ${dut2_to_tg} | ${dut2s_vxlan} -| | Then Send and receive ICMPv4 bidirectionally -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} diff --git a/tests/func/vxlan/vxlan_bd_untagged.robot b/tests/func/vxlan/vxlan_bd_untagged.robot deleted file mode 100644 index 0bbe30c1a5..0000000000 --- a/tests/func/vxlan/vxlan_bd_untagged.robot +++ /dev/null @@ -1,406 +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/testing_path.robot -| Resource | resources/libraries/robot/vxlan.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *RFC7348 VXLAN: Bridge-domain with VXLAN test cases* -| ... -| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes; TG=DUT1=DUT2=TG 3-node circular -| ... | topology with double parallel links. -| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on -| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4; -| ... | Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on -| ... | TG-DUTn for L2 switching of IPv6. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | bridge-domain (L2BD) switching combined with static MACs, MAC learning -| ... | enabled and Split Horizon Groups (SHG) depending on test case; VXLAN -| ... | tunnels are configured between L2BDs on DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 (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:* RFC7348. - -*** Variables *** -| ${vni_1}= | 23 -| ${vni_2}= | 35 - -| ${bd_id1}= | 10 -| ${bd_id2}= | 20 -| ${bd_id3}= | 30 -| ${shg1}= | 1 -| ${shg2}= | 2 - -| ${ip4_addr1}= | 172.16.0.1 -| ${ip4_addr2}= | 172.16.0.2 -| ${ip4_prefix}= | 24 - -| ${ip6_addr1}= | 3ffe:64::1 -| ${ip6_addr2}= | 3ffe:64::2 -| ${ip6_prefix}= | 64 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels switch ICMPv4 between TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ -| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2 -| | ... | configure two i/fs into L2BD with MAC learning. [Ver] Make TG -| | ... | verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 in -| | ... | both directions and are correct on receive. [Ref] RFC7348. -| | Given 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_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2} -| | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1} -| | And IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE} -| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} -| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} -| | And Interfaces are added to BD | ${dut1_node} | ${bd_id1} -| | ... | ${dut1_to_tg} | ${dut1s_vxlan} -| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} -| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} -| | And Interfaces are added to BD | ${dut2_node} | ${bd_id1} -| | ... | ${dut2_to_tg} | ${dut2s_vxlan} -| | Then Send and receive ICMPv4 bidirectionally -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} - -| TC02: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in SHG switch ICMPv4 between TG links -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ -| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2 -| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces -| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN -| | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure -| | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged -| | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make -| | ... | TG send ICMPv4 Echo Reqs between all four of its interfaces to be -| | ... | switched by DUT1 and DUT2; verify packets are not switched between -| | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1. -| | ... | [Ref] RFC7348. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given 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 -| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} -| | ... | ${ip4_prefix} -| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} -| | ... | ${ip4_prefix} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} -| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} -| | | ... | ${ip4_addr1} | ${ip4_addr2} -| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} -| | | ... | ${ip4_addr1} | ${ip4_addr2} -| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} -| | | ... | ${ip4_addr2} | ${ip4_addr1} -| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} -| | | ... | ${ip4_addr2} | ${ip4_addr1} -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up -| | And Vpp Node Interfaces Ready Wait | ${dut1_node} -| | And Vpp Node Interfaces Ready Wait | ${dut2_node} -| | And 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} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} -| | ... | ${bd_id1} | ${shg1} -| | 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} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} -| | ... | ${bd_id2} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} -| | ... | ${bd_id3} -| | 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_dut2_if1} -| | | ... | ${tg_to_dut2_if2} - -| TC03: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in different SHGs switch ICMPv4 between TG links -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ -| | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2 -| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces -| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN -| | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2 -| | ... | configure two L2 bridge-domain (MAC learning enabled), each with one -| | ... | untagged interface to TG and one VXLAN interface towards the DUT1. -| | ... | [Ver] Make TG send ICMPv4 Echo Req between all four of its interfaces -| | ... | to be switched by DUT1 and DUT2; verify packets are switched between -| | ... | all TG interfaces. [Ref] RFC7348. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given 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 -| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1} -| | ... | ${ip4_prefix} -| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2} -| | ... | ${ip4_prefix} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1} -| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} -| | | ... | ${ip4_addr1} | ${ip4_addr2} -| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} -| | | ... | ${ip4_addr1} | ${ip4_addr2} -| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} -| | | ... | ${ip4_addr2} | ${ip4_addr1} -| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} -| | | ... | ${ip4_addr2} | ${ip4_addr1} -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up -| | And Vpp Node Interfaces Ready Wait | ${dut1_node} -| | And Vpp Node Interfaces Ready Wait | ${dut2_node} -| | And 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} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} -| | ... | ${bd_id1} | ${shg2} -| | 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} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} -| | ... | ${bd_id2} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} -| | ... | ${bd_id3} -| | 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 Send and receive ICMPv4 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut2_if1} -| | ... | ${tg_to_dut2_if2} - -| TC04: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels switch ICMPv6 between TG links -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \ -| | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2 -| | ... | configure L2 bridge-domain (MAC learning enabled), each with one -| | ... | interface to TG and one VXLAN tunnel interface towards the other -| | ... | DUT. [Ver] Make TG send ICMPv6 Echo Req between two of its -| | ... | interfaces to be switched by DUT1 and DUT2; verify all packets -| | ... | are received. [Ref] RFC7348. -| | [Tags] | 3_NODE_DOUBLE_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 -| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} -| | ... | ${ip6_prefix} -| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} -| | ... | ${ip6_prefix} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} -| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} -| | | ... | ${ip6_addr1} | ${ip6_addr2} -| | And Interfaces are added to BD | ${dut1_node} | ${bd_id1} -| | ... | ${dut1_to_tg} | ${dut1s_vxlan} -| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} -| | | ... | ${ip6_addr2} | ${ip6_addr1} -| | And Interfaces are added to BD | ${dut2_node} | ${bd_id1} -| | ... | ${dut2_to_tg} | ${dut2s_vxlan} -| | Then Send and receive ICMPv6 bidirectionally -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} - -| TC05: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in SHG switch ICMPv6 between TG links -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \ -| | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2 -| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces -| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN -| | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure -| | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged -| | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make -| | ... | TG send ICMPv6 Echo Reqs between all four of its interfaces to be -| | ... | switched by DUT1 and DUT2; verify packets are not switched between -| | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1. -| | ... | [Ref] RFC7348. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given 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 -| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} -| | ... | ${ip6_prefix} -| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} -| | ... | ${ip6_prefix} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} -| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} -| | | ... | ${ip6_addr1} | ${ip6_addr2} -| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} -| | | ... | ${ip6_addr1} | ${ip6_addr2} -| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} -| | | ... | ${ip6_addr2} | ${ip6_addr1} -| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} -| | | ... | ${ip6_addr2} | ${ip6_addr1} -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up -| | And Vpp Node Interfaces Ready Wait | ${dut1_node} -| | And Vpp Node Interfaces Ready Wait | ${dut2_node} -| | And 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} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} -| | ... | ${bd_id1} | ${shg1} -| | 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} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} -| | ... | ${bd_id2} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} -| | ... | ${bd_id3} -| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if1} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if2} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if1} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if2} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send and receive ICMPv6 bidirectionally -| | | ... | ${tg_node} | ${tg_to_dut2_if1} -| | | ... | ${tg_to_dut2_if2} - -| TC06: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in different SHGs switch ICMPv6 between TG links -| | [Documentation] -| | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \ -| | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2 -| | ... | bridge-domain (MAC learning enabled) with two untagged interfaces -| | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN -| | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2 -| | ... | configure two L2 bridge-domain (MAC learning enabled), each with one -| | ... | untagged interface to TG and one VXLAN interface towards the DUT1. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between all four of its interfaces -| | ... | to be switched by DUT1 and DUT2; verify packets are switched between -| | ... | all TG interfaces. [Ref] RFC7348. -| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO -| | Given 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 -| | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1} -| | ... | ${ip6_prefix} -| | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2} -| | ... | ${ip6_prefix} -| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2} -| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1} -| | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1} -| | | ... | ${ip6_addr1} | ${ip6_addr2} -| | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2} -| | | ... | ${ip6_addr1} | ${ip6_addr2} -| | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1} -| | | ... | ${ip6_addr2} | ${ip6_addr1} -| | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2} -| | | ... | ${ip6_addr2} | ${ip6_addr1} -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up -| | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up -| | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up -| | And Vpp Node Interfaces Ready Wait | ${dut1_node} -| | And Vpp Node Interfaces Ready Wait | ${dut2_node} -| | And 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} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2} -| | ... | ${bd_id1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1} -| | ... | ${bd_id1} | ${shg1} -| | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2} -| | ... | ${bd_id1} | ${shg2} -| | 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} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1} -| | ... | ${bd_id2} -| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2} -| | ... | ${bd_id3} -| | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2} -| | ... | ${bd_id3} -| | Then Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if1} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if1} -| | ... | ${tg_to_dut2_if2} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if1} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut1_if2} -| | ... | ${tg_to_dut2_if2} -| | And Send and receive ICMPv6 bidirectionally | ${tg_node} -| | ... | ${tg_to_dut2_if1} -| | ... | ${tg_to_dut2_if2} diff --git a/tests/func/vxlan/vxlan_xconnect_untagged.robot b/tests/func/vxlan/vxlan_xconnect_untagged.robot deleted file mode 100644 index de38c56b2d..0000000000 --- a/tests/func/vxlan/vxlan_xconnect_untagged.robot +++ /dev/null @@ -1,66 +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/testing_path.robot -| Resource | resources/libraries/robot/vxlan.robot -| Resource | resources/libraries/robot/l2_traffic.robot -| Library | resources.libraries.python.Trace -| Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV -| Test Setup | Func Test Setup -| Test Teardown | Func Test Teardown -| Documentation | *RFC7348 VXLAN: L2 cross-connect with VXLAN test cases* -| ... -| ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on -| ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4. -| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 -| ... | cross-connect (L2XC) switching; VXLAN tunnels are configured between -| ... | L2XCs on DUT1 and DUT2. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets -| ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive -| ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr -| ... | and MAC addresses. -| ... | *[Ref] Applicable standard specifications:* RFC7348. - -*** Variables *** -| ${VNI}= | 24 - -*** Test Cases *** -| TC01: DUT1 and DUT2 with L2XC and VXLANoIPv4 tunnels switch ICMPv4 between TG links -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \ -| | ... | [Ref] RFC7348.DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On -| | ... | DUT1 and DUT2 configure L2 cross-connect (L2XC), each with one -| | ... | interface to TG and one VXLAN tunnel interface towards the other -| | ... | DUT. [Ver] Make TG send ICMPv4 Echo Req between two of its -| | ... | interfaces; verify all packets are received. [Ref] RFC7348. -| | Given 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_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2} -| | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1} -| | And IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE} -| | ... | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE} -| | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${VNI} -| | | ... | ${dut1s_ip_address} | ${dut2s_ip_address} -| | And Interfaces are added to xconnect | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1s_vxlan} -| | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${VNI} -| | | ... | ${dut2s_ip_address} | ${dut1s_ip_address} -| | And Interfaces are added to xconnect | ${dut2_node} -| | ... | ${dut2_to_tg} | ${dut2s_vxlan} -| | Then Send and receive ICMPv4 bidirectionally -| | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -- cgit 1.2.3-korg