2ed07462cf4c7f0f2f7375d4d85d4b682419a65f
[csit.git] / tests / func / vxlan / eth4p-ethip6vxlan-l2bdbasemaclrn-l2shg-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/default.robot
16 | Resource | resources/libraries/robot/testing_path.robot
17 | Resource | resources/libraries/robot/vxlan.robot
18 | Resource | resources/libraries/robot/l2_traffic.robot
19 | Resource | resources/libraries/robot/qemu.robot
20 | Resource | resources/libraries/robot/double_qemu_setup.robot
21 | Library  | resources.libraries.python.Trace
22 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV
23 | Test Setup | Func Test Setup
24 | Test Teardown | Func Test Teardown
25 | Documentation | *L2BD with SHG combined with VXLAN test cases - IPv6*
26 | ...
27 | ... | *[Top] Network topologies:* TG=DUT1=DUT2=TG 3-node circular topology
28 | ... | with double parallel links.
29 | ... | *[Enc] Packet encapsulations:* th-IPv6-VXLAN-Eth-IPv6-ICMPv6 on
30 | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for L2 switching of IPv6.
31 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
32 | ... | bridge-domain (L2BD) switching combined with MAC learning enabled
33 | ... | and Split Horizon Groups (SHG); VXLAN tunnels are configured
34 | ... | between L2BDs on DUT1 and DUT2.
35 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent
36 | ... | in both directions by TG on links to DUT1 and DUT2; on receive TG
37 | ... | verifies packets for correctness and their IPv6 src-addr, dst-addr
38 | ... | and MAC addresses.
39 | ... | *[Ref] Applicable standard specifications:* RFC7348.
40
41 *** Variables ***
42 | ${vni_1}= | 23
43 | ${vni_2}= | 35
44
45 | ${bd_id1}= | 10
46 | ${bd_id2}= | 20
47 | ${bd_id3}= | 30
48 | ${shg1}= | 1
49 | ${shg2}= | 2
50
51 | ${ip6_addr1}= | 3ffe:64::1
52 | ${ip6_addr2}= | 3ffe:64::2
53 | ${ip6_prefix}= | 64
54
55 *** Test Cases ***
56 | TC01: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in SHG switch ICMPv6 between TG links
57 | | [Documentation]
58 | | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
59 | | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2
60 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
61 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
62 | | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure
63 | | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged
64 | | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make
65 | | ... | TG send ICMPv6 Echo Reqs between all four of its interfaces to be
66 | | ... | switched by DUT1 and DUT2; verify packets are not switched between
67 | | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1.
68 | | ... | [Ref] RFC7348.
69 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
70 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
71 | | ...                                         | ${nodes['DUT1']}
72 | | ...                                         | ${nodes['DUT2']}
73 | | And Interfaces in 3-node BD-SHG testing are up
74 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
75 | | ...                       | ${ip6_prefix}
76 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
77 | | ...                       | ${ip6_prefix}
78 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
79 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
80 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
81 | | | ...                                          | ${ip6_addr1} | ${ip6_addr2}
82 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
83 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
84 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
85 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
86 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
87 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
88 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
89 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
90 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
91 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
92 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
93 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
94 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
95 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
96 | | ...                                     | ${bd_id1}
97 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
98 | | ...                                     | ${bd_id1}
99 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
100 | | ...                                     | ${bd_id1} | ${shg1}
101 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
102 | | ...                                     | ${bd_id1} | ${shg1}
103 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
104 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
105 | | ...                                     | ${bd_id2}
106 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
107 | | ...                                     | ${bd_id2}
108 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3}
109 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
110 | | ...                                     | ${bd_id3}
111 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
112 | | ...                                     | ${bd_id3}
113 | | Then Send and receive ICMPv6 bidirectionally | ${tg_node}
114 | | ...                                          | ${tg_to_dut1_if1}
115 | | ...                                          | ${tg_to_dut2_if1}
116 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
117 | | ...                                         | ${tg_to_dut1_if1}
118 | | ...                                         | ${tg_to_dut2_if2}
119 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
120 | | ...                                         | ${tg_to_dut1_if2}
121 | | ...                                         | ${tg_to_dut2_if1}
122 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
123 | | ...                                         | ${tg_to_dut1_if2}
124 | | ...                                         | ${tg_to_dut2_if2}
125 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
126 | | ...                              | Send and receive ICMPv6 bidirectionally
127 | | | ...                            | ${tg_node} | ${tg_to_dut2_if1}
128 | | | ...                            | ${tg_to_dut2_if2}
129
130 | TC02: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in different SHGs switch ICMPv6 between TG links
131 | | [Documentation]
132 | | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
133 | | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2
134 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
135 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
136 | | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2
137 | | ... | configure two L2 bridge-domain (MAC learning enabled), each with one
138 | | ... | untagged interface to TG and one VXLAN interface towards the DUT1.
139 | | ... | [Ver] Make TG send ICMPv6 Echo Req between all four of its interfaces
140 | | ... | to be switched by DUT1 and DUT2; verify packets are switched between
141 | | ... | all TG interfaces. [Ref] RFC7348.
142 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
143 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
144 | | ...                                         | ${nodes['DUT1']}
145 | | ...                                         | ${nodes['DUT2']}
146 | | And Interfaces in 3-node BD-SHG testing are up
147 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
148 | | ...                       | ${ip6_prefix}
149 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
150 | | ...                       | ${ip6_prefix}
151 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
152 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
153 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
154 | | | ...                                          | ${ip6_addr1} | ${ip6_addr2}
155 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
156 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
157 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
158 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
159 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
160 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
161 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
162 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
163 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
164 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
165 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
166 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
167 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
168 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
169 | | ...                                     | ${bd_id1}
170 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
171 | | ...                                     | ${bd_id1}
172 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
173 | | ...                                     | ${bd_id1} | ${shg1}
174 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
175 | | ...                                     | ${bd_id1} | ${shg2}
176 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
177 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
178 | | ...                                     | ${bd_id2}
179 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
180 | | ...                                     | ${bd_id2}
181 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3}
182 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
183 | | ...                                     | ${bd_id3}
184 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
185 | | ...                                     | ${bd_id3}
186 | | Then Send and receive ICMPv6 bidirectionally | ${tg_node}
187 | | ...                                          | ${tg_to_dut1_if1}
188 | | ...                                          | ${tg_to_dut2_if1}
189 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
190 | | ...                                         | ${tg_to_dut1_if1}
191 | | ...                                         | ${tg_to_dut2_if2}
192 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
193 | | ...                                         | ${tg_to_dut1_if2}
194 | | ...                                         | ${tg_to_dut2_if1}
195 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
196 | | ...                                         | ${tg_to_dut1_if2}
197 | | ...                                         | ${tg_to_dut2_if2}
198 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
199 | | ...                                         | ${tg_to_dut2_if1}
200 | | ...                                         | ${tg_to_dut2_if2}