CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / tests / func / l2bd / eth2p-eth-l2bdbasemaclrn-func.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/bridge_domain.robot
17 | Resource | resources/libraries/robot/testing_path.robot
18 | Resource | resources/libraries/robot/qemu.robot
19 | Resource | resources/libraries/robot/interfaces.robot
20 | Library  | resources.libraries.python.Trace
21 | Force Tags | HW_ENV | VM_ENV | SKIP_VPP_PATCH
22 | Test Setup | Set up functional test
23 | Test Teardown | Tear down functional test
24 | Documentation | *L2 bridge-domain test cases*
25 | ...
26 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links
27 | ... | between nodes; TG-DUT1-DUT2-TG 3-node circular topology with
28 | ... | single links between nodes.
29 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of
30 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply
31 | ... | to all links.
32 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
33 | ... | bridge-domain (L2BD) switching combined with MAC learning enabled.
34 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets
35 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on
36 | ... | receive TG verifies packets for correctness and their IPv4 (IPv6)
37 | ... | src-addr, dst-addr and MAC addresses.
38 | ... | *[Ref] Applicable standard specifications:*
39
40 *** Variables ***
41 | ${bd_id1}= | 1
42 | ${bd_id2}= | 2
43
44 *** Test Cases ***
45 | TC01: DUT reports active interfaces
46 | | [Documentation]
47 | | ... | [Top] TG=DUT1; TG-DUT1-DUT2-TG. [Enc] None. [Cfg] Discovered \
48 | | ... | active interfaces. [Ver] Report active interfaces on DUT. [Ref]
49 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | 3_NODE_SINGLE_LINK_TOPO
50 | | VPP reports interfaces through VAT on '${nodes['DUT1']}'
51
52 | TC02: DUT with L2BD (MAC learning) switch ICMPv4 between two TG links
53 | | [Documentation]
54 | | ... | [Top] TG=DUT1. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \
55 | | ... | two i/fs into L2BD with MAC learning. [Ver] Make TG verify
56 | | ... | ICMPv4 Echo Req pkts are switched thru DUT1 in both directions
57 | | ... | and are correct on receive. [Ref]
58 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
59 | | Given Configure path in 2-node circular topology
60 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
61 | | And Set interfaces in 2-node circular topology up
62 | | When Create bridge domain | ${dut_node} | ${bd_id1}
63 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
64 | | ... | ${bd_id1}
65 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
66 | | ... | ${bd_id1}
67 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
68 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
69
70 | TC03: DUT1 and DUT2 with L2BD (MAC learning) switch between two TG links
71 | | [Documentation]
72 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and DUT2 \
73 | | ... | configure two i/fs into L2BD with MAC learning. [Ver] Make TG
74 | | ... | verify ICMPv4 Echo Req pkts are switched thru DUT1 and DUT2 in
75 | | ... | both directions and are correct on receive. [Ref]
76 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
77 | | Given Configure path in 3-node circular topology
78 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
79 | | And Set interfaces in 3-node circular topology up
80 | | When Create bridge domain | ${dut1_node} | ${bd_id1}
81 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg}
82 | | ... | ${bd_id1}
83 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_dut2}
84 | | ... | ${bd_id1}
85 | | And Create bridge domain | ${dut2_node} | ${bd_id2}
86 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg}
87 | | ... | ${bd_id2}
88 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_dut1}
89 | | ... | ${bd_id2}
90 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
91 | | ... | ${tg_to_dut1} | ${tg_to_dut2}