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