CSIT-220: Rename directories in tests directory
[csit.git] / tests / func / iacl / ipv6_iacl_untagged.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/counters.robot
17 | Resource | resources/libraries/robot/interfaces.robot
18 | Resource | resources/libraries/robot/testing_path.robot
19 | Resource | resources/libraries/robot/ipv6.robot
20 | Resource | resources/libraries/robot/l2_xconnect.robot
21 | Resource | resources/libraries/robot/traffic.robot
22 | Library | resources.libraries.python.Classify.Classify
23 | Library | resources.libraries.python.Trace
24
25 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
26 | Suite Setup | Run Keywords | Setup all DUTs before test
27 | ...         | AND          | Setup all TGs before traffic script
28 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
29 | Test Setup | Setup all DUTs before test
30 | Test Teardown | Run Keywords | Show packet trace on all DUTs | ${nodes}
31 | ...           | AND          | Vpp Show Errors | ${nodes['DUT1']}
32 | ...           | AND          | Show vpp trace dump on all DUTs
33 | Documentation | *IPv6 routing with ingress ACL test cases*
34 | ...
35 | ... | Encapsulations: Eth-IPv6 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv6
36 | ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with
37 | ... | one link between the nodes. DUT1 and DUT2 are configured with IPv6
38 | ... | routing and static routes. DUT1 is configured with iACL on link to TG,
39 | ... | iACL classification and permit/deny action are configured on a per test
40 | ... | case basis. Test ICMPv6 Echo Request packets are sent in one direction
41 | ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG
42 | ... | verifies if packets are dropped, or if received verifies packet IPv6
43 | ... | src-addr, dst-addr and MAC addresses.
44
45 *** Variables ***
46 | ${dut1_to_tg_ip}= | 3ffe:62::1
47 | ${dut1_to_dut2_ip}= | 3ffe:63::1
48 | ${dut1_to_dut2_ip_GW}= | 3ffe:63::2
49 | ${dut2_to_dut1_ip}= | 3ffe:72::1
50 | ${dut2_to_tg_ip}= | 3ffe:73::1
51 | ${test_dst_ip}= | 3ffe:64::1
52 | ${test_src_ip}= | 3ffe:61::1
53 | ${non_drop_dst_ip}= | 3ffe:54::1
54 | ${non_drop_src_ip}= | 3ffe:51::1
55 | ${prefix_length}= | 64
56 | ${ip_version}= | ip6
57 | ${l2_table}= | l2
58
59 *** Test Cases ***
60 | TC01: DUT with iACL IPv6 src-addr drops matching pkts
61 | | [Documentation]
62 | | ... | On DUT1 add source IPv6 address to classify table with 'deny'.\
63 | | ... | Make TG verify matching packets are dropped.
64 | | Given Path for 3-node testing is set
65 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
66 | | And Interfaces in 3-node path are up
67 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
68 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
69 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
70 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
71 | | And Add Ip Neighbor
72 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
73 | | ... | ${tg_to_dut2_mac}
74 | | And Vpp Route Add
75 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
76 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
77 | | And L2 setup xconnect on DUT
78 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
79 | | And Vpp All Ra Suppress Link Layer | ${nodes}
80 | | Then Send Packet And Check Headers | ${tg_node}
81 | | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1}
82 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
83 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
84 | | And Send Packet And Check Headers | ${tg_node}
85 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
86 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
87 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
88 | | ${table_index} | ${skip_n} | ${match_n}=
89 | | ... | When Vpp Creates Classify Table L3 | ${dut1_node}
90 | | ... | ${ip_version} | src
91 | | And Vpp Configures Classify Session L3
92 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
93 | | ... | ${ip_version} | src | ${test_src_ip}
94 | | And Vpp Enable Input Acl Interface
95 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
96 | | Then Send packet from Port to Port should failed | ${tg_node}
97 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
98 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
99 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
100 | | And Send Packet And Check Headers | ${tg_node}
101 | | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1}
102 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
103 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
104
105 | TC02: DUT with iACL IPv6 dst-addr drops matching pkts
106 | | [Documentation]
107 | | ... | On DUT1 add destination IPv6 address to classify table with 'deny'.\
108 | | ... | Make TG verify matching packets are dropped.
109 | | Given Path for 3-node testing is set
110 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
111 | | And Interfaces in 3-node path are up
112 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
113 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
114 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
115 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
116 | | And Add Ip Neighbor
117 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
118 | | ... | ${tg_to_dut2_mac}
119 | | And Vpp Route Add
120 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
121 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
122 | | And Vpp Route Add
123 | | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length}
124 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
125 | | And L2 setup xconnect on DUT
126 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
127 | | And Vpp All Ra Suppress Link Layer | ${nodes}
128 | | Then Send Packet And Check Headers | ${tg_node}
129 | | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1}
130 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
131 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
132 | | And Send Packet And Check Headers | ${tg_node}
133 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
134 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
135 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
136 | | ${table_index} | ${skip_n} | ${match_n}=
137 | | ... | When Vpp Creates Classify Table L3 | ${dut1_node}
138 | | ... | ${ip_version} | dst
139 | | And Vpp Configures Classify Session L3
140 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
141 | | ... | ${ip_version} | dst | ${test_dst_ip}
142 | | And Vpp Enable Input Acl Interface
143 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
144 | | Then Send packet from Port to Port should failed | ${tg_node}
145 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
146 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
147 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
148 | | And Send Packet And Check Headers | ${tg_node}
149 | | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1}
150 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
151 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
152
153 | TC03: DUT with iACL IPv6 src-addr and dst-addr drops matching pkts
154 | | [Documentation]
155 | | ... | On DUT1 add source and destination IPv6 addresses to classify table\
156 | | ... | with 'deny'. Make TG verify matching packets are dropped.
157 | | Given Path for 3-node testing is set
158 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
159 | | And Interfaces in 3-node path are up
160 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
161 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
162 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
163 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
164 | | And Add Ip Neighbor
165 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
166 | | ... | ${tg_to_dut2_mac}
167 | | And Vpp Route Add
168 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
169 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
170 | | And Vpp Route Add
171 | | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length}
172 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
173 | | And L2 setup xconnect on DUT
174 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
175 | | And Vpp All Ra Suppress Link Layer | ${nodes}
176 | | Then Send Packet And Check Headers | ${tg_node}
177 | | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1}
178 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
179 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
180 | | And Send Packet And Check Headers | ${tg_node}
181 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
182 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
183 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
184 | | ${table_index_1} | ${skip_n_1} | ${match_n_1}=
185 | | ... | When Vpp Creates Classify Table L3 | ${dut1_node}
186 | | ... | ${ip_version} | src
187 | | ${table_index_2} | ${skip_n_2} | ${match_n_2}=
188 | | ... | And Vpp Creates Classify Table L3 | ${dut1_node} | ${ip_version} | dst
189 | | And Vpp Configures Classify Session L3
190 | | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_2}
191 | | ... | ${ip_version} | src | ${test_src_ip}
192 | | And Vpp Configures Classify Session L3
193 | | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2}
194 | | ... | ${ip_version} | dst | ${test_dst_ip}
195 | | And Vpp Enable Input Acl Interface
196 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1}
197 | | And Vpp Enable Input Acl Interface
198 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2}
199 | | Then Send packet from Port to Port should failed | ${tg_node}
200 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
201 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
202 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
203 | | And Send Packet And Check Headers | ${tg_node}
204 | | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1}
205 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
206 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
207
208 | TC04: DUT with iACL IPv6 protocol set to TCP drops matching pkts
209 | | [Documentation]
210 | | ... | On DUT1 add protocol mask and TCP protocol (0x06) to classify table\
211 | | ... | with 'deny'. Make TG verify matching packets are dropped.
212 | | Given Path for 3-node testing is set
213 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
214 | | And Interfaces in 3-node path are up
215 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
216 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
217 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
218 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
219 | | And Add Ip Neighbor
220 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
221 | | ... | ${tg_to_dut2_mac}
222 | | And Vpp Route Add
223 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
224 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
225 | | And L2 setup xconnect on DUT
226 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
227 | | And Vpp All Ra Suppress Link Layer | ${nodes}
228 | | Then Send TCP or UDP packet | ${tg_node}
229 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
230 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
231 | | And Send TCP or UDP packet | ${tg_node}
232 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
233 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
234 | | ${table_index} | ${skip_n} | ${match_n}=
235 | | ... | When Vpp Creates Classify Table Hex
236 | | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF
237 | | And Vpp Configures Classify Session Hex
238 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
239 | | ... | 000000000000000000000000000000000000000006
240 | | And Vpp Enable Input Acl Interface
241 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
242 | | Then Send TCP or UDP packet should failed | ${tg_node}
243 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
244 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
245 | | And Send TCP or UDP packet | ${tg_node}
246 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
247 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
248
249 | TC05: DUT with iACL IPv6 protocol set to UDP drops matching pkts
250 | | [Documentation]
251 | | ... | On DUT1 add protocol mask and UDP protocol (0x11) to classify table\
252 | | ... | with 'deny'. Make TG verify matching packets are dropped.
253 | | Given Path for 3-node testing is set
254 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
255 | | And Interfaces in 3-node path are up
256 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
257 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
258 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
259 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
260 | | And Add Ip Neighbor
261 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
262 | | ... | ${tg_to_dut2_mac}
263 | | And Vpp Route Add
264 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
265 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
266 | | And L2 setup xconnect on DUT
267 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
268 | | And Vpp All Ra Suppress Link Layer | ${nodes}
269 | | Then Send TCP or UDP packet | ${tg_node}
270 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
271 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
272 | | And Send TCP or UDP packet | ${tg_node}
273 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
274 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
275 | | ${table_index} | ${skip_n} | ${match_n}=
276 | | ... | When Vpp Creates Classify Table Hex
277 | | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF
278 | | And Vpp Configures Classify Session Hex
279 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
280 | | ... | 000000000000000000000000000000000000000011
281 | | And Vpp Enable Input Acl Interface
282 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
283 | | Then Send TCP or UDP packet should failed | ${tg_node}
284 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
285 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
286 | | And Send TCP or UDP packet | ${tg_node}
287 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
288 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
289
290 | TC06: DUT with iACL IPv6 TCP src-ports drops matching pkts
291 | | [Documentation]
292 | | ... | On DUT1 add TCP source ports to classify table with 'deny'.\
293 | | ... | Make TG verify matching packets are dropped.
294 | | Given Path for 3-node testing is set
295 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
296 | | And Interfaces in 3-node path are up
297 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
298 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
299 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
300 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
301 | | And Add Ip Neighbor
302 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
303 | | ... | ${tg_to_dut2_mac}
304 | | And Vpp Route Add
305 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
306 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
307 | | And L2 setup xconnect on DUT
308 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
309 | | And Vpp All Ra Suppress Link Layer | ${nodes}
310 | | Then Send TCP or UDP packet | ${tg_node}
311 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
312 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20
313 | | And Send TCP or UDP packet | ${tg_node}
314 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
315 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
316 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | source
317 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0
318 | | ${table_index} | ${skip_n} | ${match_n}=
319 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
320 | | And Vpp Configures Classify Session Hex
321 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
322 | | ... | ${hex_value}
323 | | And Vpp Enable Input Acl Interface
324 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
325 | | Then Send TCP or UDP packet should failed | ${tg_node}
326 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
327 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
328 | | And Send TCP or UDP packet | ${tg_node}
329 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
330 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20
331
332 | TC07: DUT with iACL IPv6 TCP dst-ports drops matching pkts
333 | | [Documentation]
334 | | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\
335 | | ... | Make TG verify matching packets are dropped.
336 | | Given Path for 3-node testing is set
337 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
338 | | And Interfaces in 3-node path are up
339 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
340 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
341 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
342 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
343 | | And Add Ip Neighbor
344 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
345 | | ... | ${tg_to_dut2_mac}
346 | | And Vpp Route Add
347 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
348 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
349 | | And L2 setup xconnect on DUT
350 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
351 | | And Vpp All Ra Suppress Link Layer | ${nodes}
352 | | Then Send TCP or UDP packet | ${tg_node}
353 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
354 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110
355 | | And Send TCP or UDP packet | ${tg_node}
356 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
357 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80
358 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | destination
359 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80
360 | | ${table_index} | ${skip_n} | ${match_n}=
361 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
362 | | And Vpp Configures Classify Session Hex
363 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
364 | | ... | ${hex_value}
365 | | And Vpp Enable Input Acl Interface
366 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
367 | | Then Send TCP or UDP packet should failed | ${tg_node}
368 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
369 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80
370 | | And Send TCP or UDP packet | ${tg_node}
371 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
372 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110
373
374 | TC08: DUT with iACL IPv6 TCP src-ports and dst-ports drops matching pkts
375 | | [Documentation]
376 | | ... | On DUT1 add TCP source and destination ports to classify table\
377 | | ... | with 'deny'. Make TG verify matching packets are dropped.
378 | | Given Path for 3-node testing is set
379 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
380 | | And Interfaces in 3-node path are up
381 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
382 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
383 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
384 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
385 | | And Add Ip Neighbor
386 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
387 | | ... | ${tg_to_dut2_mac}
388 | | And Vpp Route Add
389 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
390 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
391 | | And L2 setup xconnect on DUT
392 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
393 | | And Vpp All Ra Suppress Link Layer | ${nodes}
394 | | Then Send TCP or UDP packet | ${tg_node}
395 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
396 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25
397 | | And Send TCP or UDP packet | ${tg_node}
398 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
399 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
400 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP
401 | | ...                                      | source + destination
402 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20
403 | | ${table_index} | ${skip_n} | ${match_n}=
404 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
405 | | And Vpp Configures Classify Session Hex
406 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
407 | | ... | ${hex_value}
408 | | And Vpp Enable Input Acl Interface
409 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
410 | | Then Send TCP or UDP packet should failed | ${tg_node}
411 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
412 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
413 | | And Send TCP or UDP packet | ${tg_node}
414 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
415 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25
416
417 | TC09: DUT with iACL IPv6 UDP src-ports drops matching pkts
418 | | [Documentation]
419 | | ... | On DUT1 add UDP source ports to classify table with 'deny'.\
420 | | ... | Make TG verify matching packets are dropped.
421 | | Given Path for 3-node testing is set
422 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
423 | | And Interfaces in 3-node path are up
424 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
425 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
426 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
427 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
428 | | And Add Ip Neighbor
429 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
430 | | ... | ${tg_to_dut2_mac}
431 | | And Vpp Route Add
432 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
433 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
434 | | And L2 setup xconnect on DUT
435 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
436 | | And Vpp All Ra Suppress Link Layer | ${nodes}
437 | | Then Send TCP or UDP packet | ${tg_node}
438 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
439 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20
440 | | And Send TCP or UDP packet | ${tg_node}
441 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
442 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
443 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | source
444 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0
445 | | ${table_index} | ${skip_n} | ${match_n}=
446 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
447 | | And Vpp Configures Classify Session Hex
448 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
449 | | ... | ${hex_value}
450 | | And Vpp Enable Input Acl Interface
451 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
452 | | Then Send TCP or UDP packet should failed | ${tg_node}
453 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
454 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
455 | | And Send TCP or UDP packet | ${tg_node}
456 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
457 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20
458
459 | TC10: DUT with iACL IPv6 UDP dst-ports drops matching pkts
460 | | [Documentation]
461 | | ... | On DUT1 add TCP destination ports to classify table with 'deny'.\
462 | | ... | Make TG verify matching packets are dropped.
463 | | Given Path for 3-node testing is set
464 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
465 | | And Interfaces in 3-node path are up
466 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
467 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
468 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
469 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
470 | | And Add Ip Neighbor
471 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
472 | | ... | ${tg_to_dut2_mac}
473 | | And Vpp Route Add
474 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
475 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
476 | | And L2 setup xconnect on DUT
477 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
478 | | And Vpp All Ra Suppress Link Layer | ${nodes}
479 | | Then Send TCP or UDP packet | ${tg_node}
480 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
481 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110
482 | | And Send TCP or UDP packet | ${tg_node}
483 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
484 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80
485 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | destination
486 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80
487 | | ${table_index} | ${skip_n} | ${match_n}=
488 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
489 | | And Vpp Configures Classify Session Hex
490 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
491 | | ... | ${hex_value}
492 | | And Vpp Enable Input Acl Interface
493 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
494 | | Then Send TCP or UDP packet should failed | ${tg_node}
495 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
496 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80
497 | | And Send TCP or UDP packet | ${tg_node}
498 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
499 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110
500
501 | TC11: DUT with iACL IPv6 UDP src-ports and dst-ports drops matching pkts
502 | | [Documentation]
503 | | ... | On DUT1 add UDP source and destination ports to classify table\
504 | | ... | with 'deny'. Make TG verify matching packets are dropped.
505 | | Given Path for 3-node testing is set
506 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
507 | | And Interfaces in 3-node path are up
508 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
509 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
510 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
511 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
512 | | And Add Ip Neighbor
513 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
514 | | ... | ${tg_to_dut2_mac}
515 | | And Vpp Route Add
516 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
517 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
518 | | And L2 setup xconnect on DUT
519 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
520 | | And Vpp All Ra Suppress Link Layer | ${nodes}
521 | | Then Send TCP or UDP packet | ${tg_node}
522 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
523 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25
524 | | And Send TCP or UDP packet | ${tg_node}
525 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
526 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
527 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP
528 | | ...                                      | source + destination
529 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20
530 | | ${table_index} | ${skip_n} | ${match_n}=
531 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
532 | | And Vpp Configures Classify Session Hex
533 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
534 | | ... | ${hex_value}
535 | | And Vpp Enable Input Acl Interface
536 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
537 | | Then Send TCP or UDP packet should failed | ${tg_node}
538 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
539 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
540 | | And Send TCP or UDP packet | ${tg_node}
541 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
542 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25
543
544 | TC12: DUT with iACL MAC src-addr and iACL IPv6 UDP src-ports and dst-ports drops matching pkts
545 | | [Documentation]
546 | | ... | On DUT1 add source MAC address to classify (L2) table and add UDP\
547 | | ... | source and destination ports to classify (hex) table with 'deny'.
548 | | ... | Make TG verify matching packets are dropped.
549 | | Given Path for 3-node testing is set
550 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
551 | | And Interfaces in 3-node path are up
552 | | And L2 setup xconnect on DUT
553 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_tg}
554 | | And L2 setup xconnect on DUT
555 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
556 | | And Vpp All Ra Suppress Link Layer | ${nodes}
557 | | Then Send TCP or UDP packet | ${tg_node}
558 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
559 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25
560 | | And Send TCP or UDP packet | ${tg_node}
561 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
562 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
563 | | ${table_index} | ${skip_n} | ${match_n}=
564 | | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src
565 | | And Vpp Configures Classify Session L2
566 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
567 | | ... | src | ${tg_to_dut1_mac}
568 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP
569 | | ...                                      | source + destination
570 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20
571 | | ${table_index} | ${skip_n} | ${match_n}=
572 | | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask}
573 | | And Vpp Configures Classify Session Hex
574 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
575 | | ... | ${hex_value}
576 | | And Vpp Enable Input Acl Interface
577 | | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index}
578 | | Then Send TCP or UDP packet | ${tg_node}
579 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
580 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25
581 | | And Send TCP or UDP packet should failed | ${tg_node}
582 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
583 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20