vpp_device: IPsec
[csit.git] / tests / vpp / func / interfaces / eth2p-eth-l2bdbasemaclrn-eth-2tap-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/shared/default.robot
16 | Resource | resources/libraries/robot/ip/ip4.robot
17 | Resource | resources/libraries/robot/ip/ip6.robot
18 | Resource | resources/libraries/robot/shared/interfaces.robot
19 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
20 | Resource | resources/libraries/robot/shared/testing_path.robot
21 | Resource | resources/libraries/robot/shared/traffic.robot
22 | Library  | resources.libraries.python.Trace
23 | Library  | resources.libraries.python.Tap
24 | Library  | resources.libraries.python.Namespaces
25 | Library  | resources.libraries.python.IPUtil
26 | ...
27 | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | SKIP_TEST
28 | ...
29 | Test Setup | Set up TAP functional test
30 | ...
31 | Test Teardown | Tear down TAP functional test with Linux bridge | ${bid_TAP}
32 | ...
33 | Documentation | *Tap Interface Traffic Tests*
34 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links
35 | ... | between nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of
37 | ... | IPv4.
38 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
39 | ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG)
40 | ... | are set depending on test case; Namespaces (NM)
41 | ... | are set on DUT1 with attached linux-TAP.
42 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets
43 | ... | are sent by TG on link to DUT1; On receipt TG verifies packets
44 | ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses.
45 | ... | *[Ref] Applicable standard specifications:*
46
47 *** Variables ***
48 | ${bid_from_TG}= | 19
49 | ${bid_to_TG}= | 20
50 | ${bid_TAP}= | tapBr
51
52 | ${tap_int1}= | tap0
53 | ${tap_int2}= | tap1
54
55 *** Test Cases ***
56 | TC01: Tap Interface Simple BD
57 | | [Documentation]
58 | | ... | [Top] TG-DUT1-TG.
59 | | ... | [Enc] Eth-IPv4-ICMPv4.
60 | | ... | [Cfg] On DUT1 configure two L2BD with two if's for each L2BD with MAC\
61 | | ... | learning and one L2BD joining two linux-TAP interfaces created by VPP\
62 | | ... | located in namespace.
63 | | ... | [Ver] Packet sent from TG is passed through all L2BD and received\
64 | | ... | back on TG. Then src_ip, dst_ip and MAC are checked.
65 | | ...
66 | | Given Configure path in 2-node circular topology | ${nodes['TG']}
67 | | ... | ${nodes['DUT1']} | ${nodes['TG']}
68 | | And Set interfaces in 2-node circular topology up
69 | | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1}
70 | | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2}
71 | | And Set Interface State | ${dut_node} | ${int1} | up
72 | | And Set Interface State | ${dut_node} | ${int2} | up
73 | | And Create bridge domain | ${dut_node}
74 | | ... | ${bid_from_TG} | learn=${TRUE}
75 | | And Create bridge domain | ${dut_node}
76 | | ... | ${bid_to_TG} | learn=${TRUE}
77 | | And Linux Add Bridge | ${dut_node}
78 | | ... | ${bid_TAP} | ${tap_int1} | ${tap_int2}
79 | | And Add interface to bridge domain | ${dut_node}
80 | | ... | ${int1} | ${bid_to_TG} | 0
81 | | And Add interface to bridge domain | ${dut_node}
82 | | ... | ${dut_to_tg_if1} | ${bid_to_TG} | 0
83 | | And Add interface to bridge domain | ${dut_node}
84 | | ... | ${int2} | ${bid_from_TG} | 0
85 | | And Add interface to bridge domain | ${dut_node}
86 | | ... | ${dut_to_tg_if2} | ${bid_from_TG} | 0
87 | | Then Send ICMP packet and verify received packet | ${tg_node}
88 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}