CSIT-220: Rename directories in tests directory
[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 | | Given Path for 3-node testing is set
95 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
96 | | And Interfaces in 3-node path are up
97 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
98 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
99 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
100 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
101 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
102 | | ... | ${vlan1_index} | translate-1-1 | tag1_id=${outer_vlan_wrong}
103 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
104 | | ... | ${vlan2_index} | pop-1
105 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
106 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
107 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
108 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
109 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
110 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
111
112 | TC03: DUT1 and DUT2 with L2XC and VLAN translate-1-2 (DUT1) switch ICMPv4 between two TG links
113 | | [Documentation]
114 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
115 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
116 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
117 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
118 | | ... | translate-1-2 method; on DUT2 configure L2 cross-connect (L2XC) with
119 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
120 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
121 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
122 | | ... | via DUT1 and DUT2; verify that packet is received.
123 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
124 | | Given Path for 3-node testing is set
125 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
126 | | And Interfaces in 3-node path are up
127 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
128 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
129 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
130 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
131 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
132 | | ... | type_subif=two_tags dot1ad
133 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
134 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
135 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
136 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
137 | | ... | ${vlan2_index} | pop-2
138 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
139 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
140 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
141 | | Then Send and receive ICMP Packet
142 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1q
143 | | ... | vlan1=${outer_vlan_id1}
144
145 | TC04: DUT1 and DUT2 with L2XC and VLAN translate-1-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
146 | | [Documentation]
147 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
148 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
149 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
150 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
151 | | ... | translate-1-2 method to set inner tag different from inner tag set on
152 | | ... | Dot1ad sub-interface of DUT2; on DUT2 configure L2 cross-connect with
153 | | ... | one interface to TG and one Dot1ad sub-interface towards DUT1 with
154 | | ... | VLAN tag rewrite pop-2 method. [Ver] Make TG send ICMPv4 Echo Req
155 | | ... | tagged with one Dot1q tag from one of its interfaces to another one
156 | | ... | via DUT1 and DUT2; verify that packet is not received.
157 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
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 | | Given Path for 3-node testing is set
193 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
194 | | And Interfaces in 3-node path are up
195 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
196 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
197 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
198 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
199 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
200 | | ... | type_subif=two_tags dot1ad
201 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
202 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
203 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
204 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
205 | | ... | ${vlan2_index} | pop-2
206 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
207 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
208 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
209 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
210 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
211 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
212
213 | 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
214 | | [Documentation]
215 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-ICMPv4 on TG-DUT1, \
216 | | ... | Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
217 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
218 | | ... | DUT2 and one VLAN sub-interface towards TG with VLAN tag rewrite
219 | | ... | translate-1-2 method to set outer and inner tags different from tags
220 | | ... | set on Dot1ad sub-interface of DUT2; on DUT2 configure L2
221 | | ... | cross-connect with one interface to TG and one Dot1ad sub-interface
222 | | ... | towards DUT1 with VLAN tag rewrite pop-2 method. [Ver] Make TG send
223 | | ... | ICMPv4 Echo Req tagged with one Dot1q tag from one of its interfaces
224 | | ... | to another one via DUT1 and DUT2; verify that packet is not received.
225 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
226 | | Given Path for 3-node testing is set
227 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
228 | | And Interfaces in 3-node path are up
229 | | ${vlan1_name} | ${vlan1_index}= | When Vlan Subinterface Created
230 | | ... | ${dut1_node} | ${dut1_to_tg} | ${outer_vlan_id1}
231 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
232 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
233 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
234 | | ... | type_subif=two_tags dot1ad
235 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
236 | | ... | ${vlan1_index} | translate-1-2 | push_dot1q=${False}
237 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
238 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
239 | | ... | ${vlan2_index} | pop-2
240 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
241 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
242 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
243 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
244 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
245 | | ... | ${tg_to_dut2} | encaps=Dot1q | vlan1=${outer_vlan_id1}
246
247 | TC07: DUT1 and DUT2 with L2XC and VLAN translate-2-1 (DUT1) switch ICMPv4 between two TG links
248 | | [Documentation]
249 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \
250 | | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
251 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
252 | | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite
253 | | ... | translate-2-1 method; on DUT2 configure L2 cross-connect (L2XC) with
254 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with
255 | | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req
256 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
257 | | ... | via DUT1 and DUT2; verify that packet is received.
258 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
259 | | Given Path for 3-node testing is set
260 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
261 | | And Interfaces in 3-node path are up
262 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
263 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
264 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
265 | | ... | type_subif=two_tags dot1ad
266 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
267 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
268 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
269 | | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_id2}
270 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
271 | | ... | ${vlan2_index} | pop-1
272 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
273 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
274 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
275 | | Then Send and receive ICMP Packet
276 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad
277 | | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1}
278
279 | TC08: DUT1 and DUT2 with L2XC and VLAN translate-2-1 with wrong tag used (DUT1) switch ICMPv4 between two TG links
280 | | [Documentation]
281 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1, \
282 | | ... | Eth-dot1q-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2.
283 | | ... | [Cfg] On DUT1 configure L2 cross-connect (L2XC) with one interface to
284 | | ... | DUT2 and one Dot1ad sub-interface towards TG with VLAN tag rewrite
285 | | ... | translate-2-1 method to set tag different from tag set on VLAN
286 | | ... | sub-interface of DUT2; on DUT2 configure L2 cross-connect (L2XC) with
287 | | ... | one interface to TG and one VLAN sub-interface towards DUT1 with
288 | | ... | VLAN tag rewrite pop-1 method. [Ver] Make TG send ICMPv4 Echo Req
289 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
290 | | ... | via DUT1 and DUT2; verify that packet is not received.
291 | | ... | [Ref] IEEE 802.1q, IEEE 802.1ad
292 | | Given Path for 3-node testing is set
293 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
294 | | And Interfaces in 3-node path are up
295 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
296 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
297 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
298 | | ... | type_subif=two_tags dot1ad
299 | | ${vlan2_name} | ${vlan2_index}= | And Vlan Subinterface Created
300 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${outer_vlan_id2}
301 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
302 | | ... | ${vlan1_index} | translate-2-1 | tag1_id=${outer_vlan_wrong}
303 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
304 | | ... | ${vlan2_index} | pop-1
305 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
306 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
307 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
308 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
309 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
310 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
311 | | ... | vlan2=${inner_vlan_id1}
312
313 | TC09: DUT1 and DUT2 with L2XC and VLAN translate-2-2 switch ICMPv4 between two TG links
314 | | [Documentation]
315 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
316 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
317 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
318 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method;
319 | | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG and
320 | | ... | one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1
321 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
322 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
323 | | ... | that packet is received. [Ref] IEEE 802.1ad
324 | | Given Path for 3-node testing is set
325 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
326 | | And Interfaces in 3-node path are up
327 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
328 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
329 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
330 | | ... | type_subif=two_tags dot1ad
331 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
332 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
333 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
334 | | ... | type_subif=two_tags dot1ad
335 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
336 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
337 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_id2}
338 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
339 | | ... | ${vlan2_index} | pop-2
340 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
341 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
342 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
343 | | Then Send and receive ICMP Packet
344 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | encaps=Dot1ad
345 | | ... | vlan1=${outer_vlan_id1} | vlan2=${inner_vlan_id1}
346
347 | TC10: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong inner tag used (DUT1) switch ICMPv4 between two TG links
348 | | [Documentation]
349 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
350 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
351 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
352 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
353 | | ... | set inner tag different from inner tag set on Dot1ad sub-interface of
354 | | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to
355 | | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite
356 | | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another one
357 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
358 | | ... | that packet is not received. [Ref] IEEE 802.1ad
359 | | Given Path for 3-node testing is set
360 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
361 | | And Interfaces in 3-node path are up
362 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
363 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
364 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
365 | | ... | type_subif=two_tags dot1ad
366 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
367 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
368 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
369 | | ... | type_subif=two_tags dot1ad
370 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
371 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
372 | | ... | tag1_id=${outer_vlan_id2} | tag2_id=${inner_vlan_wrong}
373 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
374 | | ... | ${vlan2_index} | pop-2
375 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
376 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
377 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
378 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
379 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
380 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
381 | | ... | vlan2=${inner_vlan_id1}
382
383 | TC11: DUT1 and DUT2 with L2XC and VLAN translate-2-2 with wrong outer tag used (DUT1) switch ICMPv4 between two TG links
384 | | [Documentation]
385 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
386 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
387 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
388 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
389 | | ... | set outer tag different from outer tag set on Dot1ad sub-interface of
390 | | ... | DUT2; on DUT2 configure L2 cross-connect (L2XC) with one interface to
391 | | ... | TG and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite
392 | | ... | pop-1 tagged with Dot1ad tags from one of its interfaces to another
393 | | ... | one method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2;
394 | | ... | verify that packet is not received. [Ref] IEEE 802.1ad
395 | | Given Path for 3-node testing is set
396 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
397 | | And Interfaces in 3-node path are up
398 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
399 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
400 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
401 | | ... | type_subif=two_tags dot1ad
402 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
403 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
404 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
405 | | ... | type_subif=two_tags dot1ad
406 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
407 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
408 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_id2}
409 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
410 | | ... | ${vlan2_index} | pop-2
411 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
412 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
413 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
414 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
415 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
416 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
417 | | ... | vlan2=${inner_vlan_id1}
418
419 | 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
420 | | [Documentation]
421 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on TG-DUT1 and \
422 | | ... | on DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUT2. [Cfg] On DUT1 configure L2
423 | | ... | cross-connect (L2XC) with one interface to DUT2 and one Dot1ad
424 | | ... | sub-interface towards TG with VLAN tag rewrite translate-2-2 method to
425 | | ... | set tags different from tags set on Dot1ad sub-interface of DUT2;
426 | | ... | on DUT2 configure L2 cross-connect (L2XC) with one interface to TG
427 | | ... | and one Dot1ad sub-interface towards DUT1 with VLAN tag rewrite pop-1
428 | | ... | tagged with Dot1ad tags from one of its interfaces to another one
429 | | ... | method. [Ver] Make TG send ICMPv4 Echo Req via DUT1 and DUT2; verify
430 | | ... | that packet is not received. [Ref] IEEE 802.1ad
431 | | Given Path for 3-node testing is set
432 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
433 | | And Interfaces in 3-node path are up
434 | | ${vlan1_name} | ${vlan1_index}= | When Tagged Subinterface Created
435 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subid}
436 | | ... | outer_vlan_id=${outer_vlan_id1} | inner_vlan_id=${inner_vlan_id1}
437 | | ... | type_subif=two_tags dot1ad
438 | | ${vlan2_name} | ${vlan2_index}= | And Tagged Subinterface Created
439 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${subid}
440 | | ... | outer_vlan_id=${outer_vlan_id2} | inner_vlan_id=${inner_vlan_id2}
441 | | ... | type_subif=two_tags dot1ad
442 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut1_node}
443 | | ... | ${vlan1_index} | translate-2-2 | push_dot1q=${False}
444 | | ... | tag1_id=${outer_vlan_wrong} | tag2_id=${inner_vlan_wrong}
445 | | And L2 Tag Rewrite Method Is Set On Interface | ${dut2_node}
446 | | ... | ${vlan2_index} | pop-2
447 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
448 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${vlan1_index}
449 | | ... | ${dut2_node} | ${dut2_to_tg} | ${vlan2_index}
450 | | Then Run Keyword And Expect Error | ICMP echo Rx timeout
451 | | ... | Send and receive ICMP Packet | ${tg_node} | ${tg_to_dut1}
452 | | ... | ${tg_to_dut2} | encaps=Dot1ad | vlan1=${outer_vlan_id1}
453 | | ... | vlan2=${inner_vlan_id1}