2e8ec667861466b73464a28175752a169e3fa0ce
[csit.git] / tests / suites / ipv6 / 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 TGs before traffic script
27 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
28 | Test Setup | Setup all DUTs before test
29 | Test Teardown | Run Keywords | Show packet trace on all DUTs | ${nodes}
30 | ...           | AND          | Vpp Show Errors | ${nodes['DUT1']}
31
32 *** Variables ***
33 | ${dut1_to_tg_ip}= | 3ffe:62::1
34 | ${dut1_to_dut2_ip}= | 3ffe:63::1
35 | ${dut1_to_dut2_ip_GW}= | 3ffe:63::2
36 | ${dut2_to_dut1_ip}= | 3ffe:72::1
37 | ${dut2_to_tg_ip}= | 3ffe:73::1
38 | ${test_dst_ip}= | 3ffe:64::1
39 | ${test_src_ip}= | 3ffe:61::1
40 | ${non_drop_dst_ip}= | 3ffe:54::1
41 | ${non_drop_src_ip}= | 3ffe:51::1
42 | ${prefix_length}= | 64
43 | ${ip_version}= | ip6
44
45 *** Test Cases ***
46 | VPP drops packets based on IPv6 source addresses
47 | | [Documentation] | Create classify table on VPP, add source IP address
48 | | ...             | of traffic into table and setup 'deny' traffic
49 | | ...             | and check if traffic is dropped.
50 | | Given Path for 3-node testing is set
51 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
52 | | And Interfaces in 3-node path are up
53 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
54 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
55 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
56 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
57 | | And Add Ip Neighbor
58 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
59 | | ... | ${tg_to_dut2_mac}
60 | | And Vpp Route Add
61 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
62 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
63 | | And L2 setup xconnect on DUT
64 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
65 | | And Vpp All Ra Suppress Link Layer | ${nodes}
66 | | Then Send Packet And Check Headers | ${tg_node}
67 | | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
68 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
69 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
70 | | And Send Packet And Check Headers | ${tg_node}
71 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
72 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
73 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
74 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table
75 | | ... | ${dut1_node} | ${ip_version} | src
76 | | And Vpp Configure Classify Session
77 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
78 | | ... | ${ip_version} | src | ${test_src_ip}
79 | | And Vpp Enable Input Acl Interface
80 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
81 | | Then Send packet from Port to Port should failed | ${tg_node}
82 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
83 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
84 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
85 | | And Send Packet And Check Headers | ${tg_node}
86 | | ... | ${non_drop_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
87 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
88 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
89
90 | VPP drops packets based on IPv6 destination addresses
91 | | [Documentation] | Create classify table on VPP, add destination IP address
92 | | ...             | of traffic into table and setup 'deny' traffic
93 | | ...             | and check if traffic is dropped.
94 | | Given Path for 3-node testing is set
95 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
96 | | And Interfaces in 3-node path are up
97 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
98 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
99 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
100 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
101 | | And Add Ip Neighbor
102 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
103 | | ... | ${tg_to_dut2_mac}
104 | | And Vpp Route Add
105 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
106 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
107 | | And Vpp Route Add
108 | | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length}
109 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
110 | | And L2 setup xconnect on DUT
111 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
112 | | And Vpp All Ra Suppress Link Layer | ${nodes}
113 | | Then Send Packet And Check Headers | ${tg_node}
114 | | ... | ${test_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
115 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
116 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
117 | | And Send Packet And Check Headers | ${tg_node}
118 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
119 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
120 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
121 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table
122 | | ... | ${dut1_node} | ${ip_version} | dst
123 | | And Vpp Configure Classify Session
124 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
125 | | ... | ${ip_version} | dst | ${test_dst_ip}
126 | | And Vpp Enable Input Acl Interface
127 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
128 | | Then Send packet from Port to Port should failed | ${tg_node}
129 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
130 | | ... | ${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} | ${non_drop_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
137 | VPP drops packets based on IPv6 src-addr and dst-addr
138 | | [Documentation] | Create classify table on VPP, add source and destination
139 | | ...             | IP address of traffic into table and setup 'deny' traffic
140 | | ...             | and check if traffic is dropped.
141 | | Given Path for 3-node testing is set
142 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
143 | | And Interfaces in 3-node path are up
144 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
145 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
146 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
147 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
148 | | And Add Ip Neighbor
149 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
150 | | ... | ${tg_to_dut2_mac}
151 | | And Vpp Route Add
152 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
153 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
154 | | And Vpp Route Add
155 | | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length}
156 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
157 | | And L2 setup xconnect on DUT
158 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
159 | | And Vpp All Ra Suppress Link Layer | ${nodes}
160 | | Then Send Packet And Check Headers | ${tg_node}
161 | | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1}
162 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
163 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
164 | | And Send Packet And Check Headers | ${tg_node}
165 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
166 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
167 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
168 | | ${table_index_1} | ${skip_n_1} | ${match_n_1}=
169 | | ... | When Vpp Create Classify Table | ${dut1_node} | ${ip_version} | src
170 | | ${table_index_2} | ${skip_n_2} | ${match_n_2}=
171 | | ... | And Vpp Create Classify Table | ${dut1_node} | ${ip_version} | dst
172 | | And Vpp Configure Classify Session
173 | | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_2}
174 | | ... | ${ip_version} | src | ${test_src_ip}
175 | | And Vpp Configure Classify Session
176 | | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2}
177 | | ... | ${ip_version} | dst | ${test_dst_ip}
178 | | And Vpp Enable Input Acl Interface
179 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1}
180 | | And Vpp Enable Input Acl Interface
181 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2}
182 | | Then Send packet from Port to Port should failed | ${tg_node}
183 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
184 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2}
185 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
186 | | And Send Packet And Check Headers | ${tg_node}
187 | | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1}
188 | | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2}
189 | | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac}
190
191 | VPP drops packets based on IPv6 protocol (TCP)
192 | | [Documentation] | Create classify table on VPP, add mask for TCP port
193 | | ...             | into table and setup 'deny' traffic
194 | | ...             | and check if TCP traffic is dropped.
195 | | Given Path for 3-node testing is set
196 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
197 | | And Interfaces in 3-node path are up
198 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
199 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
200 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
201 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
202 | | And Add Ip Neighbor
203 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
204 | | ... | ${tg_to_dut2_mac}
205 | | And Vpp Route Add
206 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
207 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
208 | | And L2 setup xconnect on DUT
209 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
210 | | And Vpp All Ra Suppress Link Layer | ${nodes}
211 | | Then Send TCP or UDP packet | ${tg_node}
212 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
213 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
214 | | And Send TCP or UDP packet | ${tg_node}
215 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
216 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
217 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
218 | | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF
219 | | And Vpp Configure Classify Session Hex
220 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
221 | | ... | 000000000000000000000000000000000000000006
222 | | And Vpp Enable Input Acl Interface
223 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
224 | | Then Send TCP or UDP packet should failed | ${tg_node}
225 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
226 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
227 | | And Send TCP or UDP packet | ${tg_node}
228 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
229 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
230
231 | VPP drops packets based on IPv6 protocol (UDP)
232 | | [Documentation] | Create classify table on VPP, add mask for UDP port
233 | | ...             | into table and setup 'deny' traffic
234 | | ...             | and check if UDP traffic is dropped.
235 | | Given Path for 3-node testing is set
236 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
237 | | And Interfaces in 3-node path are up
238 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
239 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
240 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
241 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
242 | | And Add Ip Neighbor
243 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
244 | | ... | ${tg_to_dut2_mac}
245 | | And Vpp Route Add
246 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
247 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
248 | | And L2 setup xconnect on DUT
249 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
250 | | And Vpp All Ra Suppress Link Layer | ${nodes}
251 | | Then Send TCP or UDP packet | ${tg_node}
252 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
253 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
254 | | And Send TCP or UDP packet | ${tg_node}
255 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
256 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
257 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
258 | | ... | ${dut1_node} | 0000000000000000000000000000000000000000FF
259 | | And Vpp Configure Classify Session Hex
260 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
261 | | ... | 000000000000000000000000000000000000000011
262 | | And Vpp Enable Input Acl Interface
263 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
264 | | Then Send TCP or UDP packet should failed | ${tg_node}
265 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
266 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
267 | | And Send TCP or UDP packet | ${tg_node}
268 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
269 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
270
271 | VPP drops packets based on IPv6 TCP src ports
272 | | [Documentation] | Create classify table on VPP, add source IP address
273 | | ...             | of traffic into table and setup 'deny' traffic
274 | | ...             | and check if traffic is dropped.
275 | | Given Path for 3-node testing is set
276 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
277 | | And Interfaces in 3-node path are up
278 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
279 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
280 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
281 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
282 | | And Add Ip Neighbor
283 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
284 | | ... | ${tg_to_dut2_mac}
285 | | And Vpp Route Add
286 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
287 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
288 | | And L2 setup xconnect on DUT
289 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
290 | | And Vpp All Ra Suppress Link Layer | ${nodes}
291 | | Then Send TCP or UDP packet | ${tg_node}
292 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
293 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20
294 | | And Send TCP or UDP packet | ${tg_node}
295 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
296 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
297 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | source
298 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0
299 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
300 | | ... | ${dut1_node} | ${hex_mask}
301 | | And Vpp Configure Classify Session Hex
302 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
303 | | ... | ${hex_value}
304 | | And Vpp Enable Input Acl Interface
305 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
306 | | Then Send TCP or UDP packet should failed | ${tg_node}
307 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
308 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
309 | | And Send TCP or UDP packet | ${tg_node}
310 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
311 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 20
312
313 | VPP drops packets based on IPv6 TCP dst ports
314 | | [Documentation] | Create classify table on VPP, add destination TCP port
315 | | ...             | of traffic into table and setup 'deny' traffic
316 | | ...             | and check if traffic is dropped.
317 | | Given Path for 3-node testing is set
318 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
319 | | And Interfaces in 3-node path are up
320 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
321 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
322 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
323 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
324 | | And Add Ip Neighbor
325 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
326 | | ... | ${tg_to_dut2_mac}
327 | | And Vpp Route Add
328 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
329 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
330 | | And L2 setup xconnect on DUT
331 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
332 | | And Vpp All Ra Suppress Link Layer | ${nodes}
333 | | Then Send TCP or UDP packet | ${tg_node}
334 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
335 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110
336 | | And Send TCP or UDP packet | ${tg_node}
337 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
338 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80
339 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP | destination
340 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80
341 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
342 | | ... | ${dut1_node} | ${hex_mask}
343 | | And Vpp Configure Classify Session Hex
344 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
345 | | ... | ${hex_value}
346 | | And Vpp Enable Input Acl Interface
347 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
348 | | Then Send TCP or UDP packet should failed | ${tg_node}
349 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
350 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 80
351 | | And Send TCP or UDP packet | ${tg_node}
352 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
353 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 20 | 110
354
355 | VPP drops packets based on IPv6 TCP src + dst ports
356 | | [Documentation] | Create classify table on VPP, add source and destination
357 | | ...             | TCP port of traffic into table and setup 'deny' traffic
358 | | ...             | and check if traffic is dropped.
359 | | Given Path for 3-node testing is set
360 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
361 | | And Interfaces in 3-node path are up
362 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
363 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
364 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
365 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
366 | | And Add Ip Neighbor
367 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
368 | | ... | ${tg_to_dut2_mac}
369 | | And Vpp Route Add
370 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
371 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
372 | | And L2 setup xconnect on DUT
373 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
374 | | And Vpp All Ra Suppress Link Layer | ${nodes}
375 | | Then Send TCP or UDP packet | ${tg_node}
376 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
377 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25
378 | | And Send TCP or UDP packet | ${tg_node}
379 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
380 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
381 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP
382 | | ...                                      | source + destination
383 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20
384 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
385 | | ... | ${dut1_node} | ${hex_mask}
386 | | And Vpp Configure Classify Session Hex
387 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
388 | | ... | ${hex_value}
389 | | And Vpp Enable Input Acl Interface
390 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
391 | | Then Send TCP or UDP packet should failed | ${tg_node}
392 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
393 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20
394 | | And 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
398 | VPP drops packets based on IPv6 UDP src ports
399 | | [Documentation] | Create classify table on VPP, add source UDP port
400 | | ...             | of traffic into table and setup 'deny' traffic
401 | | ...             | and check if traffic is dropped.
402 | | Given Path for 3-node testing is set
403 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
404 | | And Interfaces in 3-node path are up
405 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
406 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
407 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
408 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
409 | | And Add Ip Neighbor
410 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
411 | | ... | ${tg_to_dut2_mac}
412 | | And Vpp Route Add
413 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
414 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
415 | | And L2 setup xconnect on DUT
416 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
417 | | And Vpp All Ra Suppress Link Layer | ${nodes}
418 | | Then Send TCP or UDP packet | ${tg_node}
419 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
420 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20
421 | | And Send TCP or UDP packet | ${tg_node}
422 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
423 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
424 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | source
425 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 0
426 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
427 | | ... | ${dut1_node} | ${hex_mask}
428 | | And Vpp Configure Classify Session Hex
429 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
430 | | ... | ${hex_value}
431 | | And Vpp Enable Input Acl Interface
432 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
433 | | Then Send TCP or UDP packet should failed | ${tg_node}
434 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
435 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
436 | | And Send TCP or UDP packet | ${tg_node}
437 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
438 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 20
439
440 | VPP drops packets based on IPv6 UDP dst ports
441 | | [Documentation] | Create classify table on VPP, add destination UDP port
442 | | ...             | of traffic into table and setup 'deny' traffic
443 | | ...             | and check if traffic is dropped.
444 | | Given Path for 3-node testing is set
445 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
446 | | And Interfaces in 3-node path are up
447 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
448 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
449 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
450 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
451 | | And Add Ip Neighbor
452 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
453 | | ... | ${tg_to_dut2_mac}
454 | | And Vpp Route Add
455 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
456 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
457 | | And L2 setup xconnect on DUT
458 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
459 | | And Vpp All Ra Suppress Link Layer | ${nodes}
460 | | Then Send TCP or UDP packet | ${tg_node}
461 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
462 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110
463 | | And Send TCP or UDP packet | ${tg_node}
464 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
465 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80
466 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP | destination
467 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 0 | 80
468 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
469 | | ... | ${dut1_node} | ${hex_mask}
470 | | And Vpp Configure Classify Session Hex
471 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
472 | | ... | ${hex_value}
473 | | And Vpp Enable Input Acl Interface
474 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
475 | | Then Send TCP or UDP packet should failed | ${tg_node}
476 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
477 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 80
478 | | And Send TCP or UDP packet | ${tg_node}
479 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
480 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 20 | 110
481
482 | VPP drops packets based on IPv6 UDP src + dst ports
483 | | [Documentation] | Create classify table on VPP, add source and destination
484 | | ...             | UDP port of traffic into table and setup 'deny' traffic
485 | | ...             | and check if traffic is dropped.
486 | | Given Path for 3-node testing is set
487 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
488 | | And Interfaces in 3-node path are up
489 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
490 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
491 | | And Vpp Set If Ipv6 Addr | ${dut1_node}
492 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
493 | | And Add Ip Neighbor
494 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW}
495 | | ... | ${tg_to_dut2_mac}
496 | | And Vpp Route Add
497 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
498 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
499 | | And L2 setup xconnect on DUT
500 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
501 | | And Vpp All Ra Suppress Link Layer | ${nodes}
502 | | Then Send TCP or UDP packet | ${tg_node}
503 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
504 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25
505 | | And Send TCP or UDP packet | ${tg_node}
506 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
507 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
508 | | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP
509 | | ...                                      | source + destination
510 | | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20
511 | | ${table_index} | ${skip_n} | ${match_n}= | When Vpp Create Classify Table Hex
512 | | ... | ${dut1_node} | ${hex_mask}
513 | | And Vpp Configure Classify Session Hex
514 | | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n}
515 | | ... | ${hex_value}
516 | | And Vpp Enable Input Acl Interface
517 | | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index}
518 | | Then Send TCP or UDP packet should failed | ${tg_node}
519 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac}
520 | | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20
521 | | And 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