CSIT-220: Rename directories in tests directory
[csit.git] / tests / func / vlan / qinq_l2_xconnect.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 QinQ test cases*
26 | ...
27 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology with
28 | ... | single links between nodes.
29 | ... | *[Enc] Packet encapsulations:* Eth-dot1ad-IPv4-ICMPv4 on DUT1-DUT2,
30 | ... | Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4.
31 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
32 | ... | cross-connect (L2XC) switching with 802.1ad QinQ VLAN tag push and pop.
33 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are
34 | ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG
35 | ... | verifies packets for correctness and their IPv4 src-addr, dst-addr and
36 | ... | MAC addresses.
37 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1ad.
38
39 *** Variables ***
40 | ${subid}= | 10
41 | ${outer_vlan_id}= | 100
42 | ${inner_vlan_id}= | 200
43 | ${type_subif}= | two_tags
44 | ${tag_rewrite_method}= | pop-2
45
46 *** Test Cases ***
47 | TC01: DUT1 and DUT2 with L2XC and two VLAN push-pop switch ICMPv4 between two TG links
48 | | [Documentation]
49 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1ad-IPv4-ICMPv4 on \
50 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2
51 | | ... | configure L2 cross-connect (L2XC), each with one interface to TG
52 | | ... | and one Ethernet interface towards the other DUT; each DUT
53 | | ... | pushes two VLAN tags on packets received from local TG, and
54 | | ... | popping two VLAN tags on packets transmitted to local TG. [Ver]
55 | | ... | Make TG send ICMPv4 Echo Req in both directions between two of
56 | | ... | its interfaces to be switched by DUT1 and DUT2; verify all
57 | | ... | packets are received. [Ref] IEEE 802.1ad.
58 | | Given Path for 3-node testing is set
59 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
60 | | And Interfaces in 3-node path are up
61 | | When VLAN subinterfaces initialized on 3-node topology
62 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut2_node} | ${dut2_to_dut1} | ${subid}
63 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
64 | | And L2 tag rewrite method setup on interfaces
65 | | ... | ${dut1_node} | ${subif_index_1} | ${dut2_node} | ${subif_index_2}
66 | | ... | ${tag_rewrite_method}
67 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
68 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subif_index_1}
69 | | ... | ${dut2_node} | ${dut2_to_tg} | ${subif_index_2}
70 | | Then Send and receive ICMP Packet
71 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}