CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / tests / vpp / func / vm_vhost / l2bd / eth2p-ethip6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/shared/default.robot
16 | Resource | resources/libraries/robot/shared/testing_path.robot
17 | Resource | resources/libraries/robot/overlay/vxlan.robot
18 | Resource | resources/libraries/robot/l2/l2_traffic.robot
19 | Resource | resources/libraries/robot/vm/qemu.robot
20 | Resource | resources/libraries/robot/vm/double_qemu_setup.robot
21 | Library  | resources.libraries.python.Trace
22 | Library | resources.libraries.python.IPv6Setup
23 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV
24 | Test Setup | Set up functional test
25 | Test Teardown | Run Keywords | Tear down functional test
26 | ... | AND | Run keyword | Tear down QEMU | ${dut1_node}
27 | ...                                     | ${${qemu1}} | ${qemu1}
28 | ... | AND | Run keyword | Tear down QEMU | ${dut2_node}
29 | ...                                     | ${${qemu2}} | ${qemu2}
30 | Documentation | *L2BD with VM combined with VXLAN test cases - IPv6*
31 | ...
32 | ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology
33 | ... | with single links between nodes.
34 | ... | *[Enc] Packet encapsulations:* Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on
35 | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for L2 switching of IPv6.
36 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
37 | ... | bridge-domain (L2BD) switching combined with MAC learning enabled;
38 | ... | VXLAN tunnels are configured between L2BDs on DUT1 and DUT2.
39 | ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent
40 | ... | in both directions by TG on links to DUT1 and DUT2; on receive TG
41 | ... | verifies packets for correctness and their IPv6 src-addr, dst-addr
42 | ... | and MAC addresses.
43 | ... | *[Ref] Applicable standard specifications:* RFC7348.
44
45 *** Variables ***
46 | ${vni_1}= | 23
47
48 | ${bd_id1}= | 10
49 | ${bd_id2}= | 20
50
51 | ${ip6_addr1}= | 3ffe:64::1
52 | ${ip6_addr2}= | 3ffe:64::2
53 | ${ip6_prefix}= | 64
54
55 | ${sock1}= | /tmp/sock1
56 | ${sock2}= | /tmp/sock2
57
58 | ${qemu1}= | qemu_instance_1
59 | ${qemu2}= | qemu_instance_2
60
61 | ${dut1_vhost1}= | dut1_vhost_if1
62 | ${dut1_vhost2}= | dut1_vhost_if2
63 | ${dut2_vhost1}= | dut2_vhost_if1
64 | ${dut2_vhost2}= | dut2_vhost_if2
65
66 *** Test Cases ***
67 | TC01:DUT1 and DUT2 with two L2BDs and VXLANoIPv6 tunnel switch ICMPv6 between TG links and VM links
68 | | [Documentation]
69 | | ... | [Top] TG-DUT1-VM-DUT1-DUT2-VM-DUT2-TG.
70 | | ... | [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on DUT1-DUT2; Eth-IPv4-ICMPv4
71 | | ... | on TG-DUTn and DUTn=VM.
72 | | ... | [Cfg] On both DUTs configure two L2BDs (MAC learning enabled); first
73 | | ... | L2BD with untagged interface to TG and vhost-user interface to local
74 | | ... | VM, second one with vhost-user interface to local VM and VXLAN
75 | | ... | interface towards the other DUT. Configure linux bridge on both VMs
76 | | ... | to pass traffic between both vhost-user interfaces.
77 | | ... | [Ver] Make TG send ICMPv6 Echo Req between two of its interfaces to
78 | | ... | be switched by DUT1 and DUT2; verify packets are switched between
79 | | ... | these TG interfaces.
80 | | ... | [Ref] RFC7348.
81 | | [Tags] | VPP_VM_ENV
82 | | Given Configure path in 3-node circular topology
83 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
84 | | And Set interfaces in 3-node circular topology up
85 | | When Configure vhost interfaces for L2BD forwarding | ${dut1_node}
86 | | ...                                                     | ${sock1}
87 | | ...                                                     | ${sock2}
88 | | ...                                                     | ${dut1_vhost1}
89 | | ...                                                     | ${dut1_vhost2}
90 | | And Configure vhost interfaces for L2BD forwarding | ${dut2_node}
91 | | ...                                                    | ${sock1}
92 | | ...                                                    | ${sock2}
93 | | ...                                                    | ${dut2_vhost1}
94 | | ...                                                    | ${dut2_vhost2}
95 | | And Configure VM for vhost L2BD forwarding | ${dut1_node} | ${sock1}
96 | | ...                                       | ${sock2} | ${qemu1}
97 | | And Configure VM for vhost L2BD forwarding | ${dut2_node} | ${sock1}
98 | | ...                                       | ${sock2} | ${qemu2}
99 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
100 | | ...                       | ${ip6_prefix}
101 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
102 | | ...                       | ${ip6_prefix}
103 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
104 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
105 | | And Vpp All RA Suppress Link Layer | ${nodes}
106 | | ${dut1s_vxlan}= | And Create VXLAN interface | ${dut1_node} | ${vni_1}
107 | |                 | ...                        | ${ip6_addr1} | ${ip6_addr2}
108 | | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
109 | |                 | ...                        | ${ip6_addr2} | ${ip6_addr1}
110 | | And Add interfaces to L2BD | ${dut1_node} | ${bd_id1}
111 | | ...                            | ${dut1_to_tg} | ${${dut1_vhost1}}
112 | | And Add interfaces to L2BD | ${dut1_node} | ${bd_id2}
113 | | ...                            | ${dut1s_vxlan} | ${${dut1_vhost2}}
114 | | And Add interfaces to L2BD | ${dut2_node} | ${bd_id1}
115 | | ...                            | ${dut2_to_tg} | ${${dut2_vhost1}}
116 | | And Add interfaces to L2BD | ${dut2_node} | ${bd_id2}
117 | | ...                            | ${dut2s_vxlan} | ${${dut2_vhost2}}
118 | | Then Send ICMPv6 bidirectionally and verify received packets
119 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}