CSIT-158: Tap interface tests
[csit.git] / tests / suites / vxlan / vxlan_bd_dot1q.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/vxlan.robot
18 | Resource | resources/libraries/robot/l2_traffic.robot
19 | Library  | resources.libraries.python.Trace
20 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV
21 | Test Setup | Run Keywords | Setup all DUTs before test
22 | ...        | AND          | 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 | *RFC7348 VXLAN: Bridge-domain with VXLAN over VLAN 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-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on
30 | ... | DUT1-DUT2, Eth-dot1q-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4.
31 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
32 | ... | bridge-domain (L2BD) switching combined with static MACs, MAC learning
33 | ... | enabled and Split Horizon Groups (SHG) depending on test case; VXLAN
34 | ... | tunnels are configured between L2BDs on DUT1 and DUT2.
35 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are
36 | ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG
37 | ... | verifies packets for correctness and their IPv4 src-addr, dst-addr and
38 | ... | MAC addresses.
39 | ... | *[Ref] Applicable standard specifications:* RFC7348.
40
41 *** Variables ***
42 | ${VNI}= | 23
43 | ${BID}= | 23
44 | ${VLAN}= | 10
45
46 *** Test Cases ***
47 | TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4oVLAN tunnels switch ICMPv4 between TG links
48 | | [Documentation]
49 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-dot1q-IPv4-VXLAN-Eth-IPv4-ICMPv4 on\
50 | | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2
51 | | ... | configure L2 bridge-domain (MAC learning enabled), each with one
52 | | ... | interface to TG and one VXLAN tunnel interface towards the other DUT
53 | | ... | over VLAN sub-interface. [Ver] Make TG send ICMPv4 Echo Req between
54 | | ... | two of its interfaces, verify all packets are received. [Ref] RFC7348.
55 | | Given Path for 3-node testing is set
56 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
57 | | And   Interfaces in 3-node path are up
58 | | And   Vlan interfaces for VXLAN are created | ${VLAN}
59 | |       ...                                   | ${dut1_node} | ${dut1_to_dut2}
60 | |       ...                                   | ${dut2_node} | ${dut2_to_dut1}
61 | | And   IP addresses are set on interfaces
62 | |       ...         | ${dut1_node} | ${dut1s_vlan_name} | ${dut1s_vlan_index}
63 | |       ...         | ${dut2_node} | ${dut2s_vlan_name} | ${dut2s_vlan_index}
64 | | ${dut1s_vxlan}= | When Create VXLAN interface     | ${dut1_node} | ${VNI}
65 | |                 | ...  | ${dut1s_ip_address} | ${dut2s_ip_address}
66 | |                   And  Interfaces are added to BD | ${dut1_node} | ${BID}
67 | |                   ...  | ${dut1_to_tg} | ${dut1s_vxlan}
68 | | ${dut2s_vxlan}= | And  Create VXLAN interface     | ${dut2_node} | ${VNI}
69 | |                 | ...  | ${dut2s_ip_address} | ${dut1s_ip_address}
70 | |                   And  Interfaces are added to BD | ${dut2_node} | ${BID}
71 | |                   ...  | ${dut2_to_tg} | ${dut2s_vxlan}
72 | | Then Send and receive ICMPv4 bidirectionally
73 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}