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 | &{if_settings}= | enabled=True
16 # Bridge domain settings
18 | &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
19 | ... | unknown-unicast-flood=${True} | arp-termination=${False}
20 | &{bd_if_settings}= | split_horizon_group=${0} | bvi=${False}
22 | ${acl_name_macip}= | macip
23 | ${acl_name_l3_ip4}= | acl_l3_ip4
24 | ${acl_name_l3_ip6}= | acl_l3_ip6
25 | ${acl_name_l4}= | acl_l4
26 | ${acl_name_mixed}= | acl_mixed
27 | ${acl_name_icmp}= | acl_icmp
28 | ${acl_name_icmpv6}= | acl_icmpv6
29 | ${acl_name_reflex}= | acl_reflex
32 | Resource | resources/libraries/robot/shared/default.robot
33 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
34 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
35 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
36 | Resource | resources/libraries/robot/honeycomb/access_control_lists.robot
37 | Resource | resources/libraries/robot/shared/testing_path.robot
38 | Resource | resources/libraries/robot/shared/traffic.robot
39 | Library | resources.libraries.python.honeycomb.HcAPIKwACL.ACLKeywords
40 | Library | resources.libraries.python.Trace
41 | Library | resources.libraries.python.IPv4Setup
42 | Library | resources.libraries.python.IPv4Util
43 | Library | resources.libraries.python.IPv6Util
44 | Library | resources.libraries.python.Routing
46 | Test Setup | Clear Packet Trace on All DUTs | ${nodes}
48 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
50 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
52 | Documentation | *Honeycomb access control lists test suite for ACL plugin.*
54 | Force Tags | HC_FUNC
57 | TC01: ACL MAC filtering through plugin-acl node - bridged
59 | | ... | [Top] TG=DUT1=TG.
60 | | ... | [Enc] Eth-IPv4-TCP.
61 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
62 | | ... | and configure L2 MAC ACL on ingress interface.
63 | | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
64 | | ... | using different MACs. Receive all packets except those with\
65 | | ... | MACs in the filtered ranges.
67 | | [Teardown] | Bridged ACL test teardown
69 | | Given Setup Interfaces And Bridge Domain For plugin-acl Test
70 | | ... | macip | ${acl_name_macip}
71 | | When Honeycomb Creates ACL Chain Through ACL plugin
72 | | ... | ${dut_node} | ${acl_name_macip} | ${acl_settings} | macip=${True}
73 | | And Honeycomb Assigns plugin-acl Chain To Interface
74 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_macip}
75 | | ... | ingress | macip=${True}
76 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
77 | | ... | ${src_ip} | ${dst_ip}
78 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
79 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
80 | | ... | TCP | ${src_port} | ${dst_port}
81 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
82 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
83 | | ... | ${src_ip} | ${dst_ip}
84 | | ... | ${tg_to_dut_if1} | ${classify_src}
85 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
86 | | ... | TCP | ${src_port} | ${dst_port}
87 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
88 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
89 | | ... | ${src_ip} | ${dst_ip}
90 | | ... | ${tg_to_dut_if1} | ${classify_src2}
91 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
92 | | ... | TCP | ${src_port} | ${dst_port}
94 | TC02: ACL IPv4 filtering through plugin-acl node - bridged
96 | | ... | [Top] TG=DUT1=TG.
97 | | ... | [Enc] Eth-IPv4-TCP.
98 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
99 | | ... | and configure L3 IPv4 ACL on ingress interface with src/dst IP
100 | | ... | and protocol number.
101 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
102 | | ... | to the other, using different IPv4 IPs. Receive all packets except\
103 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
105 | | [Teardown] | Bridged ACL test teardown
107 | | Given Setup Interfaces And Bridge Domain For plugin-acl Test
108 | | ... | l3_ip4 | ${acl_name_l3_ip4}
109 | | When Honeycomb Creates ACL Chain Through ACL plugin
110 | | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings}
111 | | And Honeycomb Assigns plugin-acl Chain To Interface
112 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress
113 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
114 | | ... | ${src_ip} | ${dst_ip}
115 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
116 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
117 | | ... | UDP | ${src_port} | ${dst_port}
118 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
119 | | ... | ${classify_src} | ${classify_dst}
120 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
121 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
122 | | ... | TCP | ${src_port} | ${dst_port}
123 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
124 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
125 | | ... | ${classify_src} | ${classify_dst}
126 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
127 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
128 | | ... | UDP | ${src_port} | ${dst_port}
130 | TC03: ACL IPv6 filtering through plugin-acl node - bridged
132 | | ... | [Top] TG=DUT1=TG.
133 | | ... | [Enc] Eth-IPv6-TCP.
134 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
135 | | ... | and configure L3 IPv6 ACL on ingress interface with src/dst IP
136 | | ... | and protocol number.
137 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
138 | | ... | to the other, using different IPv6 IPs. Receive all packets except\
139 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
141 | | [Teardown] | Bridged ACL test teardown
143 | | Given Setup interfaces and bridge domain for plugin-acl test
144 | | ... | l3_ip6 | ${acl_name_l3_ip6}
145 | | When Honeycomb Creates ACL Chain Through ACL plugin
146 | | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings}
147 | | And Honeycomb Assigns plugin-acl Chain To Interface
148 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress
149 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
150 | | ... | ${src_ip} | ${dst_ip}
151 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
152 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
153 | | ... | UDP | ${src_port} | ${dst_port}
154 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
155 | | ... | ${classify_src} | ${classify_dst}
156 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
157 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
158 | | ... | TCP | ${src_port} | ${dst_port}
159 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
160 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
161 | | ... | ${classify_src} | ${classify_dst}
162 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
163 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
164 | | ... | UDP | ${src_port} | ${dst_port}
166 | TC04: ACL port filtering through plugin-acl node - bridged
168 | | ... | [Top] TG=DUT1=TG.
169 | | ... | [Enc] Eth-IPv4-TCP.
170 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
171 | | ... | and and configure L4 port ACL on ingress interface
172 | | ... | with src/dst port ranges.
173 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
174 | | ... | to the other, using different ports. Receive all packets except\
175 | | ... | those with ports in the filtered ranges.
177 | | [Teardown] | Bridged ACL test teardown
179 | | Given Setup interfaces and bridge domain for plugin-acl test
180 | | ... | L4 | ${acl_name_l4}
181 | | When Honeycomb Creates ACL Chain Through ACL plugin
182 | | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings}
183 | | And Honeycomb Assigns plugin-acl Chain To Interface
184 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress
185 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
186 | | ... | ${src_ip} | ${dst_ip}
187 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
188 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
189 | | ... | TCP | ${src_port} | ${dst_port}
190 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
191 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
192 | | ... | ${src_ip} | ${dst_ip}
193 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
194 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
195 | | ... | TCP | ${classify_src} | ${classify_dst}
196 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
197 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
198 | | ... | ${src_ip} | ${dst_ip}
199 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
200 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
201 | | ... | TCP | ${classify_src+5} | ${classify_dst+5}
203 | TC05: ACL filtering with IPv4 address and TCP port in one rule - bridged
205 | | ... | [Top] TG=DUT1=TG.
206 | | ... | [Enc] Eth-IPv4-TCP.
207 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
208 | | ... | and configure a mixed rule with src/dst IP, TCP protocol
209 | | ... | and port ranges.
210 | | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
211 | | ... | using IPs and ports. Receive all packets except those with\
212 | | ... | both IPs and ports in the filtered ranges.
214 | | [Teardown] | Bridged ACL test teardown
216 | | Given Setup Interfaces And Bridge Domain For plugin-acl Test
217 | | ... | mixed | ${acl_name_mixed}
218 | | When Honeycomb Creates ACL Chain Through ACL plugin
219 | | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings}
220 | | And Honeycomb Assigns plugin-acl Chain To Interface
221 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
222 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
223 | | ... | ${src_ip} | ${dst_ip}
224 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
225 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
226 | | ... | TCP | ${src_port} | ${dst_port}
227 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
228 | | ... | ${classify_src_ip} | ${classify_dst_ip}
229 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
230 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
231 | | ... | TCP | ${src_port} | ${dst_port}
232 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
233 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
234 | | ... | ${classify_src_ip} | ${classify_dst_ip}
235 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
236 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
237 | | ... | TCP | ${classify_src_port} | ${classify_dst_port}
239 | TC06: ACL ICMP packet filtering - bridged
241 | | ... | [Top] TG=DUT1=TG.
242 | | ... | [Enc] Eth-IPv4-ICMP.
243 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
244 | | ... | and configure a ICMP protocol filtering by ICMP type and code.
245 | | ... | [Ver] Send ICMP packets from one TG interface\
246 | | ... | to the other, using different codes and types. Receive all packets\
247 | | ... | except those with types and codes in the filtered ranges.
249 | | [Teardown] | Bridged ACL test teardown
251 | | Given Setup interfaces and bridge domain for plugin-acl test
252 | | ... | icmp | ${acl_name_icmp}
253 | | When Honeycomb Creates ACL Chain Through ACL plugin
254 | | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
255 | | And Honeycomb Assigns plugin-acl Chain To Interface
256 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
257 | | Then Send ICMP packet with type and code and verify received packet
259 | | ... | ${src_ip} | ${dst_ip}
260 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
261 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
262 | | ... | ${icmp_type} | ${icmp_code}
263 | | Then Send ICMP packet with type and code and verify received packet
265 | | ... | ${src_ip} | ${dst_ip}
266 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
267 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
268 | | ... | ${classify_type} | ${icmp_code}
269 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
270 | | ... | Send ICMP packet with type and code and verify received packet
272 | | ... | ${src_ip} | ${dst_ip}
273 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
274 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
275 | | ... | ${classify_type} | ${classify_code}
277 | TC07: ACL ICMPv6 packet filtering - bridged
279 | | ... | [Top] TG=DUT1=TG.
280 | | ... | [Enc] Eth-IPv6-ICMP.
281 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
282 | | ... | and configure a ICMPv6 protocol filtering by ICMPv6 type and code.
283 | | ... | [Ver] Send ICMPv6 packets from one TG interface\
284 | | ... | to the other, using different codes and types. Receive all packets\
285 | | ... | except those with the filtered type and code.
287 | | [Teardown] | Bridged ACL test teardown
289 | | Given Setup interfaces and bridge domain for plugin-acl test
290 | | ... | icmpv6 | ${acl_name_icmpv6}
291 | | When Honeycomb Creates ACL Chain Through ACL plugin
292 | | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings}
293 | | And Honeycomb Assigns plugin-acl Chain To Interface
294 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress
295 | | Then Send ICMP packet with type and code and verify received packet
297 | | ... | ${src_ip} | ${dst_ip}
298 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
299 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
300 | | ... | ${icmp_type} | ${icmp_code}
301 | | Then Send ICMP packet with type and code and verify received packet
303 | | ... | ${src_ip} | ${dst_ip}
304 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
305 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
306 | | ... | ${classify_type} | ${icmp_code}
307 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
308 | | ... | Send ICMP packet with type and code and verify received packet
310 | | ... | ${src_ip} | ${dst_ip}
311 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
312 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
313 | | ... | ${classify_type} | ${classify_code}
315 | TC08: ACL reflexive IPv4 filtering through plugin-acl node - bridged
317 | | ... | [Top] TG=DUT1=TG.
318 | | ... | [Enc] Eth-IPv4-TCP.
319 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG,\
320 | | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress.
321 | | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\
322 | | ... | it back. Then send the packet with reversed src/dst IP address\
323 | | ... | to VPP interface 2 and receive it from interface 1(this should create\
324 | | ... | a reflexive "permit" rule) Finally, send the original packet again\
325 | | ... | and receive it from interface 2.
327 | | [Teardown] | Bridged ACL test teardown
329 | | Given Setup Interfaces And Bridge Domain For plugin-acl Test
330 | | ... | reflex | ${acl_name_reflex}
331 | | When Honeycomb Creates ACL Chain Through ACL plugin
332 | | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings}
333 | | And Honeycomb Assigns plugin-acl Chain To Interface
334 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress
335 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
336 | | ... | block_all | block_all
337 | | When Honeycomb Creates ACL Chain Through ACL plugin
338 | | ... | ${dut_node} | block_all | ${acl_settings}
339 | | And Honeycomb Assigns plugin-acl Chain To Interface
340 | | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress
341 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
342 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
343 | | ... | ${classify_src} | ${classify_dst}
344 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
345 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
346 | | ... | TCP | ${src_port} | ${dst_port}
347 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
348 | | ... | ${classify_dst} | ${classify_src}
349 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac}
350 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if2_mac}
351 | | ... | TCP | ${dst_port} | ${src_port}
352 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
353 | | ... | ${classify_src} | ${classify_dst}
354 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
355 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
356 | | ... | TCP | ${src_port} | ${dst_port}
361 | TC09: ACL IPv4 filtering through plugin-acl node - routed
363 | | ... | [Top] TG=DUT1=TG.
364 | | ... | [Enc] Eth-IPv4-TCP.
365 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
366 | | ... | interfaces to TG, add ARP entry and routes, and configure L3 IPv4 ACL\
367 | | ... | on ingress interface with src/dst IP and protocol.
368 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
369 | | ... | to the other, using different IPv4 IPs. Receive all packets except\
370 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
372 | | [Teardown] | Routed ACL test teardown - ipv4
374 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
375 | | ... | l3_ip4 | ${acl_name_l3_ip4}
376 | | When Honeycomb Creates ACL Chain Through ACL plugin
377 | | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings}
378 | | And Honeycomb Assigns plugin-acl Chain To Interface
379 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress
380 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
381 | | ... | ${src_ip} | ${dst_ip}
382 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
383 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
384 | | ... | UDP | ${src_port} | ${dst_port}
385 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
386 | | ... | ${classify_src} | ${classify_dst}
387 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
388 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
389 | | ... | TCP | ${src_port} | ${dst_port}
390 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
391 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
392 | | ... | ${classify_src} | ${classify_dst}
393 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
394 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
395 | | ... | UDP | ${src_port} | ${dst_port}
397 | TC10: ACL IPv6 filtering through plugin-acl node - routed
399 | | ... | [Top] TG=DUT1=TG.
400 | | ... | [Enc] Eth-IPv6-TCP.
401 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\
402 | | ... | interfaces to TG, add IP neighbor entry and routes, and configure\
403 | | ... | L3 IPv6 ACL on ingress interface with src/dst IP and next-header.
404 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
405 | | ... | to the other, using different IPv6 IPs. Receive all packets except\
406 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
408 | | [Teardown] | Routed ACL test teardown - ipv6
410 | | Given Configure path in 2-node circular topology
411 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
412 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
413 | | ... | L3_IP6 | ${acl_name_l3_ip6}
414 | | And Honeycomb configures interface state
415 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
416 | | And Honeycomb configures interface state
417 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
418 | | And Honeycomb sets interface IPv6 address | ${dut_node}
419 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
420 | | And Honeycomb sets interface IPv6 address | ${dut_node}
421 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
422 | | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2}
423 | | And Honeycomb adds interface IPv6 neighbor
424 | | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
425 | | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length}
426 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
427 | | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length}
428 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
429 | | When Honeycomb Creates ACL Chain Through ACL plugin
430 | | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings}
431 | | And Honeycomb Assigns plugin-acl Chain To Interface
432 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress
433 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
434 | | ... | ${src_ip} | ${dst_ip}
435 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
436 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
437 | | ... | UDP | ${src_port} | ${dst_port}
438 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
439 | | ... | ${classify_src} | ${classify_dst}
440 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
441 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
442 | | ... | TCP | ${src_port} | ${dst_port}
443 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
444 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
445 | | ... | ${classify_src} | ${classify_dst}
446 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
447 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
448 | | ... | UDP | ${src_port} | ${dst_port}
450 | TC11: ACL port filtering through plugin-acl node - routed
452 | | ... | [Top] TG=DUT1=TG.
453 | | ... | [Enc] Eth-IPv4-TCP.
454 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
455 | | ... | interfaces to TG, add ARP entry and routes, and configure L4 port ACL\
456 | | ... | on ingress interface with src/dst port ranges.
457 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
458 | | ... | to the other, using different ports. Receive all packets except\
459 | | ... | those with ports in the filtered ranges.
461 | | [Teardown] | Routed ACL test teardown - ipv4
463 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
464 | | ... | L4 | ${acl_name_l4}
465 | | When Honeycomb Creates ACL Chain Through ACL plugin
466 | | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings}
467 | | And Honeycomb Assigns plugin-acl Chain To Interface
468 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress
469 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
470 | | ... | ${src_ip} | ${dst_ip}
471 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
472 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
473 | | ... | TCP | ${src_port} | ${dst_port}
474 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
475 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
476 | | ... | ${src_ip} | ${dst_ip}
477 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
478 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
479 | | ... | TCP | ${classify_src} | ${classify_dst}
480 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
481 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
482 | | ... | ${src_ip} | ${dst_ip}
483 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
484 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
485 | | ... | TCP | ${classify_src+5} | ${classify_dst+5}
487 | TC12: ACL filtering with IPv4 address and TCP port in one rule - routed
489 | | ... | [Top] TG=DUT1=TG.
490 | | ... | [Enc] Eth-IPv4-TCP.
491 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
492 | | ... | interfaces to TG, add ARP entry and routes and configure a mixed
493 | | ... | rule with src/dst IP, TCP protocol and port ranges.
494 | | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
495 | | ... | using IPs and ports. Receive all packets except those with\
496 | | ... | both IPs and ports in the filtered ranges.
498 | | [Teardown] | Routed ACL test teardown - ipv4
500 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
501 | | ... | mixed | ${acl_name_mixed}
502 | | When Honeycomb Creates ACL Chain Through ACL plugin
503 | | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings}
504 | | And Honeycomb Assigns plugin-acl Chain To Interface
505 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
506 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
507 | | ... | ${src_ip} | ${dst_ip}
508 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
509 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
510 | | ... | TCP | ${src_port} | ${dst_port}
511 | | Then Send TCP or UDP packet and verify received packet | ${tg_node}
512 | | ... | ${classify_src_ip} | ${classify_dst_ip}
513 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
514 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
515 | | ... | TCP | ${src_port} | ${dst_port}
516 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
517 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
518 | | ... | ${classify_src_ip} | ${classify_dst_ip}
519 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
520 | | ... | ${tg_to_dut_if2} | ${dst_mac}
521 | | ... | TCP | ${classify_src_port} | ${classify_dst_port}
523 | TC13: ACL ICMP packet filtering - routed
525 | | ... | [Top] TG=DUT1=TG.
526 | | ... | [Enc] Eth-IPv4-TCP.
527 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
528 | | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\
529 | | ... | on ingress interface with ICMP type and code.
530 | | ... | [Ver] Send ICMP packets from one TG interface\
531 | | ... | to the other, using different codes and types. Receive all packets\
532 | | ... | except those with the filtered type and code.
534 | | [Teardown] | Routed ACL test teardown - ipv4
536 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
537 | | ... | icmp | ${acl_name_icmp}
538 | | When Honeycomb Creates ACL Chain Through ACL plugin
539 | | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
540 | | And Honeycomb Assigns plugin-acl Chain To Interface
541 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
542 | | Then Send ICMP packet with type and code and verify received packet
544 | | ... | ${src_ip} | ${dst_ip}
545 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
546 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
547 | | ... | ${icmp_type} | ${icmp_code}
548 | | Then Send ICMP packet with type and code and verify received packet
550 | | ... | ${src_ip} | ${dst_ip}
551 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
552 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
553 | | ... | ${classify_type} | ${icmp_code}
554 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
555 | | ... | Send ICMP packet with type and code and verify received packet
557 | | ... | ${src_ip} | ${dst_ip}
558 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
559 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
560 | | ... | ${classify_type} | ${classify_code}
562 | TC14: ACL ICMPv6 packet filtering - routed
564 | | ... | [Top] TG=DUT1=TG.
565 | | ... | [Enc] Eth-IPv4-TCP.
566 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\
567 | | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\
568 | | ... | on ingress interface with ICMPv6 type and code.
569 | | ... | [Ver] Send ICMPv6 packets from one TG interface\
570 | | ... | to the other, using different codes and types. Receive all packets\
571 | | ... | except those with the filtered type and code.
573 | | [Teardown] | Routed ACL test teardown - ipv6
575 | | Given Configure path in 2-node circular topology
576 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
577 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
578 | | ... | icmpv6 | ${acl_name_icmpv6}
579 | | And Honeycomb configures interface state
580 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
581 | | And Honeycomb configures interface state
582 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
583 | | And Honeycomb sets interface IPv6 address | ${dut_node}
584 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
585 | | And Honeycomb sets interface IPv6 address | ${dut_node}
586 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
587 | | And Honeycomb adds interface IPv6 neighbor
588 | | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
589 | | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2}
590 | | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length}
591 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
592 | | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length}
593 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
594 | | When Honeycomb Creates ACL Chain Through ACL plugin
595 | | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings}
596 | | And Honeycomb Assigns plugin-acl Chain To Interface
597 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress
598 | | Then Send ICMP packet with type and code and verify received packet
600 | | ... | ${src_ip} | ${dst_ip}
601 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
602 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
603 | | ... | ${icmp_type} | ${icmp_code}
604 | | Then Send ICMP packet with type and code and verify received packet
606 | | ... | ${src_ip} | ${dst_ip}
607 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
608 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
609 | | ... | ${classify_type} | ${icmp_code}
610 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
611 | | ... | Send ICMP packet with type and code and verify received packet
613 | | ... | ${src_ip} | ${dst_ip}
614 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
615 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
616 | | ... | ${classify_type} | ${classify_code}
618 | TC15: ACL reflexive IPv4 filtering through plugin-acl node - routed
620 | | ... | [Top] TG=DUT1=TG.
621 | | ... | [Enc] Eth-IPv4-TCP.
622 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
623 | | ... | interfaces to TG, add ARP entries and routes,\
624 | | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress.
625 | | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\
626 | | ... | it back. Then send the packet with reversed src/dst IP address\
627 | | ... | to VPP interface 2 and receive it from interface 1(this should create\
628 | | ... | a reflexive "permit" rule) Finally, send the original packet again\
629 | | ... | and receive it from interface 2.
631 | | [Teardown] | Routed ACL test teardown - ipv4
633 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
634 | | ... | reflex | ${acl_name_reflex}
635 | | And Add ARP on DUT
636 | | ... | ${node} | ${dut_to_tg_if1} | ${gateway2} | ${tg_to_dut_if1_mac}
637 | | And VPP Route Add
638 | | ... | ${node} | ${src_net} | ${prefix_length} | ${gateway2}
639 | | ... | interface=${dut_to_tg_if1} | use_sw_index=False
640 | | And VPP Route Add
641 | | ... | ${node} | ${classify_src_net} | ${prefix_length} | ${gateway2}
642 | | ... | interface=${dut_to_tg_if1} | use_sw_index=False
643 | | When Honeycomb Creates ACL Chain Through ACL plugin
644 | | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings}
645 | | And Honeycomb Assigns plugin-acl Chain To Interface
646 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress
647 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
648 | | ... | block_all | block_all
649 | | When Honeycomb Creates ACL Chain Through ACL plugin
650 | | ... | ${dut_node} | block_all | ${acl_settings}
651 | | And Honeycomb Assigns plugin-acl Chain To Interface
652 | | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress
653 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
654 | | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
655 | | ... | ${classify_src} | ${classify_dst}
656 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
657 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
658 | | ... | TCP | ${src_port} | ${dst_port}
659 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
660 | | ... | ${classify_dst} | ${classify_src}
661 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac}
662 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if2_mac}
663 | | ... | TCP | ${dst_port} | ${src_port}
664 | | And Send TCP or UDP packet and verify received packet | ${tg_node}
665 | | ... | ${classify_src} | ${classify_dst}
666 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
667 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
668 | | ... | TCP | ${src_port} | ${dst_port}
671 | Setup interface IPs and routes for IPv4 plugin-acl test
672 | | [Documentation] | Import test variables, set interfaces up,
673 | | ... | configure IPv4 addresses, add neighbor entry and routes.
675 | | [Arguments] | ${test_data_id} | ${acl_name}
677 | | Configure path in 2-node circular topology
678 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
679 | | Import Variables | resources/test_data/honeycomb/plugin_acl.py
680 | | ... | ${test_data_id} | ${acl_name}
681 | | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
682 | | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up
683 | | Honeycomb sets interface IPv4 address with prefix | ${dut_node}
684 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
685 | | Honeycomb sets interface IPv4 address with prefix | ${dut_node}
686 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
687 | | And Honeycomb adds interface IPv4 neighbor
688 | | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
690 | | ... | ${node} | ${dst_net} | ${prefix_length} | ${gateway}
691 | | ... | interface=${dut_to_tg_if2} | use_sw_index=False
693 | | ... | ${node} | ${classify_dst_net} | ${prefix_length} | ${gateway}
694 | | ... | interface=${dut_to_tg_if2} | use_sw_index=False
696 | Setup interfaces and bridge domain for plugin-acl test
697 | | [Documentation] | Import test variables, set interfaces up and bridge them.
699 | | [Arguments] | ${test_data_id} | ${acl_name}
701 | | Configure path in 2-node circular topology
702 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
703 | | Import Variables | resources/test_data/honeycomb/plugin_acl.py
704 | | ... | ${test_data_id} | ${acl_name}
705 | | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
706 | | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up
707 | | Honeycomb Creates first L2 Bridge Domain
708 | | ... | ${dut_node} | ${bd_name} | ${bd_settings}
709 | | Honeycomb Adds Interfaces To Bridge Domain
710 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
711 | | ... | ${bd_name} | ${bd_if_settings}
713 | Bridged ACL test teardown
714 | | [Documentation] | Log packet trace and ACL settings,
715 | | ... | then clean up bridge domains.
717 | | Show Packet Trace on All DUTs | ${nodes}
718 | | Read plugin-ACL configuration from VAT | ${node}
719 | | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1}
720 | | Honeycomb Removes All Bridge Domains
721 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
723 | Routed ACL test teardown - ipv4
724 | | [Documentation] | Log packet trace and ACL settings,
725 | | ... | then clean up IPv4 addresses and neighbors.
727 | | Show Packet Trace on All DUTs | ${nodes}
728 | | Read plugin-ACL configuration from VAT | ${node}
729 | | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1}
730 | | Honeycomb removes interface IPv4 addresses | ${node} | ${dut_to_tg_if1}
731 | | Honeycomb clears all interface IPv4 neighbors | ${node} | ${dut_to_tg_if1}
733 | Routed ACL test teardown - ipv6
734 | | [Documentation] | Log packet trace and ACL settings,
735 | | ... | then clean up IPv6 addresses and neighbors.
737 | | Show Packet Trace on All DUTs | ${nodes}
738 | | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1}
739 | | Read plugin-ACL configuration from VAT | ${node}
740 | | Honeycomb removes interface IPv6 addresses | ${node} | ${dut_to_tg_if1}
741 | | Honeycomb clears all interface IPv6 neighbors | ${node} | ${dut_to_tg_if1}