CSIT-687: Directory structure reorganization
[csit.git] / tests / vpp / func / l2bd / eth2p-dot1q--dot1ad-l2bdbasemaclrn-vlantrans12-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/shared/default.robot
16 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
17 | Resource | resources/libraries/robot/shared/testing_path.robot
18 | Resource | resources/libraries/robot/l2/tagging.robot
19 | Resource | resources/libraries/robot/l2/l2_traffic.robot
20 | Library  | resources.libraries.python.Trace
21 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV | SKIP_VPP_PATCH
22 | Test Setup | Set up functional test
23 | Test Teardown | Tear down functional test
24 | Documentation | *L2BD with VLAN tag rewrite test cases - translate-1-2*
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-dot1q-IPv6-ICMPv6 on TG-DUT1, Eth-dot1ad-IPv4-ICMPv4 or
30 | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv4-ICMPv4 or Eth-IPv6-ICMPv6
31 | ... | on TG-DUT2 for L2 switching of IPv4/IPv6.
32 | ... | *[Cfg] DUT configuration:* DUT1 is configured with bridge domain (L2BD)
33 | ... | switching combined with MAC learning enabled and added VLAN
34 | ... | sub-interface with VLAN tag rewrite translate-1-2 method of interface
35 | ... | towards TG and interface towards DUT2. DUT2 is configured with L2
36 | ... | bridge domain (L2BD) switching between VLAN sub-interface with VLAN tag
37 | ... | rewrite pop-2 method of interface towards DUT1 and 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 | ${src_ip6}= | 3ffe:63::1
58 | ${dst_ip6}= | 3ffe:63::2
59
60 *** Test Cases ***
61 | TC01: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links
62 | | [Documentation]
63 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
64 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
65 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
66 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
67 | | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with
68 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
69 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
70 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
71 | | ... | via DUT1 and DUT2; verify that packet is received.
72 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
73 | | Given Configure path in 3-node circular topology
74 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
75 | | And Set interfaces in 3-node circular topology up
76 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
77 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
78 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
79 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
80 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
81 | | ... | type_subif=two_tags dot1ad
82 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
83 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
84 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id1}
85 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
86 | | ... | ${vlan2_index} | pop-2
87 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
88 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
89 | | ...                                     | ${bd_id1}
90 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
91 | | ...                                     | ${bd_id1}
92 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
93 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
94 | | ...                                     | ${bd_id1}
95 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
96 | | ...                                     | ${bd_id1}
97 | | Then Send ICMP packet and verify received packet
98 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
99 | | ... | vlan1=${outer_vlan_id1}
100
101 | TC02: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
102 | | [Documentation]
103 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
104 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
105 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
106 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
107 | | ... | translate-1-2 method to set inner tag different from inner tag set on
108 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with
109 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
110 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
111 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
112 | | ... | via DUT1 and DUT2; verify that packet is not received.
113 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
114 | | [Tags] | SKIP_PATCH
115 | | Given Configure path in 3-node circular topology
116 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
117 | | And Set interfaces in 3-node circular topology up
118 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
119 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
120 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
121 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
122 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
123 | | ... | type_subif=two_tags dot1ad
124 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
125 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
126 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
127 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
128 | | ... | ${vlan2_index} | pop-2
129 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
130 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
131 | | ...                                     | ${bd_id1}
132 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
133 | | ...                                     | ${bd_id1}
134 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
135 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
136 | | ...                                     | ${bd_id1}
137 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
138 | | ...                                     | ${bd_id1}
139 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
140 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
141 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
142
143 | TC03: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
144 | | [Documentation]
145 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
146 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
147 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
148 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
149 | | ... | translate-1-2 method to set outer tag different from outer tag set on
150 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with
151 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
152 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
153 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
154 | | ... | via DUT1 and DUT2; verify that packet is not received.
155 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
156 | | [Tags] | SKIP_PATCH
157 | | Given Configure path in 3-node circular topology
158 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
159 | | And Set interfaces in 3-node circular topology up
160 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
161 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
162 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
163 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
164 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
165 | | ... | type_subif=two_tags dot1ad
166 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
167 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
168 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id1}
169 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
170 | | ... | ${vlan2_index} | pop-2
171 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
172 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
173 | | ...                                     | ${bd_id1}
174 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
175 | | ...                                     | ${bd_id1}
176 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
177 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
178 | | ...                                     | ${bd_id1}
179 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
180 | | ...                                     | ${bd_id1}
181 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
182 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
183 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
184
185 | TC04: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv4 between two TG links
186 | | [Documentation]
187 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
188 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
189 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
190 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
191 | | ... | translate-1-2 method to set outer and inner tags different from tags
192 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
193 | | ... | bridge domain with one interface to TG and one Dot1ad sub-interface
194 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
195 | | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces
196 | | ... | to another one via DUT1 and DUT2; verify that packet is not received.
197 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
198 | | [Tags] | SKIP_PATCH
199 | | Given Configure path in 3-node circular topology
200 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
201 | | And Set interfaces in 3-node circular topology up
202 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
203 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
204 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
205 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
206 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
207 | | ... | type_subif=two_tags dot1ad
208 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
209 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
210 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
211 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
212 | | ... | ${vlan2_index} | pop-2
213 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
214 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
215 | | ...                                     | ${bd_id1}
216 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
217 | | ...                                     | ${bd_id1}
218 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
219 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
220 | | ...                                     | ${bd_id1}
221 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
222 | | ...                                     | ${bd_id1}
223 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
224 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
225 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
226
227 | TC05: DUT1 and DUT2 with L2BD and VLAN translate-1-2 (DUT1) switch ICMPv6 between two TG links
228 | | [Documentation]
229 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
230 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
231 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
232 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
233 | | ... | translate-1-2 method; on DUT2 configure L2 bridge domain (L2BD) with
234 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
235 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req
236 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
237 | | ... | via DUT1 and DUT2; verify that packet is received.
238 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
239 | | Given Configure path in 3-node circular topology
240 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
241 | | And Set interfaces in 3-node circular topology up
242 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
243 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
244 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
245 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
246 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
247 | | ... | type_subif=two_tags dot1ad
248 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
249 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
250 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
251 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
252 | | ... | ${vlan2_index} | pop-2
253 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
254 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
255 | | ...                                     | ${bd_id1}
256 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
257 | | ...                                     | ${bd_id1}
258 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
259 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
260 | | ...                                     | ${bd_id1}
261 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
262 | | ...                                     | ${bd_id1}
263 | | Then Send ICMP packet and verify received packet
264 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip6}
265 | | ... | dst_ip=${dst_ip6} | encaps=Dot1q | vlan1=${outer_vlan_id1}
266
267 | TC06: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links
268 | | [Documentation]
269 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
270 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
271 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
272 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
273 | | ... | translate-1-2 method to set inner tag different from inner tag set on
274 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with
275 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
276 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req
277 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
278 | | ... | via DUT1 and DUT2; verify that packet is not received.
279 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
280 | | [Tags] | SKIP_PATCH
281 | | Given Configure path in 3-node circular topology
282 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
283 | | And Set interfaces in 3-node circular topology up
284 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
285 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
286 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
287 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
288 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
289 | | ... | type_subif=two_tags dot1ad
290 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
291 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
292 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
293 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
294 | | ... | ${vlan2_index} | pop-2
295 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
296 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
297 | | ...                                     | ${bd_id1}
298 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
299 | | ...                                     | ${bd_id1}
300 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
301 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
302 | | ...                                     | ${bd_id1}
303 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
304 | | ...                                     | ${bd_id1}
305 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
306 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
307 | | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q
308 | | ... | vlan1=${outer_vlan_id1}
309
310 | TC07: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links
311 | | [Documentation]
312 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
313 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
314 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
315 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
316 | | ... | translate-1-2 method to set outer tag different from outer tag set on
317 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 bridge domain with
318 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
319 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req
320 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
321 | | ... | via DUT1 and DUT2; verify that packet is not received.
322 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
323 | | [Tags] | SKIP_PATCH
324 | | Given Configure path in 3-node circular topology
325 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
326 | | And Set interfaces in 3-node circular topology up
327 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
328 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
329 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
330 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
331 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
332 | | ... | type_subif=two_tags dot1ad
333 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
334 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
335 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
336 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
337 | | ... | ${vlan2_index} | pop-2
338 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
339 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
340 | | ...                                     | ${bd_id1}
341 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
342 | | ...                                     | ${bd_id1}
343 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
344 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
345 | | ...                                     | ${bd_id1}
346 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
347 | | ...                                     | ${bd_id1}
348 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
349 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
350 | | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q
351 | | ... | vlan1=${outer_vlan_id1}
352
353 | TC08: DUT1 and DUT2 with L2BD and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv6 between two TG links
354 | | [Documentation]
355 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
356 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
357 | | ... | [Cfg] On DUT1 configure L2 bridge domain (L2BD) with one interface to
358 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
359 | | ... | translate-1-2 method to set outer and inner tags different from tags
360 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
361 | | ... | bridge domain with one interface to TG and one Dot1ad sub-interface
362 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
363 | | ... | ICMPv6 Echo Req tagged with one Dot1q tag from one of its interfaces
364 | | ... | to another one via DUT1 and DUT2; verify that packet is not received.
365 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
366 | | [Tags] | SKIP_PATCH
367 | | Given Configure path in 3-node circular topology
368 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
369 | | And Set interfaces in 3-node circular topology up
370 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
371 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
372 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
373 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
374 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
375 | | ... | type_subif=two_tags dot1ad
376 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
377 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
378 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
379 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
380 | | ... | ${vlan2_index} | pop-2
381 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
382 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
383 | | ...                                     | ${bd_id1}
384 | | And Add interface to bridge domain | ${dut1_node} | ${vlan1_index}
385 | | ...                                     | ${bd_id1}
386 | | And Create bridge domain | ${dut2_node} | ${bd_id1}
387 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
388 | | ...                                     | ${bd_id1}
389 | | And Add interface to bridge domain | ${dut2_node} | ${vlan2_index}
390 | | ...                                     | ${bd_id1}
391 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
392 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
393 | | ... | ${tg_to_dut2} | src_ip=${src_ip6} | dst_ip=${dst_ip6} | encaps=Dot1q
394 | | ... | vlan1=${outer_vlan_id1}