CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / tests / func / vlan / eth2p-dot1q--dot1ad-l2xcbase-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/default.robot
16 | Resource | resources/libraries/robot/testing_path.robot
17 | Resource | resources/libraries/robot/tagging.robot
18 | Resource | resources/libraries/robot/l2_traffic.robot
19 | Library  | resources.libraries.python.Trace
20 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV | SKIP_VPP_PATCH
21 | Test Setup | Set up functional test
22 | Test Teardown | Tear down functional test
23 | Documentation | *L2XC with VLAN tag rewrite test cases - translate-1-2*
24 | ...
25 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
26 | ... | with single links between nodes.
27 | ... | *[Enc] Packet encapsulations:* Eth-dot1q-IPv4-ICMPv4 or
28 | ... | Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, Eth-dot1ad-IPv4-ICMPv4 or
29 | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv4-ICMPv4 or Eth-IPv6-ICMPv6
30 | ... | on TG-DUT2 for L2 switching of IPv4/IPv6.
31 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect
32 | ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite
33 | ... | translate-1-2 method of interface towards TG and interface towards DUT2.
34 | ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching
35 | ... | between VLAN sub-interface with VLAN tag rewrite pop-2 method
36 | ... | of interface towards DUT1 and interface towards TG.
37 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are
38 | ... | sent from TG on link to DUT1 and received in TG on link form DUT2;
39 | ... | on receive TG verifies packets for correctness and their IPv4 src-addr,
40 | ... | dst-addr and MAC addresses.
41 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad.
42
43 *** Variables ***
44 | ${subid}= | 10
45
46 | ${outer_vlan_id1}= | 110
47 | ${outer_vlan_id2}= | 120
48 | ${outer_vlan_wrong}= | 150
49
50 | ${inner_vlan_id1}= | 210
51 | ${inner_vlan_id2}= | 220
52 | ${inner_vlan_wrong}= | 250
53
54 | ${src_ip}= | 3ffe:63::1
55 | ${dst_ip}= | 3ffe:63::2
56
57 *** Test Cases ***
58 | TC01: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links
59 | | [Documentation]
60 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
61 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
62 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
63 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
64 | | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with
65 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
66 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
67 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
68 | | ... | via DUT1 and DUT2; verify that packet is received.
69 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
70 | | Given Configure path in 3-node circular topology
71 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
72 | | And Set interfaces in 3-node circular topology up
73 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
74 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
75 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
76 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
77 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
78 | | ... | type_subif=two_tags dot1ad
79 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
80 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
81 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id1}
82 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
83 | | ... | ${vlan2_index} | pop-2
84 | | And Connect interfaces and VLAN sub-interfaces using L2XC
85 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
86 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
87 | | Then Send ICMP packet and verify received packet
88 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
89 | | ... | vlan1=${outer_vlan_id1}
90
91 | TC02: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
92 | | [Documentation]
93 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
94 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
95 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
96 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
97 | | ... | translate-1-2 method to set inner tag different from inner tag set on
98 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
99 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
100 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
101 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
102 | | ... | via DUT1 and DUT2; verify that packet is not received.
103 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
104 | | [Tags] | SKIP_PATCH
105 | | Given Configure path in 3-node circular topology
106 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
107 | | And Set interfaces in 3-node circular topology up
108 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
109 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
110 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
111 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
112 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
113 | | ... | type_subif=two_tags dot1ad
114 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
115 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
116 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
117 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
118 | | ... | ${vlan2_index} | pop-2
119 | | And Connect interfaces and VLAN sub-interfaces using L2XC
120 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
121 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
122 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
123 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
124 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
125
126 | TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
127 | | [Documentation]
128 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
129 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
130 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
131 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
132 | | ... | translate-1-2 method to set outer tag different from outer tag set on
133 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
134 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
135 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
136 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
137 | | ... | via DUT1 and DUT2; verify that packet is not received.
138 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
139 | | [Tags] | SKIP_PATCH
140 | | Given Configure path in 3-node circular topology
141 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
142 | | And Set interfaces in 3-node circular topology up
143 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
144 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
145 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
146 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
147 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
148 | | ... | type_subif=two_tags dot1ad
149 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
150 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
151 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id1}
152 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
153 | | ... | ${vlan2_index} | pop-2
154 | | And Connect interfaces and VLAN sub-interfaces using L2XC
155 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
156 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
157 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
158 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
159 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
160
161 | TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv4 between two TG links
162 | | [Documentation]
163 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
164 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
165 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
166 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
167 | | ... | translate-1-2 method to set outer and inner tags different from tags
168 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
169 | | ... | cross-connect with one interface to TG and one Dot1ad sub-interface
170 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
171 | | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces
172 | | ... | to another one via DUT1 and DUT2; verify that packet is not received.
173 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
174 | | [Tags] | SKIP_PATCH
175 | | Given Configure path in 3-node circular topology
176 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
177 | | And Set interfaces in 3-node circular topology up
178 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
179 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
180 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
181 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
182 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id1}
183 | | ... | type_subif=two_tags dot1ad
184 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
185 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
186 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
187 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
188 | | ... | ${vlan2_index} | pop-2
189 | | And Connect interfaces and VLAN sub-interfaces using L2XC
190 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
191 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
192 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
193 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
194 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
195
196 | TC05: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv6 between two TG links
197 | | [Documentation]
198 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
199 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
200 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
201 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
202 | | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with
203 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
204 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req
205 | | ... | tagegd with one Dot1q tag from one of its interfaces to another one
206 | | ... | via DUT1 and DUT2; verify that packet is received.
207 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
208 | | Given Configure path in 3-node circular topology
209 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
210 | | And Set interfaces in 3-node circular topology up
211 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
212 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
213 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
214 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
215 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
216 | | ... | type_subif=two_tags dot1ad
217 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
218 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
219 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
220 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
221 | | ... | ${vlan2_index} | pop-2
222 | | And Connect interfaces and VLAN sub-interfaces using L2XC
223 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
224 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
225 | | Then Send ICMP packet and verify received packet
226 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | src_ip=${src_ip}
227 | | ... | dst_ip=${dst_ip} | encaps=Dot1q | vlan1=${outer_vlan_id1}
228
229 | TC06: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv6 between two TG links
230 | | [Documentation]
231 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
232 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
233 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
234 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
235 | | ... | translate-1-2 method to set inner tag different from inner tag set on
236 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
237 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
238 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req
239 | | ... | tagegd with one Dot1q tag from one of its interfaces to another one
240 | | ... | via DUT1 and DUT2; verify that packet is not received.
241 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
242 | | [Tags] | SKIP_PATCH
243 | | Given Configure path in 3-node circular topology
244 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
245 | | And Set interfaces in 3-node circular topology up
246 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
247 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
248 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
249 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
250 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
251 | | ... | type_subif=two_tags dot1ad
252 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
253 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
254 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
255 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
256 | | ... | ${vlan2_index} | pop-2
257 | | And Connect interfaces and VLAN sub-interfaces using L2XC
258 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
259 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
260 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
261 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
262 | | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q
263 | | ... | vlan1=${outer_vlan_id1}
264
265 | TC07: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv6 between two TG links
266 | | [Documentation]
267 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
268 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
269 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
270 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
271 | | ... | translate-1-2 method to set outer tag different from outer tag set on
272 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
273 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
274 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv6 Echo Req
275 | | ... | tagegd with one Dot1q tag from one of its interfaces to another one
276 | | ... | via DUT1 and DUT2; verify that packet is not received.
277 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
278 | | [Tags] | SKIP_PATCH
279 | | Given Configure path in 3-node circular topology
280 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
281 | | And Set interfaces in 3-node circular topology up
282 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
283 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
284 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
285 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
286 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
287 | | ... | type_subif=two_tags dot1ad
288 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
289 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
290 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
291 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
292 | | ... | ${vlan2_index} | pop-2
293 | | And Connect interfaces and VLAN sub-interfaces using L2XC
294 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
295 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
296 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
297 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
298 | | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q
299 | | ... | vlan1=${outer_vlan_id1}
300
301 | TC08: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner tag used (DUT1) switch ICMPv6 between two TG links
302 | | [Documentation]
303 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv6-ICMPv6 on TG-DUT1, \
304 | | ... | Eth-dot1ad-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUT2.
305 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
306 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
307 | | ... | translate-1-2 method to set outer and inner tags different from tags
308 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
309 | | ... | cross-connect with one interface to TG and one Dot1ad sub-interface
310 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
311 | | ... | ICMPv6 Echo Req tagegd with one Dot1q tag from one of its interfaces
312 | | ... | to another one via DUT1 and DUT2; verify that packet is not received.
313 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
314 | | [Tags] | SKIP_PATCH
315 | | Given Configure path in 3-node circular topology
316 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
317 | | And Set interfaces in 3-node circular topology up
318 | | ${vlan1_name} | ${vlan1_index}= | When Create vlan sub-interface
319 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
320 | | ${vlan2_name} | ${vlan2_index}= | And Create tagged sub-interface
321 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
322 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
323 | | ... | type_subif=two_tags dot1ad
324 | | And Configure L2 tag rewrite method on interface | ${dut1_node}
325 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
326 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
327 | | And Configure L2 tag rewrite method on interface | ${dut2_node}
328 | | ... | ${vlan2_index} | pop-2
329 | | And Connect interfaces and VLAN sub-interfaces using L2XC
330 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
331 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
332 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
333 | | ... | Send ICMP packet and verify received packet | ${tg_node} | ${tg_to_dut1}
334 | | ... | ${tg_to_dut2} | src_ip=${src_ip} | dst_ip=${dst_ip} | encaps=Dot1q
335 | | ... | vlan1=${outer_vlan_id1}