badc7a66717543ef91a7c6650e109b43de7c9b76
[csit.git] / tests / suites / bridge_domain / bridge_domain_untagged.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 | Library  | resources.libraries.python.Trace
18 | Force Tags | HW_ENV | VM_ENV
19 | Test Setup | Run Keywords | Setup all DUTs before test
20 | ...        | AND          | Setup all TGs before traffic script
21 | Test Teardown | Show Packet Trace on All DUTs | ${nodes}
22 | Documentation | *Bridge domain test suite.*
23 | ...
24 | ... | Test suite uses 2-node topology TGTG - DUT1 - TG with two links
25 | ... | between nodes as well as 3-node topology TG - DUT1 - DUT2 - TG
26 | ... | with one link between nodes. Test packets are sent in both directions
27 | ... | and contain Ethernet header, IPv4 header and ICMP message. Ethernet
28 | ... | header MAC addresses are matching MAC addresses of the TG node.
29
30 *** Variables ***
31 | ${bd_id1} = | 1
32 | ${bd_id2} = | 2
33
34 *** Test Cases ***
35 | VPP reports interfaces
36 | | [Documentation] | Report VPP interfaces on the given node
37 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | 3_NODE_SINGLE_LINK_TOPO
38 | | VPP reports interfaces on | ${nodes['DUT1']}
39
40 | Vpp forwards packets via L2 bridge domain 2 ports
41 | | [Documentation] | Create bridge domain (learning enabled) on one VPP node,
42 | | ...             | add there two interfaces and check traffic
43 | | ...             | bidirectionally.
44 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
45 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
46 | | When Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
47 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
48 | | ...                                     | ${bd_id1}
49 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
50 | | ...                                     | ${bd_id1}
51 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
52 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
53 | | ...                                     | ${tg_to_dut_if2}
54
55 | Vpp forwards packets via L2 bridge domain in circular topology
56 | | [Documentation] | Create bridge domains (learning enabled) on two VPP nodes,
57 | | ...             | add two interfaces to each bridge domain and check traffic
58 | | ...             | bidirectionally.
59 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
60 | | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
61 | | ...                                     | ${nodes['DUT2']}
62 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
63 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
64 | | ...                                     | ${bd_id1}
65 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
66 | | ...                                     | ${bd_id1}
67 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
68 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
69 | | ...                                     | ${bd_id2}
70 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
71 | | ...                                     | ${bd_id2}
72 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
73 | | ...                                                | ${dut2_node}
74 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
75 | | ...                                          | ${tg_to_dut2}
76
77 | Vpp forwards packets via L2 bridge domain in circular topology with static L2FIB entries
78 | | [Documentation] | Create bridge domains (learning disabled) on two VPP
79 | | ...             | nodes, add two interfaces to each bridge domain and set
80 | | ...             | static L2FIB entry on each interface and check traffic
81 | | ...             | bidirectionally.
82 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
83 | | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
84 | | ...                                     | ${nodes['DUT2']}
85 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
86 | | ...                                       | learn=${FALSE}
87 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
88 | | ...                                     | ${bd_id1}
89 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
90 | | ...                                     | ${bd_id1}
91 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
92 | | ...                                                | ${tg_to_dut1}
93 | | ...                                                | ${dut1_node}
94 | | ...                                                | ${dut1_to_tg}
95 | | ...                                                | ${bd_id1}
96 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
97 | | ...                                                | ${tg_to_dut2}
98 | | ...                                                | ${dut1_node}
99 | | ...                                                | ${dut1_to_dut2}
100 | | ...                                                | ${bd_id1}
101 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
102 | | ...                                      | learn=${FALSE}
103 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
104 | | ...                                     | ${bd_id2}
105 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
106 | | ...                                     | ${bd_id2}
107 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
108 | | ...                                                | ${tg_to_dut1}
109 | | ...                                                | ${dut2_node}
110 | | ...                                                | ${dut2_to_dut1}
111 | | ...                                                | ${bd_id2}
112 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
113 | | ...                                                | ${tg_to_dut2}
114 | | ...                                                | ${dut2_node}
115 | | ...                                                | ${dut2_to_tg}
116 | | ...                                                | ${bd_id2}
117 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
118 | | ...                                                | ${dut2_node}
119 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
120 | | ...                                          | ${tg_to_dut2}