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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.