b78ede38ef5f530a8086961e56e1b01834549079
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
1 # Copyright (c) 2019 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 | Library | Collections
16 | Library | String
17 | Library | resources.libraries.python.Classify.Classify
18 | Library | resources.libraries.python.DpdkUtil
19 | Library | resources.libraries.python.InterfaceUtil
20 | Library | resources.libraries.python.IPUtil
21 | Library | resources.libraries.python.L2Util
22 | Library | resources.libraries.python.NodePath
23 | Library | resources.libraries.python.topology.Topology
24 | Library | resources.libraries.python.TestConfig
25 | Library | resources.libraries.python.TrafficGenerator
26 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
27 | Library | resources.libraries.python.VhostUser
28 | ...
29 | Resource | resources/libraries/robot/ip/ip4.robot
30 | Resource | resources/libraries/robot/ip/ip6.robot
31 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
32 | Resource | resources/libraries/robot/l2/l2_patch.robot
33 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
34 | Resource | resources/libraries/robot/l2/tagging.robot
35 | Resource | resources/libraries/robot/overlay/srv6.robot
36 | Resource | resources/libraries/robot/shared/counters.robot
37 | Resource | resources/libraries/robot/shared/default.robot
38 | Resource | resources/libraries/robot/shared/interfaces.robot
39 | ...
40 | Documentation | Performance suite keywords - configuration
41
42 *** Keywords ***
43 | Set interfaces in path up
44 | | [Documentation]
45 | | ... | *Set UP state on VPP interfaces in path on all DUT nodes and set
46 | | ... | maximal MTU.*
47 | | ...
48 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
49 # software interfaces. Run KW at the start phase of VPP setup to split
50 # from other "functional" configuration. This will allow modularity of this
51 # library
52 | | :FOR | ${dut} | IN | @{duts}
53 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
54 | | | ... | Variable Should Exist | ${${dut}_if1}
55 | | | Run Keyword If | '${if1_status}' == 'PASS'
56 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
57 | | | ... | ELSE
58 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
59 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
60 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
61 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
62 | | | ... | Variable Should Exist | ${${dut}_if2}
63 | | | Run Keyword If | '${if2_status}' == 'PASS'
64 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up
65 | | | ... | ELSE
66 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up
67 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
68 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up
69 | | :FOR | ${dut} | IN | @{duts}
70 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
71 | | | ... | Variable Should Exist | ${${dut}_if1}
72 | | | Run Keyword If | '${if1_status}' == 'PASS'
73 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
74 | | | ... | ELSE
75 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
76 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
77 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
78 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
79 | | | ... | Variable Should Exist | ${${dut}_if2}
80 | | | Run Keyword If | '${if2_status}' == 'PASS'
81 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2}
82 | | | ... | ELSE
83 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1}
84 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
85 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2}
86 | | All VPP Interfaces Ready Wait | ${nodes} | retries=${300}
87
88 | Set single interfaces in path up
89 | | [Documentation]
90 | | ... | *Set UP state on single VPP interfaces in path on all DUT nodes and set
91 | | ... | maximal MTU.*
92 | | ...
93 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
94 # software interfaces. Run KW at the start phase of VPP setup to split
95 # from other "functional" configuration. This will allow modularity of this
96 # library
97 | | :FOR | ${dut} | IN | @{duts}
98 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
99 | | | ... | Variable Should Exist | ${${dut}_if1}
100 | | | Run Keyword If | '${if1_status}' == 'PASS'
101 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
102 | | | ... | ELSE
103 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
104 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
105 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
106 | | :FOR | ${dut} | IN | @{duts}
107 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
108 | | | ... | Variable Should Exist | ${${dut}_if1}
109 | | | Run Keyword If | '${if1_status}' == 'PASS'
110 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
111 | | | ... | ELSE
112 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
113 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
114 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
115 | | All VPP Interfaces Ready Wait | ${nodes}
116
117 | Initialize IPSec in 3-node circular topology
118 | | [Documentation]
119 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
120 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
121 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG and
122 | | ... | DUT1-DUT2 links. Set routing for encrypted traffic on both DUT nodes
123 | | ... | with prefix /8 and next hop of neighbour DUT or TG interface IPv4
124 | | ... | address.
125 | | ...
126 | | Set interfaces in path up
127 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
128 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
129 | | ${dut1_if1_mac}= | Get Interface MAC | ${dut1} | ${dut1_if1}
130 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
131 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
132 | | ${dut2_if2_mac}= | Get Interface MAC | ${dut2} | ${dut2_if2}
133 | | Set Test Variable | ${tg_if1_mac}
134 | | Set Test Variable | ${tg_if2_mac}
135 | | Set Test Variable | ${dut1_if1_mac}
136 | | Set Test Variable | ${dut1_if2_mac}
137 | | Set Test Variable | ${dut2_if1_mac}
138 | | Set Test Variable | ${dut2_if2_mac}
139 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
140 | | ... | ${dut1_if1_ip4} | 24
141 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
142 | | ... | ${dut2_if2_ip4} | 24
143 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
144 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
145 | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | gateway=${tg_if1_ip4}
146 | | ... | interface=${dut1_if1}
147 | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | gateway=${tg_if2_ip4}
148 | | ... | interface=${dut2_if2}
149
150 | Initialize IPv6 forwarding in circular topology
151 | | [Documentation]
152 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
153 | | ... | circular topology. Get the interface MAC addresses and setup neighbor
154 | | ... | on all VPP interfaces. Setup IPv6 addresses with /64 prefix on DUT-TG
155 | | ... | links. In case of 3-node topology setup IPv6 adresses with /64 prefix
156 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /64
157 | | ... | and next hop of neighbour DUT interface IPv4 address.
158 | | ...
159 | | ... | *Arguments:*
160 | | ... | - remote_host1_ip - IP address of remote host1 (Optional).
161 | | ... | Type: string
162 | | ... | - remote_host2_ip - IP address of remote host2 (Optional).
163 | | ... | Type: string
164 | | ...
165 | | ... | *Example:*
166 | | ...
167 | | ... | \| Initialize IPv6 forwarding in circular topology \
168 | | ... | \| 3ffe:5f::1 \| 3ffe:5f::2 \|
169 | | ...
170 | | [Arguments] | ${remote_host1_ip}=${NONE} | ${remote_host2_ip}=${NONE}
171 | | ...
172 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
173 | | ... | Variable Should Exist | ${dut2}
174 | | ...
175 | | Set interfaces in path up
176 | | ...
177 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac}
178 | | Run Keyword If | '${dut2_status}' == 'PASS'
179 | | ... | VPP Add IP Neighbor
180 | | ... | ${dut1} | ${dut1_if2} | 2001:3::1 | ${dut2_if1_mac}
181 | | Run Keyword If | '${dut2_status}' == 'PASS'
182 | | ... | VPP Add IP Neighbor
183 | | ... | ${dut2} | ${dut2_if1} | 2001:3::2 | ${dut1_if2_mac}
184 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
185 | | ... | Set Variable | ${dut2}
186 | | ... | ELSE | Set Variable | ${dut1}
187 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
188 | | ... | Set Variable | ${dut2_if2}
189 | | ... | ELSE | Set Variable | ${dut1_if2}
190 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2001:2::2 | ${tg_if2_mac}
191 | | ...
192 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | 64
193 | | Run Keyword If | '${dut2_status}' == 'PASS'
194 | | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:3::1 | 64
195 | | Run Keyword If | '${dut2_status}' == 'PASS'
196 | | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 2001:3::2 | 64
197 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2001:2::1 | 64
198 | | ...
199 | | Suppress ICMPv6 router advertisement message | ${nodes}
200 | | ...
201 | | Run Keyword If | '${dut2_status}' == 'PASS'
202 | | ... | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=2001:3::2
203 | | ... | interface=${dut1_if2}
204 | | Run Keyword If | '${dut2_status}' == 'PASS'
205 | | ... | Vpp Route Add | ${dut2} | 2001:1::0 | 64 | gateway=2001:3::1
206 | | ... | interface=${dut2_if1}
207 | | ...
208 | | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}'
209 | | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 128
210 | | ... | gateway=2001:1::2 | interface=${dut1_if1}
211 | | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}'
212 | | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 128
213 | | ... | gateway=2001:2::2 | interface=${dut_if2}
214 | | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}'
215 | | ... | Run Keyword If | '${dut2_status}' == 'PASS'
216 | | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 128
217 | | ... | gateway=2001:3::2 | interface=${dut1_if2}
218 | | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}'
219 | | ... | Run Keyword If | '${dut2_status}' == 'PASS'
220 | | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 128
221 | | ... | gateway=2001:3::1 | interface=${dut2_if1}
222
223 | Initialize IPv6 forwarding with scaling in circular topology
224 | | [Documentation]
225 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
226 | | ... | DUT nodes in 2-node / 3-node circular topology
227 | | ...
228 | | ... | *Arguments:*
229 | | ... | - count - IP route count. Type: integer
230 | | ...
231 | | ... | *Return:*
232 | | ... | - No value returned
233 | | ...
234 | | ... | *Example:*
235 | | ...
236 | | ... | \| Initialize IPv6 forwarding with scaling in circular \
237 | | ... | topology \| 100000 \|
238 | | ...
239 | | [Arguments] | ${count}
240 | | ...
241 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
242 | | ... | Variable Should Exist | ${dut2}
243 | | ...
244 | | Set interfaces in path up
245 | | ...
246 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
247 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
248 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
249 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
250 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
251 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
252 | | ${prefix}= | Set Variable | 64
253 | | ${host_prefix}= | Set Variable | 128
254 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:3::1 | ${prefix}
255 | | Run Keyword If | '${dut2_status}' == 'PASS'
256 | | ... | VPP Interface Set IP Address
257 | | ... | ${dut1} | ${dut1_if2} | 2001:4::1 | ${prefix}
258 | | Run Keyword If | '${dut2_status}' == 'PASS'
259 | | ... | VPP Interface Set IP Address
260 | | ... | ${dut2} | ${dut2_if1} | 2001:4::2 | ${prefix}
261 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
262 | | ... | Set Variable | ${dut2}
263 | | ... | ELSE | Set Variable | ${dut1}
264 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
265 | | ... | Set Variable | ${dut2_if2}
266 | | ... | ELSE | Set Variable | ${dut1_if2}
267 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
268 | | Suppress ICMPv6 router advertisement message | ${nodes}
269 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
270 | | Run Keyword If | '${dut2_status}' == 'PASS'
271 | | ... | VPP Add Ip Neighbor
272 | | ... | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
273 | | Run Keyword If | '${dut2_status}' == 'PASS'
274 | | ... | VPP Add Ip Neighbor
275 | | ... | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
276 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2001:5::2 | ${tg1_if2_mac}
277 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | gateway=2001:3::2
278 | | ... | interface=${dut1_if1} | count=${count}
279 | | Run Keyword If | '${dut2_status}' == 'PASS'
280 | | ... | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix}
281 | | ... | gateway=2001:4::2 | interface=${dut1_if2} | count=${count}
282 | | Run Keyword If | '${dut2_status}' == 'PASS'
283 | | ... | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix}
284 | | ... | gateway=2001:4::1 | interface=${dut2_if1} | count=${count}
285 | | Vpp Route Add | ${dut} | 2001:2::0 | ${host_prefix} | gateway=2001:5::2
286 | | ... | interface=${dut_if2} | count=${count}
287
288 | Initialize IPv6 forwarding with vhost in 2-node circular topology
289 | | [Documentation]
290 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on \
291 | | ... | VPP node. Set UP state of all VPP interfaces in path. Create \
292 | | ... | nf_nodes+1 FIB tables on DUT with multipath routing. Assign each \
293 | | ... | Virtual interface to FIB table with Physical interface or Virtual \
294 | | ... | interface on both nodes. Setup IPv6 addresses with /64 prefix on \
295 | | ... | DUT-TG links. Set routing on DUT nodes in all FIB tables with \
296 | | ... | prefix /64 and next hop of neighbour IPv6 address. Setup neighbours \
297 | | ... | on all VPP interfaces.
298 | | ...
299 | | ... | *Arguments:*
300 | | ... | - nf_nodes - Number of guest VMs. Type: integer
301 | | ...
302 | | ... | *Note:*
303 | | ... | Socket paths for VM are defined in following format:
304 | | ... | - /var/run/vpp/sock-${VM_ID}-1
305 | | ... | - /var/run/vpp/sock-${VM_ID}-2
306 | | ...
307 | | ... | *Example:*
308 | | ...
309 | | ... | \| IPv6 forwarding with Vhost-User initialized in a 2-node circular\
310 | | ... | topology \| 1 \|
311 | | ...
312 | | [Arguments] | ${nf_nodes}=${1}
313 | | ...
314 | | Suppress ICMPv6 router advertisement message | ${nodes}
315 | | Set interfaces in path up
316 | | ${prefix}= | Set Variable | 64
317 | | ${fib_table_1}= | Set Variable | ${101}
318 | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nf_nodes}
319 | | Add Fib Table | ${dut1} | ${fib_table_1} | ipv6=${True}
320 | | Add Fib Table | ${dut1} | ${fib_table_2} | ipv6=${True}
321 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
322 | | ... | ipv6=${True}
323 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
324 | | ... | ipv6=${True}
325 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:100::1
326 | | ... | ${prefix}
327 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:200::1
328 | | ... | ${prefix}
329 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:100::2 | ${tg_if1_mac}
330 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:200::2 | ${tg_if2_mac}
331 | | Vpp Route Add | ${dut1} | 2001:1::0 | 64 | gateway=2001:100::2
332 | | ... | interface=${dut1_if1} | vrf=${fib_table_1}
333 | | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=2001:200::2
334 | | ... | interface=${dut1_if2} | vrf=${fib_table_2}
335 | | :FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
336 | | | ${fib_table_1}= | Evaluate | ${100}+${number}
337 | | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
338 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
339 | | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2
340 | | | ... | dut1-vhost-${number}-if1 | dut1-vhost-${number}-if2
341 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
342 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
343 | | | Add Fib Table | ${dut1} | ${fib_table_1} | ipv6=${True}
344 | | | Add Fib Table | ${dut1} | ${fib_table_2} | ipv6=${True}
345 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
346 | | | ... | ${fib_table_1} | ipv6=${True}
347 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
348 | | | ... | ${fib_table_2} | ipv6=${True}
349 | | | VPP Interface Set IP Address
350 | | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | 1:1::2 | 64
351 | | | VPP Interface Set IP Address
352 | | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | 1:2::2 | 64
353 | | | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=1:1::1
354 | | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
355 | | | Vpp Route Add | ${dut1} | 2001:1::0 | 64 | gateway=1:2::1
356 | | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
357
358 | Initialize IPv6 forwarding with VLAN dot1q sub-interfaces in circular topology
359 | | [Documentation]
360 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
361 | | ... | circular topology. In case of 3-node topology create VLAN
362 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
363 | | ... | sub-interface on dut1-if2 interface. Get the interface MAC addresses
364 | | ... | and setup ARPs. Setup IPv6 addresses with /64 prefix on DUT-TG links
365 | | ... | and set routing with prefix /64. In case of 3-node set IPv6 adresses
366 | | ... | with /64 prefix on VLAN and set routing on both DUT nodes with prefix
367 | | ... | /64. Set next hop of neighbour DUT interface IPv6 address. All
368 | | ... | interfaces are brought up.
369 | | ...
370 | | ... | *Arguments:*
371 | | ... | - tg_if1_net - TG interface 1 IPv6 subnet used by traffic generator.
372 | | ... | Type: integer
373 | | ... | - tg_if2_net - TG interface 2 IPv6 subnet used by traffic generator.
374 | | ... | Type: integer
375 | | ... | - subid - ID of the sub-interface to be created. Type: string
376 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
377 | | ...
378 | | ... | _NOTE:_ This KW uses following test case variables:
379 | | ... | - dut1 - DUT1 node.
380 | | ... | - dut2 - DUT2 node.
381 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
382 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
383 | | ...
384 | | ... | *Example:*
385 | | ...
386 | | ... | \| Initialize IPv6 forwarding with VLAN dot1q sub-interfaces\
387 | | ... | in circular topology \| 2001:1::0 \| 2001:2::0 \| 10 \| pop-1 \|
388 | | ...
389 | | [Arguments] | ${tg_if1_net} | ${tg_if2_net} | ${subid} | ${tag_rewrite}
390 | | ...
391 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
392 | | ... | Variable Should Exist | ${dut2}
393 | | ...
394 | | Set interfaces in path up
395 | | ...
396 | | Run Keyword If | '${dut2_status}' == 'PASS'
397 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
398 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
399 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
400 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
401 | | Run Keyword If | '${dut2_status}' == 'PASS'
402 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
403 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
404 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
405 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
406 | | ...
407 | | ${prefix}= | Set Variable | 64
408 | | ${host_prefix}= | Set Variable | 64
409 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
410 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
411 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
412 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
413 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
414 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
415 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg1_if1_mac}
416 | | Run Keyword If | '${dut2_status}' == 'PASS'
417 | | ... | VPP Add Ip Neighbor
418 | | ... | ${dut1} | ${subif_index_1} | 2002:2::2 | ${dut2_if1_mac}
419 | | Run Keyword If | '${dut2_status}' == 'PASS'
420 | | ... | VPP Add Ip Neighbor
421 | | ... | ${dut2} | ${subif_index_2} | 2002:2::1 | ${dut1_if2_mac}
422 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
423 | | ... | Set Variable | ${dut2}
424 | | ... | ELSE | Set Variable | ${dut1}
425 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
426 | | ... | Set Variable | ${dut2_if2}
427 | | ... | ELSE | Set Variable | ${subif_index_1}
428 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg1_if2_mac}
429 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
430 | | Run Keyword If | '${dut2_status}' == 'PASS'
431 | | ... | VPP Interface Set IP Address | ${dut1} | ${subif_index_1} | 2002:2::1
432 | | ... | ${prefix}
433 | | Run Keyword If | '${dut2_status}' == 'PASS'
434 | | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2} | 2002:2::2
435 | | ... | ${prefix}
436 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
437 | | Suppress ICMPv6 router advertisement message | ${nodes}
438 | | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix}
439 | | ... | gateway=2002:1::1 | interface=${dut1_if1}
440 | | Run Keyword If | '${dut2_status}' == 'PASS'
441 | | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | ${host_prefix}
442 | | ... | gateway=2002:2::2 | interface=${subif_index_1}
443 | | Run Keyword If | '${dut2_status}' == 'PASS'
444 | | ... | Vpp Route Add | ${dut2} | ${tg_if1_net} | ${host_prefix}
445 | | ... | gateway=2002:2::1 | interface=${subif_index_2}
446 | | Vpp Route Add | ${dut} | ${tg_if2_net} | ${host_prefix}
447 | | ... | gateway=2002:3::1 | interface=${dut_if2}
448
449 | Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
450 | | [Documentation]
451 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
452 | | ... | topology. Get the interface MAC addresses and setup neighbours on all
453 | | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment
454 | | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes
455 | | ... | on both DUT nodes.
456 | | ...
457 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
458 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
459 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
460 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
461 | | VPP Interface Set IP Address
462 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
463 | | VPP Interface Set IP Address
464 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
465 | | VPP Interface Set IP Address
466 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
467 | | VPP Interface Set IP Address
468 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
469 | | Suppress ICMPv6 router advertisement message | ${nodes}
470 | | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
471 | | | ${hexa_nr}= | Convert To Hex | ${number}
472 | | | VPP Add IP Neighbor | ${dut1}
473 | | | ... | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr} | ${tg1_if1_mac}
474 | | | VPP Add IP Neighbor | ${dut2}
475 | | | ... | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr} | ${tg1_if2_mac}
476 | | VPP Add IP Neighbor
477 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
478 | | VPP Add IP Neighbor
479 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
480 | | ${sid1}= | Set Variable If
481 | | ... | "${n}" == "1" | ${dut2_sid1}
482 | | ... | "${n}" == "2" | ${dut2_sid1_1}
483 | | ${sid2}= | Set Variable If
484 | | ... | "${n}" == "1" | ${dut1_sid2}
485 | | ... | "${n}" == "2" | ${dut1_sid2_1}
486 | | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | gateway=${dut2_if1_ip6}
487 | | ... | interface=${dut1_if2}
488 | | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | gateway=${dut1_if2_ip6}
489 | | ... | interface=${dut2_if1}
490 # Configure SRv6 for direction0
491 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
492 | | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
493 | | ... | Create List | ${dut2_sid1}
494 | | ... | ELSE IF | "${n}" == "2"
495 | | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
496 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
497 | | ... | @{sid_list_dir0}
498 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
499 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
500 | | Run Keyword If | "${n}" == "1"
501 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
502 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
503 | | Run Keyword If | "${n}" == "2"
504 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
505 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
506 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
507 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
508 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
509 | | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
510 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
511 # Configure SRv6 for direction1
512 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
513 | | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
514 | | ... | Create List | ${dut1_sid2}
515 | | ... | ELSE IF | "${n}" == "2"
516 | | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
517 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
518 | | ... | @{sid_list_dir1}
519 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
520 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
521 | | Run Keyword If | "${n}" == "1"
522 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
523 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
524 | | Run Keyword If | "${n}" == "2"
525 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
526 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
527 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
528 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
529 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
530 | | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
531 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
532 | | Set interfaces in path up
533
534 | Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
535 | | [Documentation]
536 | | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
537 | | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
538 | | ... | Get the interface MAC addresses and setup neighbours on all VPP
539 | | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
540 | | ... | routing for IPv6 with defined behaviour function and configure IPv6
541 | | ... | routes on both DUT nodes.
542 | | ...
543 | | ... | *Note:*
544 | | ... | KW uses test variable rxq_count_int set by KW Add worker threads
545 | | ... | and rxqueues to all DUTs
546 | | ...
547 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
548 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
549 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
550 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
551 | | ${sock1}= | Set Variable | memif-DUT1_CNF
552 | | ${sock2}= | Set Variable | memif-DUT2_CNF
553 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
554 | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq_count_int}
555 | | ... | ${rxq_count_int}
556 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1}
557 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2}
558 | | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
559 | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int}
560 | | ... | ${rxq_count_int}
561 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
562 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
563 | | ${duts}= | Get Matches | ${nodes} | DUT*
564 | | :FOR | ${dut} | IN | @{duts}
565 | | | Show Memif | ${nodes['${dut}']}
566 | | VPP Interface Set IP Address
567 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
568 | | VPP Interface Set IP Address
569 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
570 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if1}
571 | | ... | ${dut1-memif-1-if1_ip6} | ${mem_prefix}
572 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2}
573 | | ... | ${dut1-memif-1-if2_ip6} | ${mem_prefix}
574 | | VPP Interface Set IP Address
575 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
576 | | VPP Interface Set IP Address
577 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
578 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
579 | | ... | ${dut2-memif-1-if1_ip6} | ${mem_prefix}
580 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
581 | | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix}
582 | | Suppress ICMPv6 router advertisement message | ${nodes}
583 | | VPP Add IP Neighbor
584 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
585 | | VPP Add IP Neighbor
586 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
587 | | VPP Add IP Neighbor
588 | | ... | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2 | ${tg1_if1_mac}
589 | | VPP Add IP Neighbor
590 | | ... | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2 | ${tg1_if2_mac}
591 | | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
592 | | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
593 | | VPP Add IP Neighbor | ${dut1}
594 | | ... | ${dut1-memif-1-if1} | ${dut1_nh} | ${dut1-memif-1-if2_mac}
595 | | VPP Add IP Neighbor | ${dut2}
596 | | ... | ${dut2-memif-1-if1} | ${dut2_nh} | ${dut2-memif-1-if2_mac}
597 | | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix}
598 | | ... | gateway=${dut2_if1_ip6} | interface=${dut1_if2}
599 | | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
600 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
601 | | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix}
602 | | ... | gateway=${dut1_if2_ip6} | interface=${dut2_if1}
603 | | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
604 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
605 # Configure SRv6 for direction0 on DUT1
606 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
607 | | @{sid_list_dir0}= | Create List | ${dut2_sid1} | ${out_sid1_1}
608 | | ... | ${out_sid1_2}
609 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
610 | | ... | @{sid_list_dir0}
611 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
612 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
613 # Configure SRv6 for direction1 on DUT2
614 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
615 | | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
616 | | ... | ${out_sid2_2}
617 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
618 | | ... | @{sid_list_dir1}
619 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
620 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
621 # Configure SRv6 for direction0 on DUT2
622 | | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
623 | | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
624 | | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
625 | | Run Keyword If | "${behavior}" == "static_proxy"
626 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
627 | | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
628 | | ... | ${dut1_sid1} | @{sid_list_dir0}
629 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
630 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
631 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
632 | | ... | ELSE IF | "${behavior}" == "masquerading"
633 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
634 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
635 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
636 # Configure SRv6 for direction1 on DUT1
637 | | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
638 | | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
639 | | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
640 | | Run Keyword If | "${behavior}" == "static_proxy"
641 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
642 | | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
643 | | ... | ${dut2_sid2} | @{sid_list_dir1}
644 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
645 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
646 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
647 | | ... | ELSE IF | "${behavior}" == "masquerading"
648 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
649 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
650 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
651 | | Set interfaces in path up
652
653 | Initialize L2 patch
654 | | [Documentation]
655 | | ... | Setup L2 patch topology by cross connecting two interfaces on
656 | | ... | each DUT. Interfaces are brought up.
657 | | ...
658 | | Set interfaces in path up
659 | | ${duts}= | Get Matches | ${nodes} | DUT*
660 | | :FOR | ${dut} | IN | @{duts}
661 | | | Configure L2patch | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}
662
663 | Initialize L2 xconnect in 2-node circular topology
664 | | [Documentation]
665 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
666 | | ... | each DUT. Interfaces are brought up.
667 | | ...
668 | | Set interfaces in path up
669 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
670
671 | Initialize L2 xconnect in 3-node circular topology
672 | | [Documentation]
673 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
674 | | ... | each DUT. Interfaces are brought up.
675 | | ... |
676 | | Set interfaces in path up
677 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
678 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
679
680 | Initialize L2 xconnect with VXLANoIPv4 in 3-node circular topology
681 | | [Documentation]
682 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
683 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
684 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
685 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
686 | | ... | interfaces.
687 | | ...
688 | | Set interfaces in path up
689 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
690 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
691 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
692 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
693 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
694 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
695 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
696 | | ... | 172.16.0.1 | 172.16.0.2
697 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
698 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
699 | | ... | 172.16.0.2 | 172.16.0.1
700 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
701
702 | Initialize L2 xconnect with Vhost-User on node
703 | | [Documentation]
704 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
705 | | ... | defined VPP node. Add each Vhost-User interface into L2 cross-connect
706 | | ... | with with physical inteface or Vhost-User interface of another VM.
707 | | ...
708 | | ... | *Arguments:*
709 | | ... | - dut - DUT node. Type: string
710 | | ... | - nf_nodes - VM count. Type: integer
711 | | ...
712 | | ... | *Note:*
713 | | ... | Socket paths for VM are defined in following format:
714 | | ... | - /tmp/sock-\${VM_ID}-1
715 | | ... | - /tmp/sock-\${VM_ID}-2
716 | | ...
717 | | ... | *Example:*
718 | | ...
719 | | ... | \| Initialize L2 xconnect with Vhost-User on node \| DUT1 \| 1 \|
720 | | ...
721 | | [Arguments] | ${dut} | ${nf_nodes}=${1}
722 | | ...
723 | | :FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
724 | | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1
725 | | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2
726 | | | ${prev_index}= | Evaluate | ${number}-1
727 | | | Configure vhost interfaces for L2BD forwarding | ${nodes['${dut}']}
728 | | | ... | ${sock1} | ${sock2} | ${dut}-vhost-${number}-if1
729 | | | ... | ${dut}-vhost-${number}-if2
730 | | | ${dut_xconnect_if1}= | Set Variable If | ${number}==1 | ${${dut}_if1}
731 | | | ... | ${${dut}-vhost-${prev_index}-if2}
732 | | | Configure L2XC | ${nodes['${dut}']} | ${dut_xconnect_if1}
733 | | | ... | ${${dut}-vhost-${number}-if1}
734 | | | Run Keyword If | ${number}==${nf_nodes} | Configure L2XC
735 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${number}-if2} | ${${dut}_if2}
736
737 | Initialize L2 xconnect with Vhost-User
738 | | [Documentation]
739 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
740 | | ... | all VPP nodes. Add each Vhost-User interface into L2 cross-connect
741 | | ... | with with physical inteface or Vhost-User interface of another VM.
742 | | ...
743 | | ... | *Arguments:*
744 | | ... | - nf_nodes - VM count. Type: integer
745 | | ...
746 | | ... | *Example:*
747 | | ...
748 | | ... | \| Initialize L2 xconnect with Vhost-User \| 1 \|
749 | | ...
750 | | [Arguments] | ${nf_nodes}=${1}
751 | | ...
752 | | ${duts}= | Get Matches | ${nodes} | DUT*
753 | | :FOR | ${dut} | IN | @{duts}
754 | | | Initialize L2 xconnect with Vhost-User on node | ${dut}
755 | | | ... | nf_nodes=${nf_nodes}
756
757 | Initialize L2 xconnect with Vhost-User and VLAN in 3-node circular topology
758 | | [Documentation]
759 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
760 | | ... | connect each Vhost interface with one physical interface.
761 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
762 | | ...
763 | | ... | *Arguments:*
764 | | ... | - subid - ID of the sub-interface to be created. Type: string
765 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
766 | | ...
767 | | ... | *Example:*
768 | | ...
769 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
770 | | ... | circular topology \| 10 \| pop-1 \|
771 | | ...
772 | | [Arguments] | ${subid} | ${tag_rewrite}
773 | | ...
774 | | Set interfaces in path up
775 | | Initialize VLAN dot1q sub-interfaces in circular topology
776 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
777 | | Configure L2 tag rewrite method on interfaces
778 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
779 | | ... | ${tag_rewrite}
780 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
781 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
782 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
783 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
784 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
785 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
786 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
787 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
788
789 | Initialize L2 xconnect with Vhost-User and VLAN with VPP link bonding in 3-node circular topology
790 | | [Documentation]
791 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
792 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
793 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
794 | | ... | VLAN on BondEthernet interfaces between DUTs. Cross connect one Vhost
795 | | ... | interface with physical interface towards TG and other Vhost interface
796 | | ... | with VLAN sub-interface. All interfaces are brought up.
797 | | ...
798 | | ... | *Arguments:*
799 | | ... | - subid - ID of the sub-interface to be created. Type: string
800 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
801 | | ... | - bond_mode - Link bonding mode. Type: string
802 | | ... | - lb_mode - Load balance mode. Type: string
803 | | ...
804 | | ... | *Example:*
805 | | ...
806 | | ... | \| Initialize L2 xconnect with Vhost-User and VLAN with VPP link\
807 | | ... | bonding in 3-node circular topology \| 10 \| pop-1 \| xor \| l34 \|
808 | | ...
809 | | [Arguments] | ${subid} | ${tag_rewrite} | ${bond_mode} | ${lb_mode}
810 | | ...
811 | | Set interfaces in path up
812 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
813 | | ... | ${lb_mode}
814 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
815 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
816 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
817 | | ... | Variable Should Exist | ${dut1_if2}
818 | | Run Keyword If | '${if2_status}' == 'PASS'
819 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
820 | | ... | ${dut1_eth_bond_if1}
821 | | ... | ELSE
822 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
823 | | ... | ${dut1_eth_bond_if1}
824 | | Run Keyword Unless | '${if2_status}' == 'PASS'
825 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
826 | | ... | ${dut1_eth_bond_if1}
827 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
828 | | ... | ${lb_mode}
829 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
830 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
831 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
832 | | ... | Variable Should Exist | ${dut2_if1}
833 | | Run Keyword If | '${if1_status}' == 'PASS'
834 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
835 | | ... | ${dut2_eth_bond_if1}
836 | | ... | ELSE
837 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
838 | | ... | ${dut2_eth_bond_if1}
839 | | Run Keyword Unless | '${if2_status}' == 'PASS'
840 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
841 | | ... | ${dut2_eth_bond_if1}
842 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
843 | | Initialize VLAN dot1q sub-interfaces in circular topology
844 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
845 | | ... | ${subid}
846 | | Configure L2 tag rewrite method on interfaces
847 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
848 | | ... | ${tag_rewrite}
849 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
850 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
851 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
852 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
853 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
854 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
855 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
856 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
857
858 | Initialize L2 bridge domain in circular topology
859 | | [Documentation]
860 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
861 | | ... | that is created automatically with index 1. Learning is enabled.
862 | | ... | Interfaces are brought up.
863 | | ...
864 | | ... | *Arguments:*
865 | | ... | - bd_id - Bridge domain ID. Type: integer
866 | | ...
867 | | ... | *Example:*
868 | | ...
869 | | ... | \| Initialize L2 bridge domain in circular topology \| 1 \|
870 | | ...
871 | | [Arguments] | ${bd_id}=${1}
872 | | ...
873 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
874 | | ... | Variable Should Exist | ${dut2}
875 | | ...
876 | | Set interfaces in path up
877 | | ...
878 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
879 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
880 | | Run Keyword If | '${dut2_status}' == 'PASS'
881 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id}
882 | | Run Keyword If | '${dut2_status}' == 'PASS'
883 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id}
884
885 | Configure IPv4 ACLs
886 | | [Documentation]
887 | | ... | Configure ACL with required number of not-hitting permit ACEs plus two
888 | | ... | hitting ACEs for both traffic directions.
889 | | ...
890 | | ... | *Arguments:*
891 | | ... | - dut_node - DUT node. Type: dictionary
892 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
893 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
894 | | ...
895 | | ... | *Example:*
896 | | ...
897 | | ... | \| Configure IPv4 ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
898 | | ... | \| GigabitEthernet0/8/0 \|
899 | | ...
900 | | ... | _NOTE:_ This KW uses following test case variables:
901 | | ... | - src_ip_start - Source IP address start. Type: string
902 | | ... | - dst_ip_start - Destination IP address start. Type: string
903 | | ... | - ip_step - IP address step. Type: string
904 | | ... | - sport_start - Source port number start. Type: string
905 | | ... | - dport_start - Destination port number start. Type: string
906 | | ... | - port_step - Port number step. Type: string
907 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
908 | | ... | Type: integer
909 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
910 | | ... | Type: string
911 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
912 | | ... | Type: string
913 | | ... | - trex_stream1_subnet - IP subnet used by T-Rex in direction 0->1.
914 | | ... | Type: string
915 | | ... | - trex_stream2_subnet - IP subnet used by T-Rex in direction 1->0.
916 | | ... | Type: string
917 | | ...
918 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
919 | | ${src_ip_int} = | Evaluate
920 | | ... | int(ipaddress.ip_address(unicode($src_ip_start))) - $ip_step
921 | | ... | modules=ipaddress
922 | | ${dst_ip_int} = | Evaluate
923 | | ... | int(ipaddress.ip_address(unicode($dst_ip_start))) - $ip_step
924 | | ... | modules=ipaddress
925 | | ${ip_limit} = | Set Variable | 255.255.255.255
926 | | ${ip_limit_int} = | Evaluate
927 | | ... | int(ipaddress.ip_address(unicode($ip_limit))) | modules=ipaddress
928 | | ${sport}= | Evaluate | $sport_start - $port_step
929 | | ${dport}= | Evaluate | $dport_start - $port_step
930 | | ${port_limit}= | Set Variable | ${65535}
931 | | ${acl}= | Set Variable | ipv4 permit
932 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
933 | | | ${src_ip_int} = | Evaluate | $src_ip_int + $ip_step
934 | | | ${dst_ip_int} = | Evaluate | $dst_ip_int + $ip_step
935 | | | ${sport}= | Evaluate | $sport + $port_step
936 | | | ${dport}= | Evaluate | $dport + $port_step
937 | | | ${ipv4_limit_reached}= | Set Variable If
938 | | | ... | $src_ip_int > $ip_limit_int or $src_ip_int > $ip_limit_int
939 | | | ... | ${TRUE}
940 | | | ${udp_limit_reached}= | Set Variable If
941 | | | ... | $sport > $port_limit or $dport > $port_limit | ${TRUE}
942 | | | Run Keyword If | $ipv4_limit_reached is True | Log
943 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
944 | | | ... | WARN
945 | | | Run Keyword If | $udp_limit_reached is True | Log
946 | | | ... | Can't do more iterations - UDP port limit has been reached.
947 | | | ... | WARN
948 | | | ${src_ip} = | Run Keyword If | $ipv4_limit_reached is True
949 | | | ... | Set Variable | ${ip_limit}
950 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($src_ip_int))
951 | | | ... | modules=ipaddress
952 | | | ${dst_ip} = | Run Keyword If | $ipv4_limit_reached is True
953 | | | ... | Set Variable | ${ip_limit}
954 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($dst_ip_int))
955 | | | ... | modules=ipaddress
956 | | | ${sport}= | Set Variable If | ${sport} > $port_limit | $port_limit
957 | | | ... | ${sport}
958 | | | ${dport}= | Set Variable If | ${dport} > $port_limit | $port_limit
959 | | | ... | ${dport}
960 | | | ${acl}= | Catenate | ${acl} | src ${src_ip}/32 dst ${dst_ip}/32
961 | | | ... | sport ${sport} | dport ${dport},
962 | | | Exit For Loop If
963 | | | ... | $ipv4_limit_reached is True or $udp_limit_reached is True
964 | | ${acl}= | Catenate | ${acl}
965 | | ... | ipv4 ${acl_action} src ${trex_stream1_subnet},
966 | | ... | ipv4 ${acl_action} src ${trex_stream2_subnet}
967 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
968 | | @{acl_list}= | Create List | ${0}
969 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if1 is not None
970 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | input | ${acl_list}
971 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if2 is not None
972 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | input | ${acl_list}
973 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if1 is not None
974 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | output
975 | | ... | ${acl_list}
976 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if2 is not None
977 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | output
978 | | ... | ${acl_list}
979
980 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
981 | | [Documentation]
982 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
983 | | ... | domain that is created automatically with index 1. Learning is
984 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
985 | | ... | interfaces.
986 | | ...
987 | | ... | *Arguments:*
988 | | ... | _None_
989 | | ...
990 | | ... | *Example:*
991 | | ...
992 | | ... | \| Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node \
993 | | ... | circular topology \|
994 | | ...
995 | | ... | _NOTE:_ This KW uses following test case variables:
996 | | ... | - dut1 - DUT1 node.
997 | | ... | - dut2 - DUT2 node.
998 | | ... | - dut1_if1 - DUT1 interface towards TG.
999 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1000 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1001 | | ... | - dut2_if2 - DUT2 interface towards TG.
1002 | | ...
1003 | | Set interfaces in path up
1004 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1005 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1006 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1007
1008 | Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in circular topology
1009 | | [Documentation]
1010 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
1011 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
1012 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
1013 | | ... | links. In case of 3-node topology setup IPv4 adresses with /30 prefix
1014 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24
1015 | | ... | and next hop of neighbour DUT interface IPv4 address.
1016 | | ... | Apply required ACL rules to DUT1 interfaces.
1017 | | ...
1018 | | ... | *Arguments:*
1019 | | ... | - ip_nr - Number of IPs to be used. Type: integer or string
1020 | | ...
1021 | | ... | *Example:*
1022 | | ...
1023 | | ... | \| Initialize IPv4 routing for '10' addresses with IPv4 ACLs on DUT1 \
1024 | | ... | in 3-node circular topology \|
1025 | | ...
1026 | | ... | _NOTE:_ This KW uses following test case variables:
1027 | | ... | - tg - TG node.
1028 | | ... | - dut1 - DUT1 node.
1029 | | ... | - dut2 - DUT2 node.
1030 | | ... | - tg_if1 - TG interface 1 towards DUT1.
1031 | | ... | - tg_if2 - TG interface 2 towards DUT2 (3-node topo) or DUT1
1032 | | ... | (2-node topo).
1033 | | ... | - dut1_if1 - DUT1 interface 1 towards TG.
1034 | | ... | - dut1_if2 - DUT1 interface 2 towards DUT2 (3-node topo) or TG
1035 | | ... | (2-node topo).
1036 | | ... | - dut2_if1 - DUT2 interface 1 towards DUT1.
1037 | | ... | - dut2_if2 - DUT2 interface 2 towards TG.
1038 | | ...
1039 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1040 | | ... | Variable Should Exist | ${dut2}
1041 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
1042 | | ... | Set Variable | ${dut2}
1043 | | ... | ELSE | Set Variable | ${dut1}
1044 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1045 | | ... | Set Variable | ${dut2_if2}
1046 | | ... | ELSE | Set Variable | ${dut1_if2}
1047 | | ...
1048 | | Set interfaces in path up
1049 | | ...
1050 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1051 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1052 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
1053 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
1054 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
1055 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
1056 | | ...
1057 | | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
1058 | | | VPP Add IP Neighbor
1059 | | | ... | ${dut1} | ${dut1_if1} | 10.10.10.${number} | ${tg1_if1_mac}
1060 | | | VPP Add IP Neighbor
1061 | | | ... | ${dut} | ${dut_if2} | 20.20.20.${number} | ${tg1_if2_mac}
1062 | | Run Keyword If | '${dut2_status}' == 'PASS'
1063 | | ... | VPP Add IP Neighbor
1064 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
1065 | | Run Keyword If | '${dut2_status}' == 'PASS'
1066 | | ... | VPP Add IP Neighbor
1067 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
1068 | | ...
1069 | | VPP Interface Set IP Address
1070 | | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
1071 | | VPP Interface Set IP Address
1072 | | ... | ${dut} | ${dut_if2} | 20.20.20.1 | 24
1073 | | Run Keyword If | '${dut2_status}' == 'PASS'
1074 | | ... | VPP Interface Set IP Address
1075 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30
1076 | | Run Keyword If | '${dut2_status}' == 'PASS'
1077 | | ... | VPP Interface Set IP Address
1078 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30
1079 | | ...
1080 | | Run Keyword If | '${dut2_status}' == 'PASS'
1081 | | ... | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | gateway=1.1.1.2
1082 | | ... | interface=${dut1_if2}
1083 | | Run Keyword If | '${dut2_status}' == 'PASS'
1084 | | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | gateway=1.1.1.1
1085 | | ... | interface=${dut2_if1}
1086 | | ...
1087 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1088
1089 | Configure MACIP ACLs
1090 | | [Documentation]
1091 | | ... | Configure MACIP ACL with required number of not-hitting permit ACEs
1092 | | ... | plus two hitting ACEs for both traffic directions.
1093 | | ...
1094 | | ... | *Arguments:*
1095 | | ... | - dut_node - DUT node. Type: dictionary
1096 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
1097 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
1098 | | ...
1099 | | ... | *Example:*
1100 | | ...
1101 | | ... | \| Configure MACIP ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
1102 | | ... | \| GigabitEthernet0/8/0 \|
1103 | | ...
1104 | | ... | _NOTE:_ This KW uses following test case variables:
1105 | | ... | - src_ip_start - Source IP address start. Type: string
1106 | | ... | - ip_step - IP address step. Type: string
1107 | | ... | - src_mac_start - Source MAC address start in format with colons.
1108 | | ... | Type: string
1109 | | ... | - src_mac_step - Source MAC address step. Type: string
1110 | | ... | - src_mac_mask - Source MAC address mask. 00:00:00:00:00:00 is a
1111 | | ... | wildcard mask. Type: string
1112 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
1113 | | ... | Type: integer
1114 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
1115 | | ... | Type: string
1116 | | ... | - tg_stream1_subnet - IP subnet used by TG in direction 0->1.
1117 | | ... | Type: string
1118 | | ... | - tg_stream2_subnet - IP subnet used by TG in direction 1->0.
1119 | | ... | Type: string
1120 | | ... | - tg_stream1_mac - Source MAC address of traffic stream 1.
1121 | | ... | Type: string
1122 | | ... | - tg_stream2_mac - Source MAC address of traffic stream 2.
1123 | | ... | Type: string
1124 | | ... | - tg_mac_mask - MAC address mask for traffic streams.
1125 | | ... | 00:00:00:00:00:00 is a wildcard mask. Type: string
1126 | | ...
1127 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
1128 | | ...
1129 | | ${src_ip_int} = | IP To Int | ${src_ip_start}
1130 | | ${src_ip_int} = | Evaluate | ${src_ip_int} - ${ip_step}
1131 | | ...
1132 | | ${ip_limit} = | Set Variable | 255.255.255.255
1133 | | ${ip_limit_int} = | IP To Int | ${ip_limit}
1134 | | ...
1135 | | ${src_mac_int} = | Mac To Int | ${src_mac_start}
1136 | | ${src_mac_int} = | Evaluate | ${src_mac_int} - ${src_mac_step}
1137 | | ...
1138 | | ${mac_limit} = | Set Variable | ff:ff:ff:ff:ff:ff
1139 | | ${mac_limit_int} = | Mac To Int | ${mac_limit}
1140 | | ...
1141 | | ${acl}= | Set Variable | ipv4 permit
1142 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
1143 | | | ${src_ip_int} = | Evaluate | ${src_ip_int} + ${ip_step}
1144 | | | ${src_mac_int} = | Evaluate | ${src_mac_int} + ${src_mac_step}
1145 | | | ${ipv4_limit_reached}= | Set Variable If
1146 | | | ... | ${src_ip_int} > ${ip_limit_int} | ${TRUE}
1147 | | | ${mac_limit_reached}= | Set Variable If
1148 | | | ... | ${src_mac_int} > ${mac_limit_int} | ${TRUE}
1149 | | | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}' | Log
1150 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
1151 | | | ... | WARN
1152 | | | Run Keyword If | '${mac_limit_reached}' == '${TRUE}' | Log
1153 | | | ... | Can't do more iterations - MAC address limit has been reached.
1154 | | | ... | WARN
1155 | | | ${src_ip} = | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}'
1156 | | | ... | Set Variable | ${ip_limit}
1157 | | | ... | ELSE | Int To IP | ${src_ip_int}
1158 | | | ${src_mac}= | Run Keyword If | '${mac_limit_reached}' == '${TRUE}'
1159 | | | ... | Set Variable | ${mac_limit}
1160 | | | ... | ELSE | Int To Mac | ${src_mac_int}
1161 | | | ${acl}= | Catenate | ${acl} | ip ${src_ip}/32
1162 | | | ... | mac ${src_mac} | mask ${src_mac_mask},
1163 | | | Exit For Loop If | '${ipv4_limit_reached}' == '${TRUE}' or '${mac_limit_reached}' == '${TRUE}'
1164 | | ${acl0}= | Catenate | ${acl}
1165 | | ... | ipv4 ${acl_action} ip ${tg_stream1_subnet} mac ${tg_stream1_mac}
1166 | | ... | mask ${tg_mac_mask}
1167 | | ${acl1}= | Catenate | ${acl}
1168 | | ... | ipv4 ${acl_action} ip ${tg_stream2_subnet} mac ${tg_stream2_mac}
1169 | | ... | mask ${tg_mac_mask}
1170 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl0}
1171 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl1}
1172 | | ${acl_idx}= | Set Variable | 0
1173 | | Run Keyword Unless | '${dut_if1}' == '${NONE}'
1174 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if1} | add | ${acl_idx}
1175 | | ${acl_idx}= | Set Variable | 1
1176 | | Run Keyword Unless | '${dut_if2}' == '${NONE}'
1177 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if2} | add | ${acl_idx}
1178
1179 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
1180 | | [Documentation]
1181 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
1182 | | ... | domain that is created automatically with index 1. Learning is
1183 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
1184 | | ... | DUT1 interfaces.
1185 | | ...
1186 | | ... | *Arguments:*
1187 | | ... | _None_
1188 | | ...
1189 | | ... | *Example:*
1190 | | ...
1191 | | ... | \| Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node \
1192 | | ... | circular topology \|
1193 | | ...
1194 | | ... | _NOTE 1:_ This KW uses following test case variables:
1195 | | ... | - tg - TG node.
1196 | | ... | - dut1 - DUT1 node.
1197 | | ... | - dut2 - DUT2 node.
1198 | | ... | - tg_if1 - TG interface towards DUT1.
1199 | | ... | - tg_if2 - TG interface towards DUT2.
1200 | | ... | - dut1_if1 - DUT1 interface towards TG.
1201 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1202 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1203 | | ... | - dut2_if2 - DUT2 interface towards TG.
1204 | | ...
1205 | | Set interfaces in path up
1206 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1207 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1208 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1209
1210 | Initialize L2 bridge domains with Vhost-User on node
1211 | | [Documentation]
1212 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
1213 | | ... | defined VPP node. Add each Vhost-User interface into L2 bridge
1214 | | ... | domains with learning enabled with physical inteface or Vhost-User
1215 | | ... | interface of another VM.
1216 | | ...
1217 | | ... | *Arguments:*
1218 | | ... | - dut - DUT node. Type: string
1219 | | ... | - nf_chain - NF chain. Type: integer
1220 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1221 | | ...
1222 | | ... | *Note:*
1223 | | ... | Socket paths for VM are defined in following format:
1224 | | ... | - /var/run/vpp/sock-\${VM_ID}-1
1225 | | ... | - /var/run/vpp/sock-\${VM_ID}-2
1226 | | ...
1227 | | ... | *Example:*
1228 | | ...
1229 | | ... | \| Initialize L2 bridge domains with Vhost-User on node \| DUT1 \
1230 | | ... | \| 1 \| 1 \|
1231 | | ...
1232 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
1233 | | ...
1234 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
1235 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
1236 | | ${dut_str}= | Convert To Lowercase | ${dut}
1237 | | Add interface to bridge domain
1238 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
1239 | | ... | ${bd_id1}
1240 | | Add interface to bridge domain
1241 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
1242 | | ... | ${bd_id2}
1243 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes} + 1
1244 | | | ${qemu_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
1245 | | | Configure vhost interfaces for L2BD forwarding
1246 | | | ... | ${nodes['${dut}']}
1247 | | | ... | /var/run/vpp/sock-${qemu_id}-1 | /var/run/vpp/sock-${qemu_id}-2
1248 | | | ... | ${dut}-vhost-${qemu_id}-if1 | ${dut}-vhost-${qemu_id}-if2
1249 | | | ${bd_id1}= | Evaluate | ${qemu_id} + (${nf_chain} - 1)
1250 | | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
1251 | | | Add interface to bridge domain
1252 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if1} | ${bd_id1}
1253 | | | Add interface to bridge domain
1254 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if2} | ${bd_id2}
1255
1256 | Initialize L2 bridge domains with Vhost-User
1257 | | [Documentation]
1258 | | ... | Create pairs of Vhost-User interfaces for defined number of VNF nodes
1259 | | ... | on all defined VPP nodes. Add each Vhost-User interface into L2 bridge
1260 | | ... | domains with learning enabled with physical inteface or Vhost-User
1261 | | ... | interface of another VM.
1262 | | ...
1263 | | ... | *Arguments:*
1264 | | ... | - nf_chain - NF chain. Type: integer
1265 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1266 | | ...
1267 | | ... | *Example:*
1268 | | ...
1269 | | ... | \| Initialize L2 bridge domains with Vhost-User \| 1 \| 1 \|
1270 | | ...
1271 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1}
1272 | | ...
1273 | | :FOR | ${dut} | IN | @{duts}
1274 | | | Initialize L2 bridge domains with Vhost-User on node
1275 | | | ... | ${dut} | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
1276
1277 | Initialize L2 bridge domains for multiple chains with Vhost-User
1278 | | [Documentation]
1279 | | ... | Create pairs of Vhost-User interfaces for defined number of NF chains
1280 | | ... | with defined number of VNF nodes on all defined VPP nodes. Add each
1281 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1282 | | ... | with physical inteface or Vhost-User interface of another VM.
1283 | | ... | Put all interfaces in path up.
1284 | | ...
1285 | | ... | *Arguments:*
1286 | | ... | - nf_chains - Number of chains of NFs. Type: integer
1287 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1288 | | ...
1289 | | ... | *Example:*
1290 | | ...
1291 | | ... | \| Initialize L2 bridge domains for multiple chains with Vhost-User \
1292 | | ... | \| 1 \| 1 \|
1293 | | ...
1294 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1}
1295 | | ...
1296 | | Set interfaces in path up
1297 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains} + 1
1298 | | | Initialize L2 bridge domains with Vhost-User
1299 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
1300
1301 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
1302 | | [Documentation]
1303 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
1304 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
1305 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
1306 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
1307 | | ... | interfaces.
1308 | | ...
1309 | | Set interfaces in path up
1310 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
1311 | | ... | 24
1312 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
1313 | | ... | 24
1314 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1315 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1316 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
1317 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
1318 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1319 | | ... | 172.16.0.1 | 172.16.0.2
1320 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1321 | | ... | 172.16.0.2 | 172.16.0.1
1322 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
1323 | | Configure L2BD forwarding | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
1324
1325 | Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node circular topology
1326 | | [Documentation]
1327 | | ... | Setup L2 bridge domain topology with VLAN and VXLANoIPv4 by connecting
1328 | | ... | pairs of VLAN sub-interface and VXLAN interface to separate L2 bridge
1329 | | ... | domain on each DUT. All interfaces are brought up. IPv4 addresses
1330 | | ... | with prefix /32 are configured on interfaces between DUTs. VXLAN
1331 | | ... | sub-interfaces has same IPv4 address as interfaces.
1332 | | ...
1333 | | ... | *Arguments:*
1334 | | ... | - vxlan_count - VXLAN count. Type: integer
1335 | | ...
1336 | | ... | *Example:*
1337 | | ...
1338 | | ... | \| Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node \
1339 | | ... | \| circular topology \| ${1} \|
1340 | | ...
1341 | | [Arguments] | ${vxlan_count}=${1}
1342 | | ...
1343 | | Set interfaces in path up
1344 | | ...
1345 | | ${bd_id_start}= | Set Variable | ${1}
1346 | | ${vni_start} = | Set Variable | ${20}
1347 | | ...
1348 | | ${ip_step} = | Set Variable | ${2}
1349 | | ${dut1_ip_start}= | Set Variable | 172.16.0.1
1350 | | ${dut2_ip_start}= | Set Variable | 172.16.0.2
1351 | | ...
1352 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut1}
1353 | | ... | node_vxlan_if=${dut1_if2} | node_vlan_if=${dut1_if1}
1354 | | ... | op_node=${dut2} | op_node_if=${dut2_if1} | n_tunnels=${vxlan_count}
1355 | | ... | vni_start=${vni_start} | src_ip_start=${dut1_ip_start}
1356 | | ... | dst_ip_start=${dut2_ip_start} | ip_step=${ip_step}
1357 | | ... | bd_id_start=${bd_id_start}
1358 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut2}
1359 | | ... | node_vxlan_if=${dut2_if1} | node_vlan_if=${dut2_if2}
1360 | | ... | op_node=${dut1} | op_node_if=${dut1_if2} | n_tunnels=${vxlan_count}
1361 | | ... | vni_start=${vni_start} | src_ip_start=${dut2_ip_start}
1362 | | ... | dst_ip_start=${dut1_ip_start} | ip_step=${ip_step}
1363 | | ... | bd_id_start=${bd_id_start}
1364
1365 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
1366 | | [Documentation]
1367 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1368 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1369 | | ... | with physical inteface.
1370 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
1371 | | ... | interfaces on each DUT. All interfaces are brought up.
1372 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1373 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
1374 | | ...
1375 | | ... | *Arguments:*
1376 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1377 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1378 | | ...
1379 | | ... | *Example:*
1380 | | ...
1381 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
1382 | | ... | 3-node circular topology \| 1 \| 2 \|
1383 | | ...
1384 | | [Arguments] | ${bd_id1} | ${bd_id2}
1385 | | ...
1386 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
1387 | | ... | 24
1388 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
1389 | | ... | 24
1390 | | Set interfaces in path up
1391 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1392 | | ... | 172.16.0.1 | 172.16.0.2
1393 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1394 | | ... | 172.16.0.2 | 172.16.0.1
1395 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1396 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1397 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1398 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1399 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1400 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
1401 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1402 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1403 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
1404 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1405 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1406 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1407
1408 | Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
1409 | | [Documentation]
1410 | | ... | Create two Vhost-User interfaces on one VPP node. Add each
1411 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1412 | | ... | one connected to physical interface, the other to VXLAN.
1413 | | ... | Setup VXLANoIPv4 between DUTs and TG by connecting physical and vxlan
1414 | | ... | interfaces on the DUT. All interfaces are brought up.
1415 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1416 | | ... | DUT and TG.
1417 | | ...
1418 | | ... | *Arguments:*
1419 | | ... | - dut1_address - Address of physical interface on DUT1. Type: string
1420 | | ... | - dut1_address_subnet - Subnet of the address of physical interface on
1421 | | ... |                         DUT1. Type: string
1422 | | ... | - dut2_address - Address of physical interface on DUT2. Type: string
1423 | | ... | - dut2_address_subnet - Subnet of the address of physical interface on
1424 | | ... |                         DUT2. Type: string
1425 | | ... | - dut1_gw - Address of the _gateway_ to which the traffic will be
1426 | | ... |             forwarded on DUT1. Type: string
1427 | | ... | - dut2_gw - Address of the _gateway_ to which the traffic will be
1428 | | ... |             forwarded on DUT2. Type: string
1429 | | ... | - dut1_vxlans - List of VXLAN params to be configured on DUT1.
1430 | | ... |                 Type: list of dicts, dict params vni, vtep
1431 | | ... | - dut2_vxlans - List of VXLAN params to be configured on DUT2.
1432 | | ... |                 Type: list of dicts, dict params vni, vtep
1433 | | ... | - dut1_route_subnet - Subnet address to forward to  _gateway_ on DUT1.
1434 | | ... |                       Type: string
1435 | | ... | - dut1_route_mask - Subnet address mask to forward to  _gateway_
1436 | | ... |                     on DUT1. Type: string
1437 | | ... | - dut2_route_subnet - Subnet address to forward to  _gateway_ on DUT2.
1438 | | ... |                       Type: string
1439 | | ... | - dut2_route_mask - Subnet address mask to forward to  _gateway_
1440 | | ... |                     on DUT2. Type: string
1441 | | ...
1442 | | ... | *Example:*
1443 | | ...
1444 | | [Arguments] | ${dut1_address} | ${dut1_address_subnet} |
1445 | | ... | ${dut2_address} | ${dut2_address_subnet} | ${dut1_gw} | ${dut2_gw} |
1446 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | ${dut1_route_subnet} |
1447 | | ... | ${dut1_route_mask} | ${dut2_route_subnet} | ${dut2_route_mask}
1448 | | ...
1449 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1450 | | ... | /var/run/vpp/sock-1-${dut1_bd_id1}
1451 | | ... | /var/run/vpp/sock-1-${dut1_bd_id2}
1452 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} |
1453 | | ... | ${dut1_address} | ${dut1_address_subnet}
1454 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2} |
1455 | | ... | ${dut2_address} | ${dut2_address_subnet}
1456 | | ${dut1_bd_id1}= | Set Variable | 1
1457 | | ${dut1_bd_id2}= | Set Variable | 2
1458 | | ${dut2_bd_id1}= | Set Variable | 1
1459 | | :FOR | ${vxlan} | IN | @{dut1_vxlans}
1460 | | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | ${vxlan.vni}
1461 | | | ... | ${dut1_address} | ${vxlan.vtep}
1462 | | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${dut1_bd_id1}
1463 | | :FOR | ${vxlan} | IN | @{dut2_vxlans}
1464 | | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | ${vxlan.vni}
1465 | | | ... | ${dut2_address} | ${vxlan.vtep}
1466 | | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
1467 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1468 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1469 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
1470 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
1471 | | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
1472 | | ... | gateway=${dut1_gw} | interface=${dut1_if1}
1473 | | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
1474 | | ... | gateway=${dut2_gw} | interface=${dut2_if2}
1475 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${dut1_bd_id2}
1476 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${dut2_bd_id1}
1477 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1}
1478 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2}
1479
1480 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology
1481 | | [Documentation]
1482 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN by
1483 | | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node
1484 | | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node
1485 | | ... | topology create VLAN sub-interface on dut1-if2 interface. All
1486 | | ... | interfaces are brought up.
1487 | | ...
1488 | | ... | *Arguments:*
1489 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1490 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1491 | | ... | - subid - ID of the sub-interface to be created. Type: string
1492 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1493 | | ...
1494 | | ... | _NOTE:_ This KW uses following test case variables:
1495 | | ... | - dut1 - DUT1 node.
1496 | | ... | - dut2 - DUT2 node.
1497 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1498 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1499 | | ...
1500 | | ... | *Example:*
1501 | | ...
1502 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
1503 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
1504 | | ...
1505 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1506 | | ...
1507 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1508 | | ... | Variable Should Exist | ${dut2}
1509 | | ...
1510 | | Set interfaces in path up
1511 | | ...
1512 | | Run Keyword If | '${dut2_status}' == 'PASS'
1513 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1514 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1515 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1516 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1517 | | Run Keyword If | '${dut2_status}' == 'PASS'
1518 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1519 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1520 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1521 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1522 | | ...
1523 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1524 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
1525 | | Run Keyword If | '${dut2_status}' == 'PASS'
1526 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1527 | | ... | ${bd_id2}
1528 | | Run Keyword If | '${dut2_status}' == 'PASS'
1529 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2}
1530 | | ... | ${bd_id2}
1531
1532 | Initialize L2 bridge domains with Vhost-User and VLAN in circular topology
1533 | | [Documentation]
1534 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1535 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1536 | | ... | with physical inteface. In case of 3-node topology create VLAN
1537 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
1538 | | ... | sub-interface on dut1-if2 interface. All interfaces are brought up.
1539 | | ...
1540 | | ... | *Arguments:*
1541 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1542 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1543 | | ... | - subid - ID of the sub-interface to be created. Type: string
1544 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1545 | | ...
1546 | | ... | *Example:*
1547 | | ...
1548 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in circular\
1549 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
1550 | | ...
1551 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1552 | | ...
1553 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1554 | | ... | Variable Should Exist | ${dut2}
1555 | | ...
1556 | | Set interfaces in path up
1557 | | ...
1558 | | Run Keyword If | '${dut2_status}' == 'PASS'
1559 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1560 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1561 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1562 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1563 | | Run Keyword If | '${dut2_status}' == 'PASS'
1564 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1565 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1566 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1567 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1568 | | ...
1569 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1570 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1571 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1572 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1573 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1574 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1575 | | Run Keyword If | '${dut2_status}' == 'PASS'
1576 | | ... | Configure vhost interfaces for L2BD forwarding | ${dut2}
1577 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1578 | | Run Keyword If | '${dut2_status}' == 'PASS'
1579 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1580 | | ... | ${bd_id1}
1581 | | Run Keyword If | '${dut2_status}' == 'PASS'
1582 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1583 | | Run Keyword If | '${dut2_status}' == 'PASS'
1584 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1585 | | Run Keyword If | '${dut2_status}' == 'PASS'
1586 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1587
1588 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
1589 | | [Documentation]
1590 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
1591 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
1592 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
1593 | | ... | VLAN on BondEthernet interfaces between DUTs. Add one Vhost-User
1594 | | ... | interface into L2 bridge domains with learning enabled with physical
1595 | | ... | interface towards TG and other Vhost-User interface into L2 bridge
1596 | | ... | domains with learning enabled with VLAN sub-interface. All interfaces
1597 | | ... | are brought up.
1598 | | ...
1599 | | ... | *Arguments:*
1600 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1601 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1602 | | ... | - subid - ID of the sub-interface to be created. Type: string
1603 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1604 | | ... | - bond_mode - Link bonding mode. Type: string
1605 | | ... | - lb_mode - Load balance mode. Type: string
1606 | | ...
1607 | | ... | *Example:*
1608 | | ...
1609 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
1610 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \
1611 | | ... | \| 10 \| pop-1 \| xor \| l34 \|
1612 | | ...
1613 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1614 | | ... | ${bond_mode} | ${lb_mode}
1615 | | ...
1616 | | Set interfaces in path up
1617 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
1618 | | ... | ${lb_mode}
1619 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1620 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
1621 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
1622 | | ... | Variable Should Exist | ${dut1_if2}
1623 | | Run Keyword If | '${if2_status}' == 'PASS'
1624 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
1625 | | ... | ${dut1_eth_bond_if1}
1626 | | ... | ELSE
1627 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
1628 | | ... | ${dut1_eth_bond_if1}
1629 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1630 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
1631 | | ... | ${dut1_eth_bond_if1}
1632 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
1633 | | ... | ${lb_mode}
1634 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1635 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
1636 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
1637 | | ... | Variable Should Exist | ${dut2_if1}
1638 | | Run Keyword If | '${if1_status}' == 'PASS'
1639 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
1640 | | ... | ${dut2_eth_bond_if1}
1641 | | ... | ELSE
1642 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
1643 | | ... | ${dut2_eth_bond_if1}
1644 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1645 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
1646 | | ... | ${dut2_eth_bond_if1}
1647 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
1648 | | Initialize VLAN dot1q sub-interfaces in circular topology
1649 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1650 | | ... | ${subid}
1651 | | Configure L2 tag rewrite method on interfaces
1652 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1653 | | ... | ${tag_rewrite}
1654 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1655 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1656 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1657 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1658 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1659 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1660 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1661 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1662 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1663 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1664 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1665 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1666
1667 | Initialize LISP IPv4 forwarding in 3-node circular topology
1668 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1669 | | ... | Don`t set route.
1670 | | ...
1671 | | ... | *Arguments:*
1672 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
1673 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1674 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
1675 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1676 | | ... | - duts_prefix - ip prefix. Type: int
1677 | | ...
1678 | | ... | *Return:*
1679 | | ... | - No value returned
1680 | | ...
1681 | | ... | *Example:*
1682 | | ... | \| Initialize LISP IPv4 forwarding in 3-node circular topology \
1683 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1684 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1685 | | ...
1686 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1687 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
1688 | | ...
1689 | | Set interfaces in path up
1690 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1691 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1692 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1693 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1694 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1695 | | VPP Add IP Neighbor
1696 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1697 | | VPP Add IP Neighbor
1698 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1699 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1700 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
1701 | | ... | ${dut1_tg_address} | ${duts_prefix}
1702 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
1703 | | ... | ${dut1_dut2_address} | ${duts_prefix}
1704 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
1705 | | ... | ${dut2_dut1_address} | ${duts_prefix}
1706 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
1707 | | ... | ${dut2_tg_address} | ${duts_prefix}
1708
1709 | Initialize LISP GPE IPv4 over IPsec in 3-node circular topology
1710 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
1711 | | ...
1712 | | ... | *Arguments:*
1713 | | ... | - encr_alg - Encryption algorithm. Type: string
1714 | | ... | - auth_alg - Authentication algorithm. Type: string
1715 | | ...
1716 | | ... | *Return:*
1717 | | ... | - No value returned
1718 | | ...
1719 | | ... | *Example:*
1720 | | ... | \| Initialize LISP GPE IPv4 over IPsec in 3-node circular topology\
1721 | | ... | \| ${encr_alg} \| ${auth_alg}
1722 | | ...
1723 | | [Arguments] | ${encr_alg} | ${auth_alg}
1724 | | ...
1725 | | Generate keys for IPSec | ${encr_alg} | ${auth_alg}
1726 | | Initialize LISP IPv4 forwarding in 3-node circular topology
1727 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
1728 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
1729 | | Configure LISP GPE topology in 3-node circular topology
1730 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
1731 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
1732 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
1733 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
1734 | | Configure manual keyed connection for IPSec
1735 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
1736 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
1737 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
1738 | | Configure manual keyed connection for IPSec
1739 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
1740 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
1741 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
1742
1743 | Initialize LISP IPv6 forwarding in 3-node circular topology
1744 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1745 | | ... | Don`t set route.
1746 | | ...
1747 | | ... | *Arguments:*
1748 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
1749 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1750 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
1751 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1752 | | ... | - duts_prefix - ip prefix. Type: int
1753 | | ...
1754 | | ... | *Return:*
1755 | | ... | - No value returned
1756 | | ...
1757 | | ... | *Example:*
1758 | | ... | \| Initialize LISP IPv6 forwarding in 3-node circular topology \
1759 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1760 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1761 | | ...
1762 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1763 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
1764 | | ...
1765 | | Set interfaces in path up
1766 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1767 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1768 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1769 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1770 | | VPP Interface Set IP Address
1771 | | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_address} | ${prefix}
1772 | | VPP Interface Set IP Address
1773 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_address} | ${prefix}
1774 | | VPP Interface Set IP Address
1775 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_address} | ${prefix}
1776 | | VPP Interface Set IP Address
1777 | | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_address} | ${prefix}
1778 | | Suppress ICMPv6 router advertisement message | ${nodes}
1779 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1780 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1781 | | VPP Add IP Neighbor
1782 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1783 | | VPP Add IP Neighbor
1784 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1785
1786 | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
1787 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1788 | | ... | Don`t set route.
1789 | | ...
1790 | | ... | *Arguments:*
1791 | | ... | - dut1_dut2_ip6_address - IPv6 address from DUT1 to DUT2.
1792 | | ... | Type: string
1793 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
1794 | | ... | - dut2_dut1_ip6_address - IPv6 address from DUT2 to DUT1.
1795 | | ... | Type: string
1796 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
1797 | | ... | - prefix4 - IPv4 prefix. Type: int
1798 | | ... | - prefix6 - IPv6 prefix. Type: int
1799 | | ...
1800 | | ... | *Return:*
1801 | | ... | - No value returned
1802 | | ...
1803 | | ... | *Example:*
1804 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
1805 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1806 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1807 | | ... | \| ${prefix4} \| ${prefix6} \|
1808 | | ...
1809 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1810 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1811 | | ... | ${prefix4} | ${prefix6}
1812 | | ...
1813 | | Set interfaces in path up
1814 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1815 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1816 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1817 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1818 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
1819 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
1820 | | VPP Interface Set IP Address
1821 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address} | ${prefix6}
1822 | | VPP Interface Set IP Address
1823 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address} | ${prefix6}
1824 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
1825 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
1826 | | Suppress ICMPv6 router advertisement message | ${nodes}
1827 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1828 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1829 | | VPP Add IP Neighbor
1830 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address} | ${dut2_if1_mac}
1831 | | VPP Add IP Neighbor
1832 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address} | ${dut1_if2_mac}
1833
1834 | Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
1835 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1836 | | ... | Don`t set route.
1837 | | ...
1838 | | ... | *Arguments:*
1839 | | ... | - dut1_dut2_ip4_address - IPv4 address from DUT1 to DUT2.
1840 | | ... | Type: string
1841 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
1842 | | ... | - dut2_dut1_ip4_address - IPv4 address from DUT2 to DUT1.
1843 | | ... | Type: string
1844 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
1845 | | ... | - prefix4 - IPv4 prefix. Type: int
1846 | | ... | - prefix6 - IPv6 prefix. Type: int
1847 | | ...
1848 | | ... | *Return:*
1849 | | ... | - No value returned
1850 | | ...
1851 | | ... | *Example:*
1852 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
1853 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1854 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1855 | | ... | \| ${prefix6} \| ${prefix4} \|
1856 | | ...
1857 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1858 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1859 | | ... | ${prefix6} | ${prefix4}
1860 | | ...
1861 | | Set interfaces in path up
1862 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1863 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1864 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1865 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1866 | | VPP Interface Set IP Address
1867 | | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address} | ${prefix6}
1868 | | VPP Interface Set IP Address
1869 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
1870 | | VPP Interface Set IP Address
1871 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
1872 | | VPP Interface Set IP Address
1873 | | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address} | ${prefix6}
1874 | | Suppress ICMPv6 router advertisement message | ${nodes}
1875 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1876 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1877 | | VPP Add IP Neighbor
1878 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
1879 | | VPP Add IP Neighbor
1880 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
1881
1882 | Initialize NAT44 in circular topology
1883 | | [Documentation] | Initialization of 2-node / 3-node topology with NAT44
1884 | | ... | between DUTs:
1885 | | ... | - set interfaces up
1886 | | ... | - set IP addresses
1887 | | ... | - set ARP
1888 | | ... | - create routes
1889 | | ... | - set NAT44 - only on DUT1
1890 | | ...
1891 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1892 | | ... | Variable Should Exist | ${dut2}
1893 | | ...
1894 | | Set interfaces in path up
1895 | | ...
1896 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
1897 | | Run Keyword If | '${dut2_status}' == 'PASS'
1898 | | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
1899 | | ... | 11.0.0.1 | 20
1900 | | Run Keyword If | '${dut2_status}' == 'PASS'
1901 | | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
1902 | | ... | 11.0.0.2 | 20
1903 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
1904 | | ... | Set Variable | ${dut2}
1905 | | ... | ELSE | Set Variable | ${dut1}
1906 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1907 | | ... | Set Variable | ${dut2_if2}
1908 | | ... | ELSE | Set Variable | ${dut1_if2}
1909 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 12.0.0.1 | 20
1910 | | ...
1911 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1912 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1913 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
1914 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
1915 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
1916 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
1917 | | ...
1918 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
1919 | | Run Keyword If | '${dut2_status}' == 'PASS'
1920 | | ... | VPP Add IP Neighbor
1921 | | ... | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
1922 | | Run Keyword If | '${dut2_status}' == 'PASS'
1923 | | ... | VPP Add IP Neighbor
1924 | | ... | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
1925 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
1926 | | ...
1927 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | gateway=10.0.0.2
1928 | | ... | interface=${dut1_if1}
1929 | | Run Keyword If | '${dut2_status}' == 'PASS'
1930 | | ... | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | gateway=11.0.0.2
1931 | | ... | interface=${dut1_if2}
1932 | | Run Keyword If | '${dut2_status}' == 'PASS'
1933 | | ... | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | gateway=12.0.0.2
1934 | | ... | interface=${dut2_if2}
1935 | | Run Keyword If | '${dut2_status}' == 'PASS'
1936 | | ... | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | gateway=11.0.0.1
1937 | | ... | interface=${dut2_if1}
1938 | | ...
1939 | | Configure inside and outside interfaces
1940 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
1941 | | Configure deterministic mode for NAT44
1942 | | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
1943
1944 | Initialize L2 xconnect with memif pairs on DUT node
1945 | | [Documentation]
1946 | | ... | Create pairs of Memif interfaces on DUT node. Cross connect each Memif
1947 | | ... | interface with one physical interface or virtual interface to create
1948 | | ... | a chain accross DUT node.
1949 | | ...
1950 | | ... | *Arguments:*
1951 | | ... | - dut - DUT node. Type: dictionary
1952 | | ... | - count - Number of memif pairs (containers). Type: integer
1953 | | ...
1954 | | ... | *Note:*
1955 | | ... | Socket paths for Memif are defined in following format:
1956 | | ... | - /tmp/memif-\${dut}_CNF\${number}-\${sid}
1957 | | ...
1958 | | ... | KW uses test variable \${rxq_count_int} set by KW Add worker threads
1959 | | ... | and rxqueues to all DUTs
1960 | | ...
1961 | | ... | *Example:*
1962 | | ...
1963 | | ... | \| Initialize L2 xconnect with memif pairs on DUT node \| ${dut} \
1964 | | ... | \| ${1} \|
1965 | | ...
1966 | | [Arguments] | ${dut} | ${count}
1967 | | ...
1968 | | :FOR | ${number} | IN RANGE | 1 | ${count}+1
1969 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
1970 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
1971 | | | ${prev_index}= | Evaluate | ${number}-1
1972 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
1973 | | | ... | ${sock1} | ${sock2} | ${number} | ${dut}-memif-${number}-if1
1974 | | | ... | ${dut}-memif-${number}-if2 | ${rxq_count_int} | ${rxq_count_int}
1975 | | | ${xconnect_if1}= | Set Variable If | ${number}==1 | ${${dut}_if1}
1976 | | | ... | ${${dut}-memif-${prev_index}-if2}
1977 | | | Configure L2XC | ${nodes['${dut}']} | ${xconnect_if1}
1978 | | | ... | ${${dut}-memif-${number}-if1}
1979 | | | Run Keyword If | ${number}==${count} | Configure L2XC
1980 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${number}-if2} | ${${dut}_if2}
1981
1982 | Initialize L2 xconnect with memif pairs
1983 | | [Documentation]
1984 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Cross
1985 | | ... | connect each Memif interface with one physical interface or virtual
1986 | | ... | interface to create a chain accross DUT node.
1987 | | ...
1988 | | ... | *Arguments:*
1989 | | ... | - count - Number of memif pairs (containers). Type: integer
1990 | | ...
1991 | | ... | *Example:*
1992 | | ...
1993 | | ... | \| Initialize L2 xconnect with memif pairs \| ${1} \|
1994 | | ...
1995 | | [Arguments] | ${count}=${1}
1996 | | ...
1997 | | ${duts}= | Get Matches | ${nodes} | DUT*
1998 | | :FOR | ${dut} | IN | @{duts}
1999 | | | Initialize L2 xconnect with memif pairs on DUT node | ${dut} | ${count}
2000 | | Set interfaces in path up
2001 | | Show Memif on all DUTs | ${nodes}
2002 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
2003
2004 | Initialize L2 Bridge Domain with memif pairs on DUT node
2005 | | [Documentation]
2006 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
2007 | | ... | to separate L2 bridge domain with one physical or memif interface
2008 | | ... | to create a chain accross DUT node.
2009 | | ...
2010 | | ... | *Arguments:*
2011 | | ... | - dut - DUT node. Type: dictionary
2012 | | ... | - nf_chain - NF chain. Type: integer
2013 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
2014 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
2015 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
2016 | | ...
2017 | | ... | *Note:*
2018 | | ... | Socket paths for Memif are defined in following format:
2019 | | ... | - /tmp/memif-\${dut}_CNF\${nf_id}-\${sid}
2020 | | ...
2021 | | ... | *Example:*
2022 | | ...
2023 | | ... | \| Initialize L2 Bridge Domain with memif pairs on DUT node \
2024 | | ... | \| ${dut} \| 1 \| 1 \|
2025 | | ...
2026 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
2027 | | ... | ${auto_scale}=${True}
2028 | | ...
2029 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
2030 | | ... | Set Variable | ${rxq_count_int}
2031 | | ... | ELSE | Set Variable | ${1}
2032 | | ${bd_id2}= | Evaluate | ${nf_nodes}+1
2033 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
2034 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2}
2035 | | ... | ${bd_id2}
2036 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
2037 | | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
2038 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
2039 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
2040 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
2041 | | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1
2042 | | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq}
2043 | | | ${bd_id2}= | Evaluate | ${nf_node}+1
2044 | | | Add interface to bridge domain | ${nodes['${dut}']}
2045 | | | ... | ${${dut}-memif-${nf_id}-if1} | ${nf_node}
2046 | | | Add interface to bridge domain | ${nodes['${dut}']}
2047 | | | ... | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
2048
2049 | Initialize L2 Bridge Domain with memif pairs
2050 | | [Documentation]
2051 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
2052 | | ... | Memif interface to separate L2 bridge domain with one physical or
2053 | | ... | virtual interface to create a chain accross DUT node.
2054 | | ...
2055 | | ... | *Arguments:*
2056 | | ... | - nf_chain - NF chain. Type: integer
2057 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
2058 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
2059 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
2060 | | ...
2061 | | ... | *Example:*
2062 | | ...
2063 | | ... | \| Initialize L2 Bridge Domain with memif pairs \| 1 \| 1 \|
2064 | | ...
2065 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
2066 | | ...
2067 | | ${duts}= | Get Matches | ${nodes} | DUT*
2068 | | :FOR | ${dut} | IN | @{duts}
2069 | | | Initialize L2 Bridge Domain with memif pairs on DUT node | ${dut}
2070 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
2071 | | | ... | auto_scale=${auto_scale}
2072
2073 | Initialize L2 Bridge Domain for multiple chains with memif pairs
2074 | | [Documentation]
2075 | | ... | Create pairs of Memif interfaces for defined number of NF chains
2076 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
2077 | | ... | Memif interface into L2 bridge domains with learning enabled
2078 | | ... | with physical inteface or Memif interface of another NF.
2079 | | ...
2080 | | ... | *Arguments:*
2081 | | ... | - nf_chains - Number of chains of NFs. Type: integer
2082 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
2083 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
2084 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
2085 | | ...
2086 | | ... | *Example:*
2087 | | ...
2088 | | ... | \| Initialize L2 Bridge Domain for multiple chains with memif pairs \
2089 | | ... | \| 1 \| 1 \|
2090 | | ...
2091 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
2092 | | ...
2093 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
2094 | | | Initialize L2 Bridge Domain with memif pairs | nf_chain=${nf_chain}
2095 | | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
2096 | | Set interfaces in path up
2097 | | Show Memif on all DUTs | ${nodes}
2098 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
2099
2100 | Initialize L2 Bridge Domain for pipeline with memif pairs
2101 | | [Documentation]
2102 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
2103 | | ... | Memif interface to separate L2 bridge domain with one physical or
2104 | | ... | virtual interface to create a service pipeline on DUT node.
2105 | | ...
2106 | | ... | *Arguments:*
2107 | | ... | - nf_chain - NF pipe. Type: integer
2108 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
2109 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
2110 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
2111 | | ...
2112 | | ... | *Example:*
2113 | | ...
2114 | | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \
2115 | | ... | \| 1 \| 1 \|
2116 | | ...
2117 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
2118 | | ...
2119 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
2120 | | ... | Set Variable | ${rxq_count_int}
2121 | | ... | ELSE | Set Variable | ${1}
2122 | | ${duts}= | Get Matches | ${nodes} | DUT*
2123 | | :FOR | ${dut} | IN | @{duts}
2124 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
2125 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2}
2126 | | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1}
2127 | | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes}
2128 | | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1}
2129 | | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2}
2130 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
2131 | | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst}
2132 | | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1
2133 | | | ... | rxq=${rxq} | txq=${rxq}
2134 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
2135 | | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last}
2136 | | | ... | memif_if=${dut}-memif-${nf_id_last}-if2
2137 | | | ... | rxq=${rxq} | txq=${rxq}
2138 | | | Add interface to bridge domain | ${nodes['${dut}']}
2139 | | | ... | ${${dut}-memif-${nf_id_frst}-if1} | ${1}
2140 | | | Add interface to bridge domain | ${nodes['${dut}']}
2141 | | | ... | ${${dut}-memif-${nf_id_last}-if2} | ${2}
2142
2143 | Initialize L2 Bridge Domain for multiple pipelines with memif pairs
2144 | | [Documentation]
2145 | | ... | Create pairs of Memif interfaces for defined number of NF pipelines
2146 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
2147 | | ... | Memif interface into L2 bridge domains with learning enabled
2148 | | ... | with physical inteface or Memif interface of another NF.
2149 | | ...
2150 | | ... | *Arguments:*
2151 | | ... | - nf_chains - Number of pipelines of NFs. Type: integer
2152 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
2153 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
2154 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
2155 | | ...
2156 | | ... | *Example:*
2157 | | ...
2158 | | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \
2159 | | ... | pairs \| 1 \| 1 \|
2160 | | ...
2161 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
2162 | | ...
2163 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
2164 | | | Initialize L2 Bridge Domain for pipeline with memif pairs
2165 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
2166 | | | ... | auto_scale=${auto_scale}
2167 | | Set interfaces in path up
2168 | | Show Memif on all DUTs | ${nodes}
2169 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
2170
2171 | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
2172 | | [Documentation]
2173 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
2174 | | ... | Memif interface to separate L2 bridge domain with one physical or
2175 | | ... | virtual interface to create a chain accross DUT node. In case of
2176 | | ... | 3-node topology create VLAN sub-interfaces between DUTs. In case of
2177 | | ... | 2-node topology create VLAN sub-interface on dut1-if2 interface. All
2178 | | ... | interfaces are brought up.
2179 | | ...
2180 | | ... | *Arguments:*
2181 | | ... | - bd_id1 - Bridge domain ID. Type: integer
2182 | | ... | - bd_id2 - Bridge domain ID. Type: integer
2183 | | ... | - subid - ID of the sub-interface to be created. Type: string
2184 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
2185 | | ...
2186 | | ... | *Example:*
2187 | | ...
2188 | | ... | \| Initialize L2 Bridge Domain with memif pairs and VLAN in circular\
2189 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
2190 | | ...
2191 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
2192 | | ...
2193 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
2194 | | ... | Variable Should Exist | ${dut2}
2195 | | ...
2196 | | Set interfaces in path up
2197 | | ...
2198 | | Run Keyword If | '${dut2_status}' == 'PASS'
2199 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
2200 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
2201 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
2202 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
2203 | | Run Keyword If | '${dut2_status}' == 'PASS'
2204 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
2205 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
2206 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
2207 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
2208 | | ...
2209 | | ${number}= | Set Variable | ${1}
2210 | | ${sock1}= | Set Variable | memif-DUT1_CNF
2211 | | ${sock2}= | Set Variable | memif-DUT1_CNF
2212 | | ${memif_if1_name}= | Set Variable | DUT1-memif-${number}-if1
2213 | | ${memif_if2_name}= | Set Variable | DUT1-memif-${number}-if2
2214 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock2}
2215 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
2216 | | ... | ${rxq_count_int}
2217 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
2218 | | Add interface to bridge domain | ${dut1} | ${${memif_if1_name}} | ${bd_id1}
2219 | | Add interface to bridge domain | ${dut1} | ${${memif_if2_name}} | ${bd_id2}
2220 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
2221 | | ${sock1}= | Run Keyword If | '${dut2_status}' == 'PASS'
2222 | | ... | Set Variable | memif-DUT2_CNF
2223 | | ${sock2}= | Run Keyword If | '${dut2_status}' == 'PASS'
2224 | | ... | Set Variable | memif-DUT2_CNF
2225 | | ${memif_if1_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
2226 | | ... | Set Variable | DUT2-memif-${number}-if1
2227 | | ${memif_if2_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
2228 | | ... | Set Variable | DUT2-memif-${number}-if2
2229 | | Run Keyword If | '${dut2_status}' == 'PASS'
2230 | | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock1} | ${sock2}
2231 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
2232 | | ... | ${rxq_count_int}
2233 | | Run Keyword If | '${dut2_status}' == 'PASS'
2234 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
2235 | | ... | ${bd_id1}
2236 | | Run Keyword If | '${dut2_status}' == 'PASS'
2237 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if1_name}}
2238 | | ... | ${bd_id1}
2239 | | Run Keyword If | '${dut2_status}' == 'PASS'
2240 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if2_name}}
2241 | | ... | ${bd_id2}
2242 | | Run Keyword If | '${dut2_status}' == 'PASS'
2243 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
2244 | | ...
2245 | | Show Memif on all DUTs | ${nodes}
2246 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
2247
2248 | Initialize L2 xconnect for single memif
2249 | | [Documentation]
2250 | | ... | Create single Memif interface on all defined VPP nodes. Cross
2251 | | ... | connect Memif interface with one physical interface.
2252 | | ...
2253 | | ... | *Arguments:*
2254 | | ... | - number - Memif ID. Type: integer
2255 | | ...
2256 | | ... | *Note:*
2257 | | ... | Socket paths for Memif are defined in following format:
2258 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
2259 | | ...
2260 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
2261 | | ... | and rxqueues to all DUTs
2262 | | ...
2263 | | ... | *Example:*
2264 | | ...
2265 | | ... | \| Initialize L2 xconnect for single memif \| 1 \|
2266 | | ...
2267 | | [Arguments] | ${number}=${1}
2268 | | ...
2269 | | ${duts}= | Get Matches | ${nodes} | DUT*
2270 | | :FOR | ${dut} | IN | @{duts}
2271 | | | ${sock}= | Set Variable | memif-${dut}_CNF
2272 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
2273 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
2274 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
2275 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
2276 | | | Configure L2XC | ${nodes['${dut}']} | ${${dut}_if1}
2277 | | | ... | ${${dut}-memif-${number}-if1}
2278 | | Set single interfaces in path up
2279 | | Show Memif on all DUTs | ${nodes}
2280 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
2281
2282 | Initialize L2 Bridge Domain for single memif
2283 | | [Documentation]
2284 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
2285 | | ... | interface to separate L2 bridge domain with one physical interface.
2286 | | ...
2287 | | ... | *Arguments:*
2288 | | ... | - number - Memif ID. Type: integer
2289 | | ...
2290 | | ... | *Note:*
2291 | | ... | Socket paths for Memif are defined in following format:
2292 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
2293 | | ...
2294 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
2295 | | ... | and rxqueues to all DUTs
2296 | | ...
2297 | | ... | *Example:*
2298 | | ...
2299 | | ... | \| Initialize L2 Bridge Domain for single memif \| 1 \|
2300 | | ...
2301 | | [Arguments] | ${number}=${1}
2302 | | ...
2303 | | ${duts}= | Get Matches | ${nodes} | DUT*
2304 | | :FOR | ${dut} | IN | @{duts}
2305 | | | ${sock}= | Set Variable | memif-${dut}_CNF
2306 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
2307 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
2308 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
2309 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
2310 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1}
2311 | | | ... | ${number}
2312 | | | Add interface to bridge domain | ${nodes['${dut}']}
2313 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
2314 | | Set single interfaces in path up
2315 | | Show Memif on all DUTs | ${nodes}
2316
2317 | Configure ACLs on a single interface
2318 | | [Documentation]
2319 | | ... | Configure ACL
2320 | | ...
2321 | | ... | *Arguments:*
2322 | | ... | - dut - DUT node. Type: string
2323 | | ... | - dut_if - DUT node interface name. Type: string
2324 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
2325 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
2326 | | ... | - subnets - Subnets to apply the specific ACL. Type: list
2327 | | ...
2328 | | ... | *Example:*
2329 | | ...
2330 | | ... | \| Configure ACLs on a single interface \| ${nodes['DUT1']}
2331 | | ... | \| ... \| GigabitEthernet0/7/0 \| input \| permit | 0.0.0.0/0
2332 | | ...
2333 | | [Arguments] | ${dut} | ${dut_if} | ${acl_apply_type} | ${acl_action}
2334 | | ... | @{subnets}
2335 | | Set Test variable | ${acl} | ${EMPTY}
2336 | | :FOR | ${subnet} | IN | @{subnets}
2337 | | | ${acl} = | Run Keyword If | '${acl}' == '${EMPTY}'
2338 | | | ... | Set Variable | ipv4 ${acl_action} src ${subnet}
2339 | | | ... | ELSE
2340 | | | ... | Catenate | SEPARATOR=", " | ${acl}
2341 | | | ... | ipv4 ${acl_action} src ${subnet}
2342 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
2343 | | @{acl_list} = | Create List | ${0}
2344 | | Set Acl List For Interface | ${dut} | ${dut_if} | ${acl_apply_type}
2345 | | ... | ${acl_list}