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