aboutsummaryrefslogtreecommitdiffstats
path: root/tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2017-01-17 14:50:46 +0100
committerJan Gelety <jgelety@cisco.com>2017-01-24 15:35:34 +0000
commit982e81efab69bc007455481b6425fcebc7213906 (patch)
tree27f320b8b2508fbc7716aa682f51cf3cb9449de3 /tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot
parentc232d04e7a5bffb72063240ee7e15967f46c4873 (diff)
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 <jgelety@cisco.com>
Diffstat (limited to 'tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot')
-rw-r--r--tests/func/softwire/eth2p-ethip4--ethip6ip4-ip4base--ip6base-swirelw46-func.robot209
1 files changed, 209 insertions, 0 deletions
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}