VIRL test: VXLAN-L2BD-vhos_user test (CSIT-500)
[csit.git] / tests / func / vxlan / vxlan_bd_untagged.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 | *RFC7348 VXLAN: Bridge-domain with VXLAN test cases*
26 | ...
27 | ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology
28 | ... | with single links between nodes; TG=DUT1=DUT2=TG 3-node circular
29 | ... | topology with double parallel links.
30 | ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on
31 | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4;
32 | ... | Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on
33 | ... | TG-DUTn for L2 switching of IPv6.
34 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
35 | ... | bridge-domain (L2BD) switching combined with static MACs, MAC learning
36 | ... | enabled and Split Horizon Groups (SHG) depending on test case; VXLAN
37 | ... | tunnels are configured between L2BDs on DUT1 and DUT2.
38 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets
39 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive
40 | ... | TG verifies packets for correctness and their IPv4 (IPv6) src-addr,
41 | ... | dst-addr and MAC addresses.
42 | ... | *[Ref] Applicable standard specifications:* RFC7348.
43
44 *** Variables ***
45 | ${vni_1}= | 23
46 | ${vni_2}= | 35
47
48 | ${bd_id1}= | 10
49 | ${bd_id2}= | 20
50 | ${bd_id3}= | 30
51 | ${shg1}= | 1
52 | ${shg2}= | 2
53
54 | ${ip4_addr1}= | 172.16.0.1
55 | ${ip4_addr2}= | 172.16.0.2
56 | ${ip4_prefix}= | 24
57
58 | ${ip6_addr1}= | 3ffe:64::1
59 | ${ip6_addr2}= | 3ffe:64::2
60 | ${ip6_prefix}= | 64
61
62 | ${sock1}= | /tmp/sock1
63 | ${sock2}= | /tmp/sock2
64
65 | ${qemu1}= | qemu_instance_1
66 | ${qemu2}= | qemu_instance_2
67
68 | ${dut1_vhost1}= | dut1_vhost_if1
69 | ${dut1_vhost2}= | dut1_vhost_if2
70 | ${dut2_vhost1}= | dut2_vhost_if1
71 | ${dut2_vhost2}= | dut2_vhost_if2
72
73 *** Test Cases ***
74 | TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels switch ICMPv4 between TG links
75 | | [Documentation]
76 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \
77 | | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2
78 | | ... | configure two i/fs into L2BD with MAC learning. [Ver] Make TG
79 | | ... | verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 in
80 | | ... | both directions and are correct on receive. [Ref] RFC7348.
81 | | Given Path for 3-node testing is set
82 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
83 | | And Interfaces in 3-node path are up
84 | | ${dut1_to_dut2_name}= | Get interface name | ${dut1_node} | ${dut1_to_dut2}
85 | | ${dut2_to_dut1_name}= | Get interface name | ${dut2_node} | ${dut2_to_dut1}
86 | | And IP addresses are set on interfaces | ${dut1_node} | ${dut1_to_dut2_name} | ${NONE}
87 | | ...                                    | ${dut2_node} | ${dut2_to_dut1_name} | ${NONE}
88 | | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${vni_1}
89 | |                 | ... | ${dut1s_ip_address} | ${dut2s_ip_address}
90 | | And Interfaces are added to BD | ${dut1_node} | ${bd_id1}
91 | | ...                            | ${dut1_to_tg} | ${dut1s_vxlan}
92 | | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
93 | |                 | ... | ${dut2s_ip_address} | ${dut1s_ip_address}
94 | | And Interfaces are added to BD | ${dut2_node} | ${bd_id1}
95 | | ...                            | ${dut2_to_tg} | ${dut2s_vxlan}
96 | | Then Send and receive ICMPv4 bidirectionally
97 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
98
99 | TC02: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in SHG switch ICMPv4 between TG links
100 | | [Documentation]
101 | | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \
102 | | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2
103 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
104 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
105 | | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure
106 | | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged
107 | | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make
108 | | ... | TG send ICMPv4 Echo Reqs between all four of its interfaces to be
109 | | ... | switched by DUT1 and DUT2; verify packets are not switched between
110 | | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1.
111 | | ... | [Ref] RFC7348.
112 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
113 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
114 | | ...                                         | ${nodes['DUT1']}
115 | | ...                                         | ${nodes['DUT2']}
116 | | And Interfaces in 3-node BD-SHG testing are up
117 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1}
118 | | ...                       | ${ip4_prefix}
119 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2}
120 | | ...                       | ${ip4_prefix}
121 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2}
122 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1}
123 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
124 | | | ...                                          | ${ip4_addr1} | ${ip4_addr2}
125 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
126 | | | ...                                         | ${ip4_addr1} | ${ip4_addr2}
127 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
128 | | | ...                                         | ${ip4_addr2} | ${ip4_addr1}
129 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
130 | | | ...                                         | ${ip4_addr2} | ${ip4_addr1}
131 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
132 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
133 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
134 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
135 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
136 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
137 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
138 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
139 | | ...                                     | ${bd_id1}
140 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
141 | | ...                                     | ${bd_id1}
142 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
143 | | ...                                     | ${bd_id1} | ${shg1}
144 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
145 | | ...                                     | ${bd_id1} | ${shg1}
146 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
147 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
148 | | ...                                     | ${bd_id2}
149 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
150 | | ...                                     | ${bd_id2}
151 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3}
152 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
153 | | ...                                     | ${bd_id3}
154 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
155 | | ...                                     | ${bd_id3}
156 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node}
157 | | ...                                          | ${tg_to_dut1_if1}
158 | | ...                                          | ${tg_to_dut2_if1}
159 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
160 | | ...                                         | ${tg_to_dut1_if1}
161 | | ...                                         | ${tg_to_dut2_if2}
162 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
163 | | ...                                         | ${tg_to_dut1_if2}
164 | | ...                                         | ${tg_to_dut2_if1}
165 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
166 | | ...                                         | ${tg_to_dut1_if2}
167 | | ...                                         | ${tg_to_dut2_if2}
168 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
169 | | ...                              | Send and receive ICMPv4 bidirectionally
170 | | | ...                            | ${tg_node} | ${tg_to_dut2_if1}
171 | | | ...                            | ${tg_to_dut2_if2}
172
173 | TC03: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in different SHGs switch ICMPv4 between TG links
174 | | [Documentation]
175 | | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \
176 | | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2
177 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
178 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
179 | | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2
180 | | ... | configure two L2 bridge-domain (MAC learning enabled), each with one
181 | | ... | untagged interface to TG and one VXLAN interface towards the DUT1.
182 | | ... | [Ver] Make TG send ICMPv4 Echo Req between all four of its interfaces
183 | | ... | to be switched by DUT1 and DUT2; verify packets are switched between
184 | | ... | all TG interfaces. [Ref] RFC7348.
185 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
186 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
187 | | ...                                         | ${nodes['DUT1']}
188 | | ...                                         | ${nodes['DUT2']}
189 | | And Interfaces in 3-node BD-SHG testing are up
190 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1}
191 | | ...                       | ${ip4_prefix}
192 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2}
193 | | ...                       | ${ip4_prefix}
194 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2}
195 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1}
196 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
197 | | | ...                                          | ${ip4_addr1} | ${ip4_addr2}
198 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
199 | | | ...                                         | ${ip4_addr1} | ${ip4_addr2}
200 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
201 | | | ...                                         | ${ip4_addr2} | ${ip4_addr1}
202 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
203 | | | ...                                         | ${ip4_addr2} | ${ip4_addr1}
204 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
205 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
206 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
207 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
208 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
209 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
210 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
211 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
212 | | ...                                     | ${bd_id1}
213 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
214 | | ...                                     | ${bd_id1}
215 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
216 | | ...                                     | ${bd_id1} | ${shg1}
217 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
218 | | ...                                     | ${bd_id1} | ${shg2}
219 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
220 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
221 | | ...                                     | ${bd_id2}
222 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
223 | | ...                                     | ${bd_id2}
224 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3}
225 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
226 | | ...                                     | ${bd_id3}
227 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
228 | | ...                                     | ${bd_id3}
229 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node}
230 | | ...                                          | ${tg_to_dut1_if1}
231 | | ...                                          | ${tg_to_dut2_if1}
232 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
233 | | ...                                         | ${tg_to_dut1_if1}
234 | | ...                                         | ${tg_to_dut2_if2}
235 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
236 | | ...                                         | ${tg_to_dut1_if2}
237 | | ...                                         | ${tg_to_dut2_if1}
238 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
239 | | ...                                         | ${tg_to_dut1_if2}
240 | | ...                                         | ${tg_to_dut2_if2}
241 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
242 | | ...                                         | ${tg_to_dut2_if1}
243 | | ...                                         | ${tg_to_dut2_if2}
244
245 | TC04: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels switch ICMPv6 between TG links
246 | | [Documentation]
247 | | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
248 | | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2
249 | | ... | configure L2 bridge-domain (MAC learning enabled), each with one
250 | | ... | interface to TG and one VXLAN tunnel interface towards the other
251 | | ... | DUT. [Ver] Make TG send ICMPv6 Echo Req between two of its
252 | | ... | interfaces to be switched by DUT1 and DUT2; verify all packets
253 | | ... | are received. [Ref] RFC7348.
254 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
255 | | Given Path for 3-node testing is set
256 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
257 | | And Interfaces in 3-node path are up
258 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
259 | | ...                       | ${ip6_prefix}
260 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
261 | | ...                       | ${ip6_prefix}
262 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
263 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
264 | | ${dut1s_vxlan}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
265 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
266 | | And Interfaces are added to BD | ${dut1_node} | ${bd_id1}
267 | | ...                            | ${dut1_to_tg} | ${dut1s_vxlan}
268 | | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
269 | | | ...                                        | ${ip6_addr2} | ${ip6_addr1}
270 | | And Interfaces are added to BD | ${dut2_node} | ${bd_id1}
271 | | ...                            | ${dut2_to_tg} | ${dut2s_vxlan}
272 | | Then Send and receive ICMPv6 bidirectionally
273 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
274
275 | TC05: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in SHG switch ICMPv6 between TG links
276 | | [Documentation]
277 | | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
278 | | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2
279 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
280 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
281 | | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure
282 | | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged
283 | | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make
284 | | ... | TG send ICMPv6 Echo Reqs between all four of its interfaces to be
285 | | ... | switched by DUT1 and DUT2; verify packets are not switched between
286 | | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1.
287 | | ... | [Ref] RFC7348.
288 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
289 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
290 | | ...                                         | ${nodes['DUT1']}
291 | | ...                                         | ${nodes['DUT2']}
292 | | And Interfaces in 3-node BD-SHG testing are up
293 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
294 | | ...                       | ${ip6_prefix}
295 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
296 | | ...                       | ${ip6_prefix}
297 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
298 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
299 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
300 | | | ...                                          | ${ip6_addr1} | ${ip6_addr2}
301 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
302 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
303 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
304 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
305 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
306 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
307 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
308 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
309 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
310 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
311 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
312 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
313 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
314 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
315 | | ...                                     | ${bd_id1}
316 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
317 | | ...                                     | ${bd_id1}
318 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
319 | | ...                                     | ${bd_id1} | ${shg1}
320 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
321 | | ...                                     | ${bd_id1} | ${shg1}
322 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
323 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
324 | | ...                                     | ${bd_id2}
325 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
326 | | ...                                     | ${bd_id2}
327 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3}
328 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
329 | | ...                                     | ${bd_id3}
330 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
331 | | ...                                     | ${bd_id3}
332 | | Then Send and receive ICMPv6 bidirectionally | ${tg_node}
333 | | ...                                          | ${tg_to_dut1_if1}
334 | | ...                                          | ${tg_to_dut2_if1}
335 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
336 | | ...                                         | ${tg_to_dut1_if1}
337 | | ...                                         | ${tg_to_dut2_if2}
338 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
339 | | ...                                         | ${tg_to_dut1_if2}
340 | | ...                                         | ${tg_to_dut2_if1}
341 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
342 | | ...                                         | ${tg_to_dut1_if2}
343 | | ...                                         | ${tg_to_dut2_if2}
344 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
345 | | ...                              | Send and receive ICMPv6 bidirectionally
346 | | | ...                            | ${tg_node} | ${tg_to_dut2_if1}
347 | | | ...                            | ${tg_to_dut2_if2}
348
349 | TC06: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in different SHGs switch ICMPv6 between TG links
350 | | [Documentation]
351 | | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
352 | | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2
353 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
354 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
355 | | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2
356 | | ... | configure two L2 bridge-domain (MAC learning enabled), each with one
357 | | ... | untagged interface to TG and one VXLAN interface towards the DUT1.
358 | | ... | [Ver] Make TG send ICMPv6 Echo Req between all four of its interfaces
359 | | ... | to be switched by DUT1 and DUT2; verify packets are switched between
360 | | ... | all TG interfaces. [Ref] RFC7348.
361 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
362 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
363 | | ...                                         | ${nodes['DUT1']}
364 | | ...                                         | ${nodes['DUT2']}
365 | | And Interfaces in 3-node BD-SHG testing are up
366 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
367 | | ...                       | ${ip6_prefix}
368 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
369 | | ...                       | ${ip6_prefix}
370 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
371 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
372 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
373 | | | ...                                          | ${ip6_addr1} | ${ip6_addr2}
374 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
375 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
376 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
377 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
378 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
379 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
380 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
381 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
382 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
383 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
384 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
385 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
386 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
387 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
388 | | ...                                     | ${bd_id1}
389 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
390 | | ...                                     | ${bd_id1}
391 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
392 | | ...                                     | ${bd_id1} | ${shg1}
393 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
394 | | ...                                     | ${bd_id1} | ${shg2}
395 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
396 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
397 | | ...                                     | ${bd_id2}
398 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
399 | | ...                                     | ${bd_id2}
400 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id3}
401 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
402 | | ...                                     | ${bd_id3}
403 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
404 | | ...                                     | ${bd_id3}
405 | | Then Send and receive ICMPv6 bidirectionally | ${tg_node}
406 | | ...                                          | ${tg_to_dut1_if1}
407 | | ...                                          | ${tg_to_dut2_if1}
408 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
409 | | ...                                         | ${tg_to_dut1_if1}
410 | | ...                                         | ${tg_to_dut2_if2}
411 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
412 | | ...                                         | ${tg_to_dut1_if2}
413 | | ...                                         | ${tg_to_dut2_if1}
414 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
415 | | ...                                         | ${tg_to_dut1_if2}
416 | | ...                                         | ${tg_to_dut2_if2}
417 | | And Send and receive ICMPv6 bidirectionally | ${tg_node}
418 | | ...                                         | ${tg_to_dut2_if1}
419 | | ...                                         | ${tg_to_dut2_if2}
420
421 | TC07:DUT1 and DUT2 with two L2BDs and VXLANoIPv4 tunnel switch ICMPv4 between TG links and VM links
422 | | [Documentation]
423 | | ... | [Top] TG-DUT1-VM-DUT1-DUT2-VM-DUT2-TG.
424 | | ... | [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on DUT1-DUT2; Eth-IPv4-ICMPv4
425 | | ... | on TG-DUTn and DUTn=VM.
426 | | ... | [Cfg] On both DUTs configure two L2BDs (MAC learning enabled); first
427 | | ... | L2BD with untagged interface to TG and vhost-user interface to local
428 | | ... | VM, second one with vhost-user interface to local VM and VXLAN
429 | | ... | interface towards the other DUT. Configure linux bridge on both VMs
430 | | ... | to pass traffic between both vhost-user interfaces.
431 | | ... | [Ver] Make TG send ICMPv4 Echo Req between two of its interfaces to
432 | | ... | be switched by DUT1 and DUT2; verify packets are switched between
433 | | ... | these TG interfaces.
434 | | ... | [Ref] RFC7348.
435 | | [Tags] | VPP_VM_ENV
436 | | Given Path for 3-node testing is set
437 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
438 | | And Interfaces in 3-node path are up
439 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut1_node}
440 | | ...                                                     | ${sock1}
441 | | ...                                                     | ${sock2}
442 | | ...                                                     | ${dut1_vhost1}
443 | | ...                                                     | ${dut1_vhost2}
444 | | And VPP Vhost interfaces for L2BD forwarding are setup | ${dut2_node}
445 | | ...                                                    | ${sock1}
446 | | ...                                                    | ${sock2}
447 | | ...                                                    | ${dut2_vhost1}
448 | | ...                                                    | ${dut2_vhost2}
449 | | And VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1}
450 | | ...                                       | ${sock2} | ${qemu1}
451 | | And VM for Vhost L2BD forwarding is setup | ${dut2_node} | ${sock1}
452 | | ...                                       | ${sock2} | ${qemu2}
453 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr1}
454 | | ...                       | ${ip4_prefix}
455 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr2}
456 | | ...                       | ${ip4_prefix}
457 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2}
458 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1}
459 | | ${dut1s_vxlan}= | And Create VXLAN interface | ${dut1_node} | ${vni_1}
460 | |                 | ...                        | ${ip4_addr1} | ${ip4_addr2}
461 | | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
462 | |                 | ...                        | ${ip4_addr2} | ${ip4_addr1}
463 | | And Interfaces are added to BD | ${dut1_node} | ${bd_id1}
464 | | ...                            | ${dut1_to_tg} | ${${dut1_vhost1}}
465 | | And Interfaces are added to BD | ${dut1_node} | ${bd_id2}
466 | | ...                            | ${dut1s_vxlan} | ${${dut1_vhost2}}
467 | | And Interfaces are added to BD | ${dut2_node} | ${bd_id1}
468 | | ...                            | ${dut2_to_tg} | ${${dut2_vhost1}}
469 | | And Interfaces are added to BD | ${dut2_node} | ${bd_id2}
470 | | ...                            | ${dut2s_vxlan} | ${${dut2_vhost2}}
471 | | Then Send and receive ICMPv4 bidirectionally
472 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
473 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
474 | | ... | AND | Show vpp trace dump on all DUTs
475 | | ... | AND | Run keyword | Qemu Teardown | ${dut1_node}
476 | | ...                                     | ${${qemu1}} | ${qemu1}
477 | | ... | AND | Run keyword | Qemu Teardown | ${dut2_node}
478 | | ...                                     | ${${qemu2}} | ${qemu2}
479 | | ... | AND | Check VPP PID in Teardown
480
481 | TC08:DUT1 and DUT2 with two L2BDs and VXLANoIPv6 tunnel switch ICMPv6 between TG links and VM links
482 | | [Documentation]
483 | | ... | [Top] TG-DUT1-VM-DUT1-DUT2-VM-DUT2-TG.
484 | | ... | [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on DUT1-DUT2; Eth-IPv4-ICMPv4
485 | | ... | on TG-DUTn and DUTn=VM.
486 | | ... | [Cfg] On both DUTs configure two L2BDs (MAC learning enabled); first
487 | | ... | L2BD with untagged interface to TG and vhost-user interface to local
488 | | ... | VM, second one with vhost-user interface to local VM and VXLAN
489 | | ... | interface towards the other DUT. Configure linux bridge on both VMs
490 | | ... | to pass traffic between both vhost-user interfaces.
491 | | ... | [Ver] Make TG send ICMPv6 Echo Req between two of its interfaces to
492 | | ... | be switched by DUT1 and DUT2; verify packets are switched between
493 | | ... | these TG interfaces.
494 | | ... | [Ref] RFC7348.
495 | | [Tags] | VPP_VM_ENV
496 | | Given Path for 3-node testing is set
497 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
498 | | And Interfaces in 3-node path are up
499 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut1_node}
500 | | ...                                                     | ${sock1}
501 | | ...                                                     | ${sock2}
502 | | ...                                                     | ${dut1_vhost1}
503 | | ...                                                     | ${dut1_vhost2}
504 | | And VPP Vhost interfaces for L2BD forwarding are setup | ${dut2_node}
505 | | ...                                                    | ${sock1}
506 | | ...                                                    | ${sock2}
507 | | ...                                                    | ${dut2_vhost1}
508 | | ...                                                    | ${dut2_vhost2}
509 | | And VM for Vhost L2BD forwarding is setup | ${dut1_node} | ${sock1}
510 | | ...                                       | ${sock2} | ${qemu1}
511 | | And VM for Vhost L2BD forwarding is setup | ${dut2_node} | ${sock1}
512 | | ...                                       | ${sock2} | ${qemu2}
513 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
514 | | ...                       | ${ip6_prefix}
515 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
516 | | ...                       | ${ip6_prefix}
517 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2}
518 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1}
519 | | ${dut1s_vxlan}= | And Create VXLAN interface | ${dut1_node} | ${vni_1}
520 | |                 | ...                        | ${ip6_addr1} | ${ip6_addr2}
521 | | ${dut2s_vxlan}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
522 | |                 | ...                        | ${ip6_addr2} | ${ip6_addr1}
523 | | And Interfaces are added to BD | ${dut1_node} | ${bd_id1}
524 | | ...                            | ${dut1_to_tg} | ${${dut1_vhost1}}
525 | | And Interfaces are added to BD | ${dut1_node} | ${bd_id2}
526 | | ...                            | ${dut1s_vxlan} | ${${dut1_vhost2}}
527 | | And Interfaces are added to BD | ${dut2_node} | ${bd_id1}
528 | | ...                            | ${dut2_to_tg} | ${${dut2_vhost1}}
529 | | And Interfaces are added to BD | ${dut2_node} | ${bd_id2}
530 | | ...                            | ${dut2s_vxlan} | ${${dut2_vhost2}}
531 | | Then Send and receive ICMPv6 bidirectionally
532 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
533 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
534 | | ... | AND | Show vpp trace dump on all DUTs
535 | | ... | AND | Run keyword | Qemu Teardown | ${dut1_node}
536 | | ...                                     | ${${qemu1}} | ${qemu1}
537 | | ... | AND | Run keyword | Qemu Teardown | ${dut2_node}
538 | | ...                                     | ${${qemu2}} | ${qemu2}
539 | | ... | AND | Check VPP PID in Teardown