HC Test: address and cleanup test failures
[csit.git] / tests / func / honeycomb / mgmt-cfg-pluginacl-apihc-apivat-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 *** Variables ***
15 | &{if_settings}= | enabled=True
16 # Bridge domain settings
17 | ${bd_name}= | bd1
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}
21 # Names for AC lists
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
30
31 *** Settings ***
32 | Resource | resources/libraries/robot/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/testing_path.robot
38 | Resource | resources/libraries/robot/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
45 | Test Setup | Clear Packet Trace on All DUTs | ${nodes}
46 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
47 | ... | AND | Read plugin-ACL configuration from VAT | ${node}
48 | ... | AND | Clear plugin-acl settings | ${node} | ${dut_to_tg_if1}
49 | Suite Teardown
50 | ... | Restart Honeycomb and VPP | ${node}
51 | Documentation | *Honeycomb access control lists test suite for ACL plugin.*
52 | Force Tags | honeycomb_sanity | honeycomb_odl
53
54 *** Test Cases ***
55 | TC01: ACL MAC filtering through plugin-acl node - bridged
56 | | [Documentation]
57 | | ... | [Top] TG=DUT1=TG.
58 | | ... | [Enc] Eth-IPv4-TCP.
59 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
60 | | ... | and configure L2 MAC ACL on ingress interface.
61 | | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
62 | | ... | using different MACs. Receive all packets except those with\
63 | | ... | MACs in the filtered ranges.
64 | | [Teardown] | Run Keywords
65 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
66 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
67 | | ... | Honeycomb Removes All Bridge Domains
68 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
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 | | When Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
77 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
78 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
79 | | ... | TCP | ${src_port} | ${dst_port}
80 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
81 | | ... | Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
82 | | ... | ${tg_to_dut_if1} | ${classify_src}
83 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
84 | | ... | TCP | ${src_port} | ${dst_port}
85 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
86 | | ... | Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
87 | | ... | ${tg_to_dut_if1} | ${classify_src2}
88 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
89 | | ... | TCP | ${src_port} | ${dst_port}
90
91 | TC02: ACL IPv4 filtering through plugin-acl node - bridged
92 | | [Documentation]
93 | | ... | [Top] TG=DUT1=TG.
94 | | ... | [Enc] Eth-IPv4-TCP.
95 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
96 | | ... | and configure L3 IPv4 ACL on ingress interface with src/dst IP
97 | | ... | and protocol number.
98 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
99 | | ... | to the other, using different IPv4 IPs. Receive all packets except\
100 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
101 | | [Teardown] | Run Keywords
102 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
103 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
104 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
105 | | ... | Honeycomb Removes All Bridge Domains
106 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
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 | ${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 | ${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 | ${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}
129
130 | TC03: ACL IPv6 filtering through plugin-acl node - bridged
131 | | [Documentation]
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.
140 | | [Teardown] | Run Keywords
141 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
142 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
143 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
144 | | ... | Honeycomb Removes All Bridge Domains
145 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
146 | | Given Setup interfaces and bridge domain for plugin-acl test
147 | | ... | l3_ip6 | ${acl_name_l3_ip6}
148 | | When Honeycomb Creates ACL Chain Through ACL plugin
149 | | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings}
150 | | And Honeycomb Assigns plugin-acl Chain To Interface
151 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress
152 | | Then Send TCP Or UDP Packet | ${tg_node}
153 | | ... | ${src_ip} | ${dst_ip}
154 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
155 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
156 | | ... | UDP | ${src_port} | ${dst_port}
157 | | And Send TCP Or UDP Packet | ${tg_node}
158 | | ... | ${classify_src} | ${classify_dst}
159 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
160 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
161 | | ... | TCP | ${src_port} | ${dst_port}
162 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
163 | | ... | Send TCP Or UDP Packet | ${tg_node}
164 | | ... | ${classify_src} | ${classify_dst}
165 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
166 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
167 | | ... | UDP | ${src_port} | ${dst_port}
168
169 | TC04: ACL port filtering through plugin-acl node - bridged
170 | | [Documentation]
171 | | ... | [Top] TG=DUT1=TG.
172 | | ... | [Enc] Eth-IPv4-TCP.
173 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
174 | | ... | and and configure L4 port ACL on ingress interface
175 | | ... | with src/dst port ranges.
176 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
177 | | ... | to the other, using different ports. Receive all packets except\
178 | | ... | those with ports in the filtered ranges.
179 | | [Teardown] | Run Keywords
180 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
181 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
182 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
183 | | ... | Honeycomb Removes All Bridge Domains
184 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
185 | | Given Setup interfaces and bridge domain for plugin-acl test
186 | | ... | L4 | ${acl_name_l4}
187 | | When Honeycomb Creates ACL Chain Through ACL plugin
188 | | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings}
189 | | And Honeycomb Assigns plugin-acl Chain To Interface
190 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress
191 | | Then Send TCP Or UDP 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 | ${src_port} | ${dst_port}
196 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
197 | | ... | Send TCP Or UDP 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} | ${classify_dst}
202 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
203 | | ... | Send TCP Or UDP Packet | ${tg_node}
204 | | ... | ${src_ip} | ${dst_ip}
205 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
206 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
207 | | ... | TCP | ${classify_src+5} | ${classify_dst+5}
208
209 | TC05: ACL filtering with IPv4 address and TCP port in one rule - bridged
210 | | [Documentation]
211 | | ... | [Top] TG=DUT1=TG.
212 | | ... | [Enc] Eth-IPv4-TCP.
213 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
214 | | ... | and configure a mixed rule with src/dst IP, TCP protocol
215 | | ... | and port ranges.
216 | | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
217 | | ... | using IPs and ports. Receive all packets except those with\
218 | | ... | both IPs and ports in the filtered ranges.
219 | | [Teardown] | Run Keywords
220 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
221 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
222 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
223 | | ... | Honeycomb Removes All Bridge Domains
224 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
225 | | Given Setup Interfaces And Bridge Domain For plugin-acl Test
226 | | ... | mixed | ${acl_name_mixed}
227 | | When Honeycomb Creates ACL Chain Through ACL plugin
228 | | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings}
229 | | And Honeycomb Assigns plugin-acl Chain To Interface
230 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
231 | | Then Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
232 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
233 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
234 | | ... | TCP | ${src_port} | ${dst_port}
235 | | Then Send TCP Or UDP Packet | ${tg_node}
236 | | ... | ${classify_src_ip} | ${classify_dst_ip}
237 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
238 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
239 | | ... | TCP | ${src_port} | ${dst_port}
240 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
241 | | ... | Send TCP Or UDP Packet | ${tg_node}
242 | | ... | ${classify_src_ip} | ${classify_dst_ip}
243 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
244 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
245 | | ... | TCP | ${classify_src_port} | ${classify_dst_port}
246
247 | TC06: ACL ICMP packet filtering - bridged
248 | | [Documentation]
249 | | ... | [Top] TG=DUT1=TG.
250 | | ... | [Enc] Eth-IPv4-ICMP.
251 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
252 | | ... | and configure a ICMP protocol filtering by ICMP type and code.
253 | | ... | [Ver] Send ICMP packets from one TG interface\
254 | | ... | to the other, using different codes and types. Receive all packets\
255 | | ... | except those with types and codes in the filtered ranges.
256 | | [Teardown] | Run Keywords
257 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
258 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
259 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
260 | | ... | Honeycomb Removes All Bridge Domains
261 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
262 | | Given Setup interfaces and bridge domain for plugin-acl test
263 | | ... | icmp | ${acl_name_icmp}
264 | | When Honeycomb Creates ACL Chain Through ACL plugin
265 | | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
266 | | And Honeycomb Assigns plugin-acl Chain To Interface
267 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
268 | | Then Send ICMP packet with type and code | ${tg_node}
269 | | ... | ${src_ip} | ${dst_ip}
270 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
271 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
272 | | ... | ${icmp_type} | ${icmp_code}
273 | | Then Send ICMP packet with type and code | ${tg_node}
274 | | ... | ${src_ip} | ${dst_ip}
275 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
276 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
277 | | ... | ${classify_type} | ${icmp_code}
278 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
279 | | ... | Send ICMP packet with type and code | ${tg_node}
280 | | ... | ${src_ip} | ${dst_ip}
281 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
282 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
283 | | ... | ${classify_type} | ${classify_code}
284
285 | TC07: ACL ICMPv6 packet filtering - bridged
286 | | [Documentation]
287 | | ... | [Top] TG=DUT1=TG.
288 | | ... | [Enc] Eth-IPv6-ICMP.
289 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
290 | | ... | and configure a ICMPv6 protocol filtering by ICMPv6 type and code.
291 | | ... | [Ver] Send ICMPv6 packets from one TG interface\
292 | | ... | to the other, using different codes and types. Receive all packets\
293 | | ... | except those with the filtered type and code.
294 | | [Teardown] | Run Keywords
295 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
296 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
297 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
298 | | ... | Honeycomb Removes All Bridge Domains
299 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
300 | | Given Setup interfaces and bridge domain for plugin-acl test
301 | | ... | icmpv6 | ${acl_name_icmpv6}
302 | | When Honeycomb Creates ACL Chain Through ACL plugin
303 | | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings}
304 | | And Honeycomb Assigns plugin-acl Chain To Interface
305 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress
306 | | Then Send ICMP packet with type and code | ${tg_node}
307 | | ... | ${src_ip} | ${dst_ip}
308 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
309 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
310 | | ... | ${icmp_type} | ${icmp_code}
311 | | Then Send ICMP packet with type and code | ${tg_node}
312 | | ... | ${src_ip} | ${dst_ip}
313 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
314 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
315 | | ... | ${classify_type} | ${icmp_code}
316 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
317 | | ... | Send ICMP packet with type and code | ${tg_node}
318 | | ... | ${src_ip} | ${dst_ip}
319 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
320 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
321 | | ... | ${classify_type} | ${classify_code}
322
323 | TC08: ACL reflexive IPv4 filtering through plugin-acl node - bridged
324 | | [Documentation]
325 | | ... | [Top] TG=DUT1=TG.
326 | | ... | [Enc] Eth-IPv4-TCP.
327 | | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG,\
328 | | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress.
329 | | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\
330 | | ... | it back. Then send the packet with reversed src/dst IP address\
331 | | ... | to VPP interface 2 and receive it from interface 1(this should create\
332 | | ... | a reflexive "permit" rule) Finally, send the original packet again\
333 | | ... | and receive it from interface 2.
334 | | [Teardown] | Run Keywords
335 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
336 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
337 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
338 | | ... | Honeycomb Removes All Bridge Domains
339 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
340 | | Given Setup Interfaces And Bridge Domain For plugin-acl Test
341 | | ... | reflex | ${acl_name_reflex}
342 | | When Honeycomb Creates ACL Chain Through ACL plugin
343 | | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings}
344 | | And Honeycomb Assigns plugin-acl Chain To Interface
345 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress
346 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
347 | | ... | block_all | block_all
348 | | When Honeycomb Creates ACL Chain Through ACL plugin
349 | | ... | ${dut_node} | block_all | ${acl_settings}
350 | | And Honeycomb Assigns plugin-acl Chain To Interface
351 | | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress
352 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
353 | | ... | Send TCP Or UDP Packet | ${tg_node}
354 | | ... | ${classify_src} | ${classify_dst}
355 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
356 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
357 | | ... | TCP | ${src_port} | ${dst_port}
358 | | And Send TCP Or UDP Packet | ${tg_node}
359 | | ... | ${classify_dst} | ${classify_src}
360 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac}
361 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2_mac}
362 | | ... | TCP | ${dst_port} | ${src_port}
363 | | And Send TCP Or UDP Packet | ${tg_node}
364 | | ... | ${classify_src} | ${classify_dst}
365 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
366 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
367 | | ... | TCP | ${src_port} | ${dst_port}
368
369 # Routing section
370 # ===============
371
372 | TC09: ACL IPv4 filtering through plugin-acl node - routed
373 | | [Documentation]
374 | | ... | [Top] TG=DUT1=TG.
375 | | ... | [Enc] Eth-IPv4-TCP.
376 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
377 | | ... | interfaces to TG, add ARP entry and routes, and configure L3 IPv4 ACL\
378 | | ... | on ingress interface with src/dst IP and protocol.
379 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
380 | | ... | to the other, using different IPv4 IPs. Receive all packets except\
381 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
382 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
383 | | ... | l3_ip4 | ${acl_name_l3_ip4}
384 | | When Honeycomb Creates ACL Chain Through ACL plugin
385 | | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings}
386 | | And Honeycomb Assigns plugin-acl Chain To Interface
387 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress
388 | | Then Send TCP Or UDP Packet | ${tg_node}
389 | | ... | ${src_ip} | ${dst_ip}
390 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
391 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
392 | | ... | UDP | ${src_port} | ${dst_port}
393 | | And Send TCP Or UDP Packet | ${tg_node}
394 | | ... | ${classify_src} | ${classify_dst}
395 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
396 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
397 | | ... | TCP | ${src_port} | ${dst_port}
398 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
399 | | ... | Send TCP Or UDP Packet | ${tg_node}
400 | | ... | ${classify_src} | ${classify_dst}
401 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
402 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
403 | | ... | UDP | ${src_port} | ${dst_port}
404
405 | TC10: ACL IPv6 filtering through plugin-acl node - routed
406 | | [Documentation]
407 | | ... | [Top] TG=DUT1=TG.
408 | | ... | [Enc] Eth-IPv6-TCP.
409 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\
410 | | ... | interfaces to TG, add IP neighbor entry and routes, and configure\
411 | | ... | L3 IPv6 ACL on ingress interface with src/dst IP and next-header.
412 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
413 | | ... | to the other, using different IPv6 IPs. Receive all packets except\
414 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
415 | | Given Path for 2-node testing is set
416 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
417 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
418 | | ... | L3_IP6 | ${acl_name_l3_ip6}
419 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
420 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if2} | up
421 # TODO: Configure addresses through Honeycomb when implemented. (Honeycomb-102)
422 | | And Set Interface Address | ${dut_node}
423 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
424 | | And Set Interface Address | ${dut_node}
425 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
426 | | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2}
427 # TODO: Configure route through Honeycomb when implemented.(Honeycomb-58)
428 | | And Add IP Neighbor
429 | | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
430 | | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length}
431 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
432 | | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length}
433 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
434 | | When Honeycomb Creates ACL Chain Through ACL plugin
435 | | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings}
436 | | And Honeycomb Assigns plugin-acl Chain To Interface
437 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress
438 | | Then Send TCP Or UDP Packet | ${tg_node}
439 | | ... | ${src_ip} | ${dst_ip}
440 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
441 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
442 | | ... | UDP | ${src_port} | ${dst_port}
443 | | And Send TCP Or UDP Packet | ${tg_node}
444 | | ... | ${classify_src} | ${classify_dst}
445 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
446 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
447 | | ... | TCP | ${src_port} | ${dst_port}
448 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
449 | | ... | Send TCP Or UDP Packet | ${tg_node}
450 | | ... | ${classify_src} | ${classify_dst}
451 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
452 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
453 | | ... | UDP | ${src_port} | ${dst_port}
454
455 | TC11: ACL port filtering through plugin-acl node - routed
456 | | [Documentation]
457 | | ... | [Top] TG=DUT1=TG.
458 | | ... | [Enc] Eth-IPv4-TCP.
459 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
460 | | ... | interfaces to TG, add ARP entry and routes, and configure L4 port ACL\
461 | | ... | on ingress interface with src/dst port ranges.
462 | | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
463 | | ... | to the other, using different ports. Receive all packets except\
464 | | ... | those with ports in the filtered ranges.
465 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
466 | | ... | L4 | ${acl_name_l4}
467 | | When Honeycomb Creates ACL Chain Through ACL plugin
468 | | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings}
469 | | And Honeycomb Assigns plugin-acl Chain To Interface
470 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress
471 | | Then Send TCP Or UDP Packet | ${tg_node}
472 | | ... | ${src_ip} | ${dst_ip}
473 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
474 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
475 | | ... | TCP | ${src_port} | ${dst_port}
476 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
477 | | ... | Send TCP Or UDP Packet | ${tg_node}
478 | | ... | ${src_ip} | ${dst_ip}
479 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
480 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
481 | | ... | TCP | ${classify_src} | ${classify_dst}
482 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
483 | | ... | Send TCP Or UDP Packet | ${tg_node}
484 | | ... | ${src_ip} | ${dst_ip}
485 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
486 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
487 | | ... | TCP | ${classify_src+5} | ${classify_dst+5}
488
489 | TC12: ACL filtering with IPv4 address and TCP port in one rule - routed
490 | | [Documentation]
491 | | ... | [Top] TG=DUT1=TG.
492 | | ... | [Enc] Eth-IPv4-TCP.
493 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
494 | | ... | interfaces to TG, add ARP entry and routes and configure a mixed
495 | | ... | rule with src/dst IP, TCP protocol and port ranges.
496 | | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
497 | | ... | using IPs and ports. Receive all packets except those with\
498 | | ... | both IPs and ports in the filtered ranges.
499 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
500 | | ... | mixed | ${acl_name_mixed}
501 | | When Honeycomb Creates ACL Chain Through ACL plugin
502 | | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings}
503 | | And Honeycomb Assigns plugin-acl Chain To Interface
504 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
505 | | Then Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
506 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
507 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
508 | | ... | TCP | ${src_port} | ${dst_port}
509 | | Then Send TCP Or UDP Packet | ${tg_node}
510 | | ... | ${classify_src_ip} | ${classify_dst_ip}
511 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
512 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
513 | | ... | TCP | ${src_port} | ${dst_port}
514 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
515 | | ... | Send TCP Or UDP Packet | ${tg_node}
516 | | ... | ${classify_src_ip} | ${classify_dst_ip}
517 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
518 | | ... | ${tg_to_dut_if2} | ${dst_mac}
519 | | ... | TCP | ${classify_src_port} | ${classify_dst_port}
520
521 | TC13: ACL ICMP packet filtering - routed
522 | | [Documentation]
523 | | ... | [Top] TG=DUT1=TG.
524 | | ... | [Enc] Eth-IPv4-TCP.
525 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
526 | | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\
527 | | ... | on ingress interface with ICMP type and code.
528 | | ... | [Ver] Send ICMP packets from one TG interface\
529 | | ... | to the other, using different codes and types. Receive all packets\
530 | | ... | except those with the filtered type and code.
531 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
532 | | ... | icmp | ${acl_name_icmp}
533 | | When Honeycomb Creates ACL Chain Through ACL plugin
534 | | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
535 | | And Honeycomb Assigns plugin-acl Chain To Interface
536 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
537 | | Then Send ICMP packet with type and code | ${tg_node}
538 | | ... | ${src_ip} | ${dst_ip}
539 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
540 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
541 | | ... | ${icmp_type} | ${icmp_code}
542 | | Then Send ICMP packet with type and code | ${tg_node}
543 | | ... | ${src_ip} | ${dst_ip}
544 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
545 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
546 | | ... | ${classify_type} | ${icmp_code}
547 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
548 | | ... | Send ICMP packet with type and code | ${tg_node}
549 | | ... | ${src_ip} | ${dst_ip}
550 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
551 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
552 | | ... | ${classify_type} | ${classify_code}
553
554 | TC14: ACL ICMPv6 packet filtering - routed
555 | | [Documentation]
556 | | ... | [Top] TG=DUT1=TG.
557 | | ... | [Enc] Eth-IPv4-TCP.
558 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\
559 | | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\
560 | | ... | on ingress interface with ICMPv6 type and code.
561 | | ... | [Ver] Send ICMPv6 packets from one TG interface\
562 | | ... | to the other, using different codes and types. Receive all packets\
563 | | ... | except those with the filtered type and code.
564 | | Given Path for 2-node testing is set
565 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
566 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
567 | | ... | L3_IP6 | ${acl_name_l3_ip6}
568 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
569 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if2} | up
570 # TODO: Configure addresses through Honeycomb when implemented. (Honeycomb-102)
571 | | And Set Interface Address | ${dut_node}
572 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
573 | | And Set Interface Address | ${dut_node}
574 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
575 | | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2}
576 # TODO: Configure route through Honeycomb when implemented.(Honeycomb-58)
577 | | And Add IP Neighbor
578 | | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
579 | | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length}
580 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
581 | | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length}
582 | | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
583 | | When Honeycomb Creates ACL Chain Through ACL plugin
584 | | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
585 | | And Honeycomb Assigns plugin-acl Chain To Interface
586 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
587 | | Then Send ICMP packet with type and code | ${tg_node}
588 | | ... | ${src_ip} | ${dst_ip}
589 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
590 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
591 | | ... | ${icmp_type} | ${icmp_code}
592 | | Then Send ICMP packet with type and code | ${tg_node}
593 | | ... | ${src_ip} | ${dst_ip}
594 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
595 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
596 | | ... | ${classify_type} | ${icmp_code}
597 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
598 | | ... | Send ICMP packet with type and code | ${tg_node}
599 | | ... | ${src_ip} | ${dst_ip}
600 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
601 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
602 | | ... | ${classify_type} | ${classify_code}
603
604 | TC15: ACL reflexive IPv4 filtering through plugin-acl node - routed
605 | | [Documentation]
606 | | ... | [Top] TG=DUT1=TG.
607 | | ... | [Enc] Eth-IPv4-TCP.
608 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
609 | | ... | interfaces to TG, add ARP entries and routes,\
610 | | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress.
611 | | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\
612 | | ... | it back. Then send the packet with reversed src/dst IP address\
613 | | ... | to VPP interface 2 and receive it from interface 1(this should create\
614 | | ... | a reflexive "permit" rule) Finally, send the original packet again\
615 | | ... | and receive it from interface 2.
616 | | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
617 | | ... | reflex | ${acl_name_reflex}
618 | | And Add ARP on DUT
619 | | ... | ${node} | ${dut_to_tg_if1} | ${gateway2} | ${tg_to_dut_if1_mac}
620 | | And VPP Route Add
621 | | ... | ${node} | ${src_net} | ${prefix_length} | ${gateway2}
622 | | ... | interface=${dut_to_tg_if1} | use_sw_index=False
623 | | And VPP Route Add
624 | | ... | ${node} | ${classify_src_net} | ${prefix_length} | ${gateway2}
625 | | ... | interface=${dut_to_tg_if1} | use_sw_index=False
626 | | When Honeycomb Creates ACL Chain Through ACL plugin
627 | | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings}
628 | | And Honeycomb Assigns plugin-acl Chain To Interface
629 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress
630 | | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
631 | | ... | block_all | block_all
632 | | When Honeycomb Creates ACL Chain Through ACL plugin
633 | | ... | ${dut_node} | block_all | ${acl_settings}
634 | | And Honeycomb Assigns plugin-acl Chain To Interface
635 | | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress
636 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
637 | | ... | Send TCP Or UDP Packet | ${tg_node}
638 | | ... | ${classify_src} | ${classify_dst}
639 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
640 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
641 | | ... | TCP | ${src_port} | ${dst_port}
642 | | And Send TCP Or UDP Packet | ${tg_node}
643 | | ... | ${classify_dst} | ${classify_src}
644 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac}
645 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2_mac}
646 | | ... | TCP | ${dst_port} | ${src_port}
647 | | And Send TCP Or UDP Packet | ${tg_node}
648 | | ... | ${classify_src} | ${classify_dst}
649 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
650 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
651 | | ... | TCP | ${src_port} | ${dst_port}
652
653 *** Keywords ***
654 | Setup interface IPs and routes for IPv4 plugin-acl test
655 | | [Arguments] | ${test_data_id} | ${acl_name}
656 | | Path for 2-node testing is set
657 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
658 | | Import Variables | resources/test_data/honeycomb/plugin_acl.py
659 | | ... | ${test_data_id} | ${acl_name}
660 | | Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
661 | | Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if2} | up
662 | | Honeycomb sets interface ipv4 address with prefix | ${dut_node}
663 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
664 | | Honeycomb sets interface ipv4 address with prefix | ${dut_node}
665 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
666 # TODO: Configure routes through Honeycomb once routing tests are added
667 | | Add ARP on DUT
668 | | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
669 | | VPP Route Add
670 | | ... | ${node} | ${dst_net} | ${prefix_length} | ${gateway}
671 | | ... | interface=${dut_to_tg_if2} | use_sw_index=False
672 | | VPP Route Add
673 | | ... | ${node} | ${classify_dst_net} | ${prefix_length} | ${gateway}
674 | | ... | interface=${dut_to_tg_if2} | use_sw_index=False
675
676 | Setup interfaces and bridge domain for plugin-acl test
677 | | [Arguments] | ${test_data_id} | ${acl_name}
678 | | Path For 2-node Testing Is Set
679 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
680 | | Import Variables | resources/test_data/honeycomb/plugin_acl.py
681 | | ... | ${test_data_id} | ${acl_name}
682 | | Honeycomb Sets Interface State | ${dut_node} | ${dut_to_tg_if1} | up
683 | | Honeycomb Sets Interface State | ${dut_node} | ${dut_to_tg_if2} | up
684 | | Honeycomb Creates first L2 Bridge Domain
685 | | ... | ${dut_node} | ${bd_name} | ${bd_settings}
686 | | Honeycomb Adds Interfaces To Bridge Domain
687 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
688 | | ... | ${bd_name} | ${bd_if_settings}