CSIT-465: Common test setup and teardown
[csit.git] / tests / func / vlan / vlan_tag_translate_l2_bridge_domain_ipv4.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/bridge_domain.robot
17 | Resource | resources/libraries/robot/testing_path.robot
18 | Resource | resources/libraries/robot/tagging.robot
19 | Resource | resources/libraries/robot/l2_traffic.robot
20 | Library  | resources.libraries.python.Trace
21 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV
22 | Test Setup | Func Test Setup
23 | Test Teardown | Func Test Teardown
24 | Documentation | *L2 bridge domain with VLAN tag rewrite test cases - IPv4*
25 | ...
26 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
27 | ... | with single links between nodes.
28 | ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or
29 | ... | Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4
30 | ... | on TG-DUT2 for L2 switching of IPv4.
31 | ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD)
32 | ... | switching combined with MAC learning enabled and added VLAN
33 | ... | sub-interface with VLAN tag rewrite translate-1-1 method
34 | ... | of interface towards TG and interface towards DUT2. DUT2 is configured
35 | ... | with L2 bridge domain (L2BD) switching between VLAN sub-interface
36 | ... | with VLAN tag rewrite pop-1 method of interface towards DUT1 and
37 | ... | interface towards TG.
38 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are
39 | ... | sent from TG on link to DUT1 and received in TG on link form DUT2;
40 | ... | on receive TG verifies packets for correctness and their IPv4 src-addr,
41 | ... | dst-addr and MAC addresses.
42 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad.
43
44 *** Variables ***
45 | ${bd_id1}= | 1
46
47 | ${subid}= | 10
48
49 | ${outer_vlan_id1}= | 110
50 | ${outer_vlan_id2}= | 120
51 | ${outer_vlan_wrong}= | 150
52
53 | ${inner_vlan_id1}= | 210
54 | ${inner_vlan_id2}= | 220
55 | ${inner_vlan_wrong}= | 250
56
57 *** Test Cases ***
58 | TC01: DUT1 and DUT2 with L2BD and VLAN translate-1-1 (DUT1) switch ICMPv4 between two TG links
59 | | [Documentation]
60 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \
61 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
62 | | ... | bridge domain with one interface to DUT2 and one VLAN
63 | | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method;
64 | | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG
65 | | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1
66 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag
67 | | ... | from one of its interfaces to another one via DUT1 and DUT2; verify
68 | | ... | that packet is received. [Ref] IEEE 802.1q
69 | | Given Path for 3-node testing is set
70 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
71 | | And Interfaces in 3-node path are up
72 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
73 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
74 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
75 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
76 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
77 | | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2}
78 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
79 | | ... | ${vlan2_index} | pop-1
80 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
81 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
82 | | ...                                     | ${bd_id1}
83 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
84 | | ...                                     | ${bd_id1}
85 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
86 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
87 | | ...                                     | ${bd_id1}
88 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
89 | | ...                                     | ${bd_id1}
90 | | Then Send and receive ICMP Packet
91 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
92 | | ... | vlan1=${outer_vlan_id1}
93
94 | TC02: DUT1 and DUT2 with L2BD and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links
95 | | [Documentation]
96 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \
97 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
98 | | ... | bridge domain (L2BD) with one interface to DUT2 and one VLAN
99 | | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method
100 | | ... | to set tag different from tag set on VLAN sub-interface of DUT2;
101 | | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG
102 | | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1
103 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag
104 | | ... | from one of its interfaces to another one via DUT1 and DUT2; verify
105 | | ... | that packet is not received. [Ref] IEEE 802.1q
106 | | [Tags] | SKIP_PATCH
107 | | Given Path for 3-node testing is set
108 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
109 | | And Interfaces in 3-node path are up
110 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
111 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
112 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
113 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
114 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
115 | | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong}
116 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
117 | | ... | ${vlan2_index} | pop-1
118 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
119 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
120 | | ...                                     | ${bd_id1}
121 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
122 | | ...                                     | ${bd_id1}
123 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
124 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
125 | | ...                                     | ${bd_id1}
126 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
127 | | ...                                     | ${bd_id1}
128 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
129 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
130 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
131
132 | TC03: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links
133 | | [Documentation]
134 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
135 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
136 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
137 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
138 | | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with
139 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
140 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
141 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
142 | | ... | via DUT1 and DUT2; verify that packet is received.
143 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
144 | | Given Path for 3-node testing is set
145 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
146 | | And Interfaces in 3-node path are up
147 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
148 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
149 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
150 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
151 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
152 | | ... | type_subif=two_tags dot1ad
153 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
154 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
155 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
156 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
157 | | ... | ${vlan2_index} | pop-2
158 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
159 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
160 | | ...                                     | ${bd_id1}
161 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
162 | | ...                                     | ${bd_id1}
163 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
164 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
165 | | ...                                     | ${bd_id1}
166 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
167 | | ...                                     | ${bd_id1}
168 | | Then Send and receive ICMP Packet
169 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
170 | | ... | vlan1=${outer_vlan_id1}
171
172 | TC04: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
173 | | [Documentation]
174 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
175 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
176 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
177 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
178 | | ... | translate-1-2 method to set inner tag different from inner tag set on
179 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with
180 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
181 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
182 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
183 | | ... | via DUT1 and DUT2; verify that packet is not received.
184 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
185 | | [Tags] | SKIP_PATCH
186 | | Given Path for 3-node testing is set
187 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
188 | | And Interfaces in 3-node path are up
189 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
190 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
191 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
192 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
193 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
194 | | ... | type_subif=two_tags dot1ad
195 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
196 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
197 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
198 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
199 | | ... | ${vlan2_index} | pop-2
200 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
201 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
202 | | ...                                     | ${bd_id1}
203 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
204 | | ...                                     | ${bd_id1}
205 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
206 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
207 | | ...                                     | ${bd_id1}
208 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
209 | | ...                                     | ${bd_id1}
210 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
211 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
212 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
213
214 | TC05: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
215 | | [Documentation]
216 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
217 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
218 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
219 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
220 | | ... | translate-1-2 method to set outer tag different from outer tag set on
221 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with
222 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
223 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
224 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
225 | | ... | via DUT1 and DUT2; verify that packet is not received.
226 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
227 | | [Tags] | SKIP_PATCH
228 | | Given Path for 3-node testing is set
229 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
230 | | And Interfaces in 3-node path are up
231 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
232 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
233 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
234 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
235 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
236 | | ... | type_subif=two_tags dot1ad
237 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
238 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
239 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
240 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
241 | | ... | ${vlan2_index} | pop-2
242 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
243 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
244 | | ...                                     | ${bd_id1}
245 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
246 | | ...                                     | ${bd_id1}
247 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
248 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
249 | | ...                                     | ${bd_id1}
250 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
251 | | ...                                     | ${bd_id1}
252 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
253 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
254 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
255
256 | 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
257 | | [Documentation]
258 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
259 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
260 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
261 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
262 | | ... | translate-1-2 method to set outer and inner tags different from tags
263 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
264 | | ... | bridge domain with one interface to TG and one Dot1ad sub-interface
265 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
266 | | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces
267 | | ... | to another one via DUT1 and DUT2; verify that packet is not received.
268 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
269 | | [Tags] | SKIP_PATCH
270 | | Given Path for 3-node testing is set
271 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
272 | | And Interfaces in 3-node path are up
273 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
274 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
275 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
276 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
277 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
278 | | ... | type_subif=two_tags dot1ad
279 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
280 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
281 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
282 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
283 | | ... | ${vlan2_index} | pop-2
284 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
285 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
286 | | ...                                     | ${bd_id1}
287 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
288 | | ...                                     | ${bd_id1}
289 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
290 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
291 | | ...                                     | ${bd_id1}
292 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
293 | | ...                                     | ${bd_id1}
294 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
295 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
296 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
297
298 | TC07: DUT1 and DUT2 with L2BD and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links
299 | | [Documentation]
300 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \
301 | | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
302 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
303 | | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite
304 | | ... | translate-2-1 method; on DUT2 configure L2 bridge domain (L2BD) with
305 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with
306 | | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req
307 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
308 | | ... | via DUT1 and DUT2; verify that packet is received.
309 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
310 | | Given Path for 3-node testing is set
311 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
312 | | And Interfaces in 3-node path are up
313 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
314 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
315 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
316 | | ... | type_subif=two_tags dot1ad
317 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
318 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
319 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
320 | | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2}
321 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
322 | | ... | ${vlan2_index} | pop-1
323 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
324 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
325 | | ...                                     | ${bd_id1}
326 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
327 | | ...                                     | ${bd_id1}
328 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
329 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
330 | | ...                                     | ${bd_id1}
331 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
332 | | ...                                     | ${bd_id1}
333 | | Then Send and receive ICMP Packet
334 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad
335 | | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1}
336
337 | TC08: DUT1 and DUT2 with L2BD and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links
338 | | [Documentation]
339 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \
340 | | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
341 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
342 | | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite
343 | | ... | translate-2-1 method to set tag different from tag set on VLAN
344 | | ... | sub-interface of DUT2; on DUT2 configure L2 bridge domain (L2BD) with
345 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with
346 | | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req
347 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
348 | | ... | via DUT1 and DUT2; verify that packet is not received.
349 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
350 | | [Tags] | SKIP_PATCH
351 | | Given Path for 3-node testing is set
352 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
353 | | And Interfaces in 3-node path are up
354 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
355 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
356 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
357 | | ... | type_subif=two_tags dot1ad
358 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
359 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
360 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
361 | | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong}
362 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
363 | | ... | ${vlan2_index} | pop-1
364 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
365 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
366 | | ...                                     | ${bd_id1}
367 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
368 | | ...                                     | ${bd_id1}
369 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
370 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
371 | | ...                                     | ${bd_id1}
372 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
373 | | ...                                     | ${bd_id1}
374 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
375 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
376 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
377 | | ... | vlan2=${inner_vlan_id1}
378
379 | TC09: DUT1 and DUT2 with L2BD and VLAN translate-2-2 switch ICMPv4 between two TG links
380 | | [Documentation]
381 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
382 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
383 | | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad
384 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method;
385 | | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG and
386 | | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1
387 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
388 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
389 | | ... | that packet is received. [Ref] IEEE 802.1ad
390 | | Given Path for 3-node testing is set
391 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
392 | | And Interfaces in 3-node path are up
393 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
394 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
395 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
396 | | ... | type_subif=two_tags dot1ad
397 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
398 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
399 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
400 | | ... | type_subif=two_tags dot1ad
401 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
402 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
403 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
404 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
405 | | ... | ${vlan2_index} | pop-2
406 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
407 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
408 | | ...                                     | ${bd_id1}
409 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
410 | | ...                                     | ${bd_id1}
411 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
412 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
413 | | ...                                     | ${bd_id1}
414 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
415 | | ...                                     | ${bd_id1}
416 | | Then Send and receive ICMP Packet
417 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad
418 | | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1}
419
420 | TC10: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
421 | | [Documentation]
422 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
423 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
424 | | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad
425 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
426 | | ... | set inner tag different from inner tag set on Dot1ad sub-interface of
427 | | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to
428 | | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite
429 | | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another
430 | | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2;
431 | | ... | verify that packet is not received. [Ref] IEEE 802.1ad
432 | | [Tags] | SKIP_PATCH
433 | | Given Path for 3-node testing is set
434 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
435 | | And Interfaces in 3-node path are up
436 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
437 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
438 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
439 | | ... | type_subif=two_tags dot1ad
440 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
441 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
442 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
443 | | ... | type_subif=two_tags dot1ad
444 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
445 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
446 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
447 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
448 | | ... | ${vlan2_index} | pop-2
449 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
450 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
451 | | ...                                     | ${bd_id1}
452 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
453 | | ...                                     | ${bd_id1}
454 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
455 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
456 | | ...                                     | ${bd_id1}
457 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
458 | | ...                                     | ${bd_id1}
459 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
460 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
461 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
462 | | ... | vlan2=${inner_vlan_id1}
463
464 | TC11: DUT1 and DUT2 with L2BD and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
465 | | [Documentation]
466 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
467 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
468 | | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad
469 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
470 | | ... | set outer tag different from outer tag set on Dot1ad sub-interface of
471 | | ... | DUT2; on DUT2 configure L2 bridge domain (L2BD) with one interface to
472 | | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite
473 | | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another
474 | | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2;
475 | | ... | verify that packet is not received. [Ref] IEEE 802.1ad
476 | | [Tags] | SKIP_PATCH
477 | | Given Path for 3-node testing is set
478 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
479 | | And Interfaces in 3-node path are up
480 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
481 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
482 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
483 | | ... | type_subif=two_tags dot1ad
484 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
485 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
486 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
487 | | ... | type_subif=two_tags dot1ad
488 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
489 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
490 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
491 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
492 | | ... | ${vlan2_index} | pop-2
493 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
494 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
495 | | ...                                     | ${bd_id1}
496 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
497 | | ...                                     | ${bd_id1}
498 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
499 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
500 | | ...                                     | ${bd_id1}
501 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
502 | | ...                                     | ${bd_id1}
503 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
504 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
505 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
506 | | ... | vlan2=${inner_vlan_id1}
507
508 | 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
509 | | [Documentation]
510 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
511 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
512 | | ... | bridge domain (L2BD) with one interface to DUT2 and one Dot1ad
513 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
514 | | ... | set tags different from tags set on Dot1ad sub-interface of DUT2;
515 | | ... | on DUT2 configure L2 bridge domain (L2BD) with one interface to TG
516 | | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1
517 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
518 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
519 | | ... | that packet is not received. [Ref] IEEE 802.1ad
520 | | [Tags] | SKIP_PATCH
521 | | Given Path for 3-node testing is set
522 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
523 | | And Interfaces in 3-node path are up
524 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
525 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
526 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
527 | | ... | type_subif=two_tags dot1ad
528 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
529 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
530 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
531 | | ... | type_subif=two_tags dot1ad
532 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
533 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
534 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
535 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
536 | | ... | ${vlan2_index} | pop-2
537 | | And Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
538 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
539 | | ...                                     | ${bd_id1}
540 | | And Interface is added to bridge domain | ${dut1_node} | ${vlan1_index}
541 | | ...                                     | ${bd_id1}
542 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id1}
543 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
544 | | ...                                     | ${bd_id1}
545 | | And Interface is added to bridge domain | ${dut2_node} | ${vlan2_index}
546 | | ...                                     | ${bd_id1}
547 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
548 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
549 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
550 | | ... | vlan2=${inner_vlan_id1}