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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/bridge_domain.robot
17 | Resource | resources/libraries/robot/qemu.robot
18 | Library | resources.libraries.python.Trace
19 | Force Tags | HW_ENV | VM_ENV
20 | Test Setup | Run Keywords | Setup all DUTs before test
21 | ... | AND | Setup all TGs before traffic script
22 | Test Teardown | Show Packet Trace on All DUTs | ${nodes}
23 | Documentation | *Bridge domain test suite.*
25 | ... | Test suite uses 2-node topology TGTG - DUT1 - TG with two links
26 | ... | between nodes as well as 3-node topology TG - DUT1 - DUT2 - TG
27 | ... | with one link between nodes. Test packets are sent in both directions
28 | ... | and contain Ethernet header, IPv4 header and ICMP message. Ethernet
29 | ... | header MAC addresses are matching MAC addresses of the TG node.
34 | ${sock1}= | /tmp/sock1
35 | ${sock2}= | /tmp/sock2
38 | VPP reports interfaces
39 | | [Documentation] | Report VPP interfaces on the given node
40 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | 3_NODE_SINGLE_LINK_TOPO
41 | | VPP reports interfaces on | ${nodes['DUT1']}
43 | Vpp forwards packets via L2 bridge domain 2 ports
44 | | [Documentation] | Create bridge domain (learning enabled) on one VPP node,
45 | | ... | add there two interfaces and check traffic
46 | | ... | bidirectionally.
47 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
48 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
49 | | When Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
50 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
52 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
54 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
55 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
56 | | ... | ${tg_to_dut_if2}
58 | Vpp forwards packets via L2 bridge domain in circular topology
59 | | [Documentation] | Create bridge domains (learning enabled) on two VPP nodes,
60 | | ... | add two interfaces to each bridge domain and check traffic
61 | | ... | bidirectionally.
62 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
63 | | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
64 | | ... | ${nodes['DUT2']}
65 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
66 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
68 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
70 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
71 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
73 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
75 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
76 | | ... | ${dut2_node}
77 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
78 | | ... | ${tg_to_dut2}
80 | Vpp forwards packets via L2 bridge domain in circular topology with static L2FIB entries
81 | | [Documentation] | Create bridge domains (learning disabled) on two VPP
82 | | ... | nodes, add two interfaces to each bridge domain and set
83 | | ... | static L2FIB entry on each interface and check traffic
84 | | ... | bidirectionally.
85 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
86 | | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
87 | | ... | ${nodes['DUT2']}
88 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
89 | | ... | learn=${FALSE}
90 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
92 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
94 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
95 | | ... | ${tg_to_dut1}
96 | | ... | ${dut1_node}
97 | | ... | ${dut1_to_tg}
99 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
100 | | ... | ${tg_to_dut2}
101 | | ... | ${dut1_node}
102 | | ... | ${dut1_to_dut2}
104 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
105 | | ... | learn=${FALSE}
106 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
108 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
110 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
111 | | ... | ${tg_to_dut1}
112 | | ... | ${dut2_node}
113 | | ... | ${dut2_to_dut1}
115 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
116 | | ... | ${tg_to_dut2}
117 | | ... | ${dut2_node}
118 | | ... | ${dut2_to_tg}
120 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
121 | | ... | ${dut2_node}
122 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
123 | | ... | ${tg_to_dut2}
125 | VPP forwards packets through VM via two L2 bridge domains
126 | | [Documentation] | Setup and run VM connected to VPP via Vhost-User
127 | | ... | interfaces and check packet forwarding through VM via two
128 | | ... | L2 bridge domains with learning enabled.
129 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
130 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
131 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
134 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
135 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
137 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1}
139 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2}
140 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
142 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
144 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
145 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
147 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
148 | | ... | ${tg_to_dut_if2}
149 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
150 | | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node}
152 | VPP forwards packets through VM via two L2 bridge domains with static L2FIB entries
153 | | [Documentation] | Setup and run VM connected to VPP via Vhost-User
154 | | ... | interfaces and check packet forwarding through VM via two
155 | | ... | L2 bridge domains with learning disabled (static L2BFIB
157 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
158 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
159 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
162 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
163 | | ... | learn=${FALSE}
164 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
166 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1}
168 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
169 | | ... | ${tg_to_dut_if1}
170 | | ... | ${dut_node}
171 | | ... | ${dut_to_tg_if1}
173 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
174 | | ... | ${tg_to_dut_if2}
175 | | ... | ${dut_node}
176 | | ... | ${vhost_if1}
178 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2}
179 | | ... | learn=${FALSE}
180 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
182 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
184 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
185 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
186 | | ... | ${tg_to_dut_if2}
187 | | ... | ${dut_node}
188 | | ... | ${dut_to_tg_if2}
190 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
191 | | ... | ${tg_to_dut_if1}
192 | | ... | ${dut_node}
193 | | ... | ${vhost_if2}
195 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
197 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
198 | | ... | ${tg_to_dut_if2}
199 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
200 | | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node}