CSIT-509: Add perf tests for vlan + l2 + vhost
[csit.git] / tests / func / vlan / vlan_tag_translate_l2_xconnect_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/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
21 | Test Setup | Func Test Setup
22 | Test Teardown | Func Test Teardown
23 | Documentation | *L2 cross-connect with VLAN tag rewrite test cases - IPv4*
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-dot1ad-IPv4-ICMPv4 on TG-DUT1 and DUT1-DUT2, Eth-IPv4-ICMPv4
29 | ... | on TG-DUT2 for L2 switching of IPv4.
30 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect
31 | ... | (L2XC) switching between VLAN sub-interface with VLAN tag rewrite
32 | ... | translate-1-1 method of interface towards TG and interface towards DUT2.
33 | ... | DUT2 is configured configured with L2 cross-connect (L2XC) switching
34 | ... | between VLAN sub-interface with VLAN tag rewrite pop-1 method
35 | ... | of interface towards DUT1 and interface towards TG.
36 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are
37 | ... | sent from TG on link to DUT1 and received in TG on link form DUT2;
38 | ... | on receive TG verifies packets for correctness and their IPv4 src-addr,
39 | ... | dst-addr and MAC addresses.
40 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1q, IEEE 802.1ad.
41
42 *** Variables ***
43 | ${subid}= | 10
44 | ${outer_vlan_id1}= | 110
45 | ${outer_vlan_id2}= | 120
46 | ${outer_vlan_wrong}= | 150
47 | ${inner_vlan_id1}= | 210
48 | ${inner_vlan_id2}= | 220
49 | ${inner_vlan_wrong}= | 250
50
51 *** Test Cases ***
52 | TC01: DUT1 and DUT2 with L2XC and VLAN translate-1-1 (DUT1) switch ICMPv4 between two TG links
53 | | [Documentation]
54 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \
55 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
56 | | ... | cross-connect (L2XC) with one interface to DUT2 and one VLAN
57 | | ... | sub-interface towards TG with VLAN tag rewrite translate-1-1 method;
58 | | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG
59 | | ... | and one VLAN sub-interface towards DUT1 with VLAN tag rewrite pop-1
60 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req tagged with one Dot1q tag
61 | | ... | from one of its interfaces to another one via DUT1 and DUT2; verify
62 | | ... | that packet is received. [Ref] IEEE 802.1q
63 | | Given Path for 3-node testing is set
64 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
65 | | And Interfaces in 3-node path are up
66 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
67 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
68 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
69 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
70 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
71 | | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_id2}
72 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
73 | | ... | ${vlan2_index} | pop-1
74 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
75 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
76 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
77 | | Then Send and receive ICMP Packet
78 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
79 | | ... | vlan1=${outer_vlan_id1}
80
81 | TC02: DUT1 and DUT2 with L2XC and VLAN translate-1-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links
82 | | [Documentation]
83 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1 and \
84 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
85 | | ... | cross-connect (L2XC) with one VLAN tagged sub-interface to DUT2 and
86 | | ... | one VLAN sub-interface towards TG with VLAN tag rewrite
87 | | ... | (translate-1-1) on sub-interface to DUT2; on DUT2 configure L2XC with
88 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with VLAN
89 | | ... | tag pop-1. [Ver] Make TG send ICMPv4 Echo Req tagged with one dot1q
90 | | ... | tag from one of its interfaces to another one via DUT1 and DUT2;
91 | | ... | verify that packet is not received. [Ref] IEEE 802.1q
92 | | [Tags] | SKIP_PATCH
93 | | Given Path for 3-node testing is set
94 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
95 | | And Interfaces in 3-node path are up
96 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
97 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
98 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
99 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
100 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
101 | | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong}
102 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
103 | | ... | ${vlan2_index} | pop-1
104 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
105 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
106 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
107 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
108 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
109 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
110
111 | TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links
112 | | [Documentation]
113 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
114 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
115 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
116 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
117 | | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with
118 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
119 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
120 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
121 | | ... | via DUT1 and DUT2; verify that packet is received.
122 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
123 | | Given Path for 3-node testing is set
124 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
125 | | And Interfaces in 3-node path are up
126 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
127 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
128 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
129 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
130 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
131 | | ... | type_subif=two_tags dot1ad
132 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
133 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
134 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
135 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
136 | | ... | ${vlan2_index} | pop-2
137 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
138 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
139 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
140 | | Then Send and receive ICMP Packet
141 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
142 | | ... | vlan1=${outer_vlan_id1}
143
144 | TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
145 | | [Documentation]
146 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
147 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
148 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
149 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
150 | | ... | translate-1-2 method to set inner tag different from inner tag set on
151 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
152 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
153 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
154 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
155 | | ... | via DUT1 and DUT2; verify that packet is not received.
156 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
157 | | [Tags] | SKIP_PATCH
158 | | Given Path for 3-node testing is set
159 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
160 | | And Interfaces in 3-node path are up
161 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
162 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
163 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
164 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
165 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
166 | | ... | type_subif=two_tags dot1ad
167 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
168 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
169 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
170 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
171 | | ... | ${vlan2_index} | pop-2
172 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
173 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
174 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
175 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
176 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
177 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
178
179 | TC05: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
180 | | [Documentation]
181 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
182 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
183 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
184 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
185 | | ... | translate-1-2 method to set outer tag different from outer tag set on
186 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
187 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
188 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
189 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
190 | | ... | via DUT1 and DUT2; verify that packet is not received.
191 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
192 | | [Tags] | SKIP_PATCH
193 | | Given Path for 3-node testing is set
194 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
195 | | And Interfaces in 3-node path are up
196 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
197 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
198 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
199 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
200 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
201 | | ... | type_subif=two_tags dot1ad
202 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
203 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
204 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
205 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
206 | | ... | ${vlan2_index} | pop-2
207 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
208 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
209 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
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 | TC06: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong outer and inner 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 cross-connect (L2XC) 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 and inner tags different from tags
221 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
222 | | ... | cross-connect with one interface to TG and one Dot1ad sub-interface
223 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
224 | | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces
225 | | ... | to another one 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_wrong}
240 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
241 | | ... | ${vlan2_index} | pop-2
242 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
243 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
244 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
245 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
246 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
247 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
248
249 | TC07: DUT1 and DUT2 with L2XC and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links
250 | | [Documentation]
251 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \
252 | | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
253 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
254 | | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite
255 | | ... | translate-2-1 method; on DUT2 configure L2 cross-connect (L2XC) with
256 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with
257 | | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req
258 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
259 | | ... | via DUT1 and DUT2; verify that packet is received.
260 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
261 | | Given Path for 3-node testing is set
262 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
263 | | And Interfaces in 3-node path are up
264 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
265 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
266 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
267 | | ... | type_subif=two_tags dot1ad
268 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
269 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
270 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
271 | | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2}
272 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
273 | | ... | ${vlan2_index} | pop-1
274 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
275 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
276 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
277 | | Then Send and receive ICMP Packet
278 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad
279 | | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1}
280
281 | TC08: DUT1 and DUT2 with L2XC and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links
282 | | [Documentation]
283 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \
284 | | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
285 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
286 | | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite
287 | | ... | translate-2-1 method to set tag different from tag set on VLAN
288 | | ... | sub-interface of DUT2; on DUT2 configure L2 cross-connect (L2XC) with
289 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with
290 | | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req
291 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
292 | | ... | via DUT1 and DUT2; verify that packet is not received.
293 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
294 | | [Tags] | SKIP_PATCH
295 | | Given Path for 3-node testing is set
296 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
297 | | And Interfaces in 3-node path are up
298 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
299 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
300 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
301 | | ... | type_subif=two_tags dot1ad
302 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
303 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
304 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
305 | | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong}
306 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
307 | | ... | ${vlan2_index} | pop-1
308 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
309 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
310 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
311 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
312 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
313 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
314 | | ... | vlan2=${inner_vlan_id1}
315
316 | TC09: DUT1 and DUT2 with L2XC and VLAN translate-2-2 switch ICMPv4 between two TG links
317 | | [Documentation]
318 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
319 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
320 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
321 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method;
322 | | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG and
323 | | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1
324 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
325 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
326 | | ... | that packet is received. [Ref] IEEE 802.1ad
327 | | Given Path for 3-node testing is set
328 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
329 | | And Interfaces in 3-node path are up
330 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
331 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
332 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
333 | | ... | type_subif=two_tags dot1ad
334 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
335 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
336 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
337 | | ... | type_subif=two_tags dot1ad
338 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
339 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
340 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
341 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
342 | | ... | ${vlan2_index} | pop-2
343 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
344 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
345 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
346 | | Then Send and receive ICMP Packet
347 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad
348 | | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1}
349
350 | TC10: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
351 | | [Documentation]
352 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
353 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
354 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
355 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
356 | | ... | set inner tag different from inner tag set on Dot1ad sub-interface of
357 | | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to
358 | | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite
359 | | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another one
360 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
361 | | ... | that packet is not received. [Ref] IEEE 802.1ad
362 | | [Tags] | SKIP_PATCH
363 | | Given Path for 3-node testing is set
364 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
365 | | And Interfaces in 3-node path are up
366 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
367 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
368 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
369 | | ... | type_subif=two_tags dot1ad
370 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
371 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
372 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
373 | | ... | type_subif=two_tags dot1ad
374 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
375 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
376 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
377 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
378 | | ... | ${vlan2_index} | pop-2
379 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
380 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
381 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
382 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
383 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
384 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
385 | | ... | vlan2=${inner_vlan_id1}
386
387 | TC11: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
388 | | [Documentation]
389 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
390 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
391 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
392 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
393 | | ... | set outer tag different from outer tag set on Dot1ad sub-interface of
394 | | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to
395 | | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite
396 | | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another
397 | | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2;
398 | | ... | verify that packet is not received. [Ref] IEEE 802.1ad
399 | | [Tags] | SKIP_PATCH
400 | | Given Path for 3-node testing is set
401 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
402 | | And Interfaces in 3-node path are up
403 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
404 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
405 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
406 | | ... | type_subif=two_tags dot1ad
407 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
408 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
409 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
410 | | ... | type_subif=two_tags dot1ad
411 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
412 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
413 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
414 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
415 | | ... | ${vlan2_index} | pop-2
416 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
417 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
418 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
419 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
420 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
421 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
422 | | ... | vlan2=${inner_vlan_id1}
423
424 | TC12: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer and inner tags used (DUT1) switch ICMPv4 between two TG links
425 | | [Documentation]
426 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
427 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
428 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
429 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
430 | | ... | set tags different from tags set on Dot1ad sub-interface of DUT2;
431 | | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG
432 | | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1
433 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
434 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
435 | | ... | that packet is not received. [Ref] IEEE 802.1ad
436 | | [Tags] | SKIP_PATCH
437 | | Given Path for 3-node testing is set
438 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
439 | | And Interfaces in 3-node path are up
440 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
441 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
442 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
443 | | ... | type_subif=two_tags dot1ad
444 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
445 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
446 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
447 | | ... | type_subif=two_tags dot1ad
448 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
449 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
450 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
451 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
452 | | ... | ${vlan2_index} | pop-2
453 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
454 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
455 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
456 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
457 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
458 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
459 | | ... | vlan2=${inner_vlan_id1}