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 TG - 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.
36 | ${sock1}= | /tmp/sock1
37 | ${sock2}= | /tmp/sock2
40 | VPP reports interfaces
41 | | [Documentation] | Report VPP interfaces on the given node
42 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | 3_NODE_SINGLE_LINK_TOPO
43 | | VPP reports interfaces on | ${nodes['DUT1']}
45 | Vpp forwards packets via L2 bridge domain 2 ports
46 | | [Documentation] | Create bridge domain (learning enabled) on one VPP node,
47 | | ... | add there two interfaces and check traffic
48 | | ... | bidirectionally.
49 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
50 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
51 | | When Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
52 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
54 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
56 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
57 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
58 | | ... | ${tg_to_dut_if2}
60 | Vpp forwards packets via L2 bridge domain in circular topology
61 | | [Documentation] | Create bridge domains (learning enabled) on two VPP nodes,
62 | | ... | add two interfaces to each bridge domain and check traffic
63 | | ... | bidirectionally.
64 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
65 | | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
66 | | ... | ${nodes['DUT2']}
67 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
68 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
70 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
72 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
73 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
75 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
77 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
78 | | ... | ${dut2_node}
79 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
80 | | ... | ${tg_to_dut2}
82 | Vpp forwards packets via L2 bridge domain in circular topology with static L2FIB entries
83 | | [Documentation] | Create bridge domains (learning disabled) on two VPP
84 | | ... | nodes, add two interfaces to each bridge domain and set
85 | | ... | static L2FIB entry on each interface and check traffic
86 | | ... | bidirectionally.
87 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
88 | | Given Path for 3-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
89 | | ... | ${nodes['DUT2']}
90 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
91 | | ... | learn=${FALSE}
92 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg}
94 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
96 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
97 | | ... | ${tg_to_dut1}
98 | | ... | ${dut1_node}
99 | | ... | ${dut1_to_tg}
101 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
102 | | ... | ${tg_to_dut2}
103 | | ... | ${dut1_node}
104 | | ... | ${dut1_to_dut2}
106 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
107 | | ... | learn=${FALSE}
108 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg}
110 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
112 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
113 | | ... | ${tg_to_dut1}
114 | | ... | ${dut2_node}
115 | | ... | ${dut2_to_dut1}
117 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
118 | | ... | ${tg_to_dut2}
119 | | ... | ${dut2_node}
120 | | ... | ${dut2_to_tg}
122 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
123 | | ... | ${dut2_node}
124 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
125 | | ... | ${tg_to_dut2}
127 | Vpp forwards packets via L2 bridge domain with split-horizon groups set in circular topology
128 | | [Documentation] | Create bridge domains (learning enabled) on two VPP nodes,
129 | | ... | add interfaces to each bridge domain where both interfaces
130 | | ... | toward TG are in the same split-horizon group and check
131 | | ... | traffic bidirectionally.
132 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
133 | | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
134 | | ... | ${nodes['DUT1']}
135 | | ... | ${nodes['DUT2']}
136 | | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
137 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
138 | | ... | ${bd_id1} | ${shg1}
139 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
140 | | ... | ${bd_id1} | ${shg1}
141 | | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
143 | | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
144 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
145 | | ... | ${bd_id2} | ${shg2}
146 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
147 | | ... | ${bd_id2} | ${shg2}
148 | | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
150 | | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
151 | | ... | ${dut2_node}
152 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node}
153 | | ... | ${tg_to_dut1_if1}
154 | | ... | ${tg_to_dut2_if1}
155 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
156 | | ... | ${tg_to_dut1_if1}
157 | | ... | ${tg_to_dut2_if2}
158 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
159 | | ... | ${tg_to_dut1_if2}
160 | | ... | ${tg_to_dut2_if1}
161 | | And Send and receive ICMPv4 bidirectionally | ${tg_node}
162 | | ... | ${tg_to_dut1_if2}
163 | | ... | ${tg_to_dut2_if2}
164 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
165 | | ... | Send and receive ICMPv4 bidirectionally
166 | | | ... | ${tg_node} | ${tg_to_dut1_if1}
167 | | | ... | ${tg_to_dut1_if2}
168 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
169 | | ... | Send and receive ICMPv4 bidirectionally
170 | | | ... | ${tg_node} | ${tg_to_dut2_if1}
171 | | | ... | ${tg_to_dut2_if2}
173 | VPP forwards packets through VM via two L2 bridge domains
174 | | [Documentation] | Setup and run VM connected to VPP via Vhost-User
175 | | ... | interfaces and check packet forwarding through VM via two
176 | | ... | L2 bridge domains with learning enabled.
177 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
178 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
179 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
182 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
183 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
185 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1}
187 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2}
188 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
190 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
192 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
193 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
195 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
196 | | ... | ${tg_to_dut_if2}
197 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
198 | | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node}
200 | VPP forwards packets through VM via two L2 bridge domains with static L2FIB entries
201 | | [Documentation] | Setup and run VM connected to VPP via Vhost-User
202 | | ... | interfaces and check packet forwarding through VM via two
203 | | ... | L2 bridge domains with learning disabled (static L2BFIB
205 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
206 | | Given Path for 2-node BD testing is set | ${nodes['TG']} | ${nodes['DUT1']}
207 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
210 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id1}
211 | | ... | learn=${FALSE}
212 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if1}
214 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if1}
216 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
217 | | ... | ${tg_to_dut_if1}
218 | | ... | ${dut_node}
219 | | ... | ${dut_to_tg_if1}
221 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
222 | | ... | ${tg_to_dut_if2}
223 | | ... | ${dut_node}
224 | | ... | ${vhost_if1}
226 | | And Bridge domain on DUT node is created | ${dut_node} | ${bd_id2}
227 | | ... | learn=${FALSE}
228 | | And Interface is added to bridge domain | ${dut_node} | ${dut_to_tg_if2}
230 | | And Interface is added to bridge domain | ${dut_node} | ${vhost_if2}
232 | | And Interfaces on all VPP nodes in the path are up | ${dut_node}
233 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
234 | | ... | ${tg_to_dut_if2}
235 | | ... | ${dut_node}
236 | | ... | ${dut_to_tg_if2}
238 | | And Destination port is added to L2FIB on DUT node | ${tg_node}
239 | | ... | ${tg_to_dut_if1}
240 | | ... | ${dut_node}
241 | | ... | ${vhost_if2}
243 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
245 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
246 | | ... | ${tg_to_dut_if2}
247 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
248 | | ... | AND | Stop and Clear QEMU | ${dut_node} | ${vm_node}