CSIT-1468: InterfaceUtil migration from VAT to PAPI
[csit.git] / resources / libraries / robot / ip / ip4.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 | resources.libraries.python.InterfaceUtil
16 | Library | resources.libraries.python.IPv4Util.IPv4Util
17 | Library | resources.libraries.python.IPv4Setup.IPv4Setup
18 | Library | resources.libraries.python.NodePath
19 | Library | resources.libraries.python.Routing
20 | Library | resources.libraries.python.TrafficScriptExecutor
21 | Resource | resources/libraries/robot/shared/counters.robot
22 | Resource | resources/libraries/robot/shared/default.robot
23 | Resource | resources/libraries/robot/shared/testing_path.robot
24 | Variables | resources/libraries/python/IPv4NodeAddress.py | ${nodes}
25 | ...
26 | Documentation | IPv4 keywords
27
28 *** Keywords ***
29 | Show IP FIB On All DUTs
30 | | [Documentation] | Show IP FIB on all DUTs.
31 | | ...
32 | | ${duts}= | Get Matches | ${nodes} | DUT*
33 | | :FOR | ${dut} | IN | @{duts}
34 | | | VPP Show IP Table | ${nodes['${dut}']}
35
36 | Configure IPv4 addresses on all DUTs
37 | | [Documentation] | Setup IPv4 address on all DUTs in topology
38 | | [Arguments] | ${nodes} | ${nodes_addr}
39 | | ${interfaces}= | VPP nodes set ipv4 addresses | ${nodes} | ${nodes_addr}
40 | | :FOR | ${interface} | IN | @{interfaces}
41 | | | Set Interface State | @{interface} | up | if_type=name
42
43 | Get interface Ipv4 addresses
44 | | [Documentation] | Get IPv4 address for the given interface of the node.
45 | | ...
46 | | ... | *Arguments:*
47 | | ... | - node - DUT node data. Type: dictionary
48 | | ... | - interface - Name of the interface on the VPP node. Type: string
49 | | ...
50 | | [Arguments] | ${node} | ${interface}
51 | | ...
52 | | [Return] | ${ip_data}
53 | | ...
54 | | ${ip_data}= | VPP get interface ip addresses
55 | | ... | ${node} | ${interface} | ipv4
56
57 | Configure routes for IPv4 test
58 | | [Documentation] | Setup routing on all VPP nodes required for IPv4 tests
59 | | [Arguments] | ${nodes} | ${nodes_addr}
60 | | Append Nodes | ${nodes['DUT1']} | ${nodes['DUT2']}
61 | | Compute Path
62 | | ${tg}= | Set Variable | ${nodes['TG']}
63 | | ${dut1_if} | ${dut1}= | First Interface
64 | | ${dut2_if} | ${dut2}= | Last Interface
65 | | ${dut1_if_addr}= | Get IPv4 address of node "${dut1}" interface "${dut1_if}" from "${nodes_addr}"
66 | | ${dut2_if_addr}= | Get IPv4 address of node "${dut2}" interface "${dut2_if}" from "${nodes_addr}"
67 | | @{tg_dut1_links}= | Get active links connecting "${tg}" and "${dut1}"
68 | | @{tg_dut2_links}= | Get active links connecting "${tg}" and "${dut2}"
69 | | :FOR | ${link} | IN | @{tg_dut1_links}
70 | | | ${net}= | Get Link Address | ${link} | ${nodes_addr}
71 | | | ${prefix}= | Get Link Prefix | ${link} | ${nodes_addr}
72 | | | Vpp Route Add | ${dut2} | ${net} | ${prefix}
73 | | | ... | gateway=${dut1_if_addr} | interface=${dut2_if}
74 | | :FOR | ${link} | IN | @{tg_dut2_links}
75 | | | ${net}= | Get Link Address | ${link} | ${nodes_addr}
76 | | | ${prefix}= | Get Link Prefix | ${link} | ${nodes_addr}
77 | | | Vpp Route Add | ${dut1} | ${net} | ${prefix}
78 | | | ... | gateway=${dut2_if_addr} | interface=${dut1_if}
79
80 | Configure DUT nodes for IPv4 testing
81 | | Configure IPv4 addresses on all DUTs | ${nodes} | ${nodes_ipv4_addr}
82 | | Setup ARP on all DUTs | ${nodes} | ${nodes_ipv4_addr}
83 | | Configure routes for IPv4 test | ${nodes} | ${nodes_ipv4_addr}
84 | | All Vpp Interfaces Ready Wait | ${nodes}
85
86 | Route traffic from interface '${from_port}' on node '${from_node}' to interface '${to_port}' on node '${to_node}' '${hops}' hops away using IPv4
87 | | ${src_ip}= | Get IPv4 address of node "${from_node}" interface "${from_port}" from "${nodes_ipv4_addr}"
88 | | ${dst_ip}= | Get IPv4 address of node "${to_node}" interface "${to_port}" from "${nodes_ipv4_addr}"
89 | | ${src_mac}= | Get interface mac | ${from_node} | ${from_port}
90 | | ${dst_mac}= | Get interface mac | ${to_node} | ${to_port}
91 | | ${is_dst_tg}= | Is TG node | ${to_node}
92 | | ${adj_node} | ${adj_int}= | Get adjacent node and interface | ${nodes}
93 | | ... | ${from_node} | ${from_port}
94 | | ${from_port_name}= | Get interface name | ${from_node} | ${from_port}
95 | | ${to_port_name}= | Get interface name | ${to_node} | ${to_port}
96 | | ${adj_int_mac}= | Get interface MAC | ${adj_node} | ${adj_int}
97 | | ${args}= | Traffic Script Gen Arg | ${to_port_name} | ${from_port_name}
98 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
99 | | ${args}= | Catenate | ${args} | --hops ${hops}
100 | | ... | --first_hop_mac ${adj_int_mac} | --is_dst_tg ${is_dst_tg}
101 | | Run Traffic Script On Node | ipv4_ping_ttl_check.py | ${from_node} | ${args}
102
103 | Execute IPv4 ICMP echo sweep
104 | | [Documentation] | Type of the src_node must be TG and dst_node must be DUT
105 | | [Arguments] | ${src_node} | ${dst_node} | ${start_size} | ${end_size}
106 | | ... | ${step}
107 | | Append Nodes | ${src_node} | ${dst_node}
108 | | Compute Path
109 | | ${src_port} | ${src_node}= | First Interface
110 | | ${dst_port} | ${dst_node}= | Last Interface
111 | | ${src_ip}= | Get IPv4 address of node "${src_node}" interface "${src_port}" from "${nodes_ipv4_addr}"
112 | | ${dst_ip}= | Get IPv4 address of node "${dst_node}" interface "${dst_port}" from "${nodes_ipv4_addr}"
113 | | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
114 | | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
115 | | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
116 | | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
117 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
118 | | ${args}= | Catenate | ${args} | --start_size ${start_size}
119 | | ... | --end_size ${end_size} | --step ${step}
120 | | Run Traffic Script On Node | ipv4_sweep_ping.py | ${src_node} | ${args}
121 | | ... | timeout=${180}
122
123 | Send ARP request and verify response
124 | | [Arguments] | ${tg_node} | ${vpp_node}
125 | | ${link_name}= | Get first active connecting link between node "${tg_node}" and "${vpp_node}"
126 | | ${src_if}= | Get interface by link name | ${tg_node} | ${link_name}
127 | | ${dst_if}= | Get interface by link name | ${vpp_node} | ${link_name}
128 | | ${src_ip}= | Get IPv4 address of node "${tg_node}" interface "${src_if}" from "${nodes_ipv4_addr}"
129 | | ${dst_ip}= | Get IPv4 address of node "${vpp_node}" interface "${dst_if}" from "${nodes_ipv4_addr}"
130 | | ${src_mac}= | Get node link mac | ${tg_node} | ${link_name}
131 | | ${dst_mac}= | Get node link mac | ${vpp_node} | ${link_name}
132 | | ${src_if_name}= | Get interface name | ${tg_node} | ${src_if}
133 | | ${args}= | Traffic Script Gen Arg | ${src_if_name} | ${src_if_name}
134 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
135 | | Run Traffic Script On Node | arp_request.py | ${tg_node} | ${args}
136
137 | Configure IP addresses on interfaces
138 | | [Documentation] | Iterates through @{args} list and Set Interface Address
139 | | ... | for every (${dut_node}, ${interface}, ${address},
140 | | ... | ${prefix}) tuple.
141 | | ...
142 | | ... | *Arguments:*
143 | | ... | - dut_node - Node where IP address should be set to.
144 | | ... | Type: dictionary
145 | | ... | - interface - Interface name. Type: string
146 | | ... | - address - IP address. Type: string
147 | | ... | - prefix - Prefix length. Type: integer
148 | | ...
149 | | ... | *Example:*
150 | | ...
151 | | ... | \| Configure IP addresses on interfaces \
152 | | ... | \| ${dut1_node} \| ${dut1_to_dut2} \| 192.168.1.1 \| 24 \|
153 | | ... | \| ... \| ${dut1_node} \| ${dut1_to_tg} \| 192.168.2.1 \| 24 \|
154 | | ...
155 | | [Arguments] | @{args}
156 | | :FOR | ${dut_node} | ${interface} | ${address} | ${prefix} | IN | @{args}
157 | | | Set Interface Address | ${dut_node} | ${interface} | ${address}
158 | | | ... | ${prefix}
159
160 | Send ICMP echo request and verify answer
161 | | [Documentation] | Run traffic script that waits for ICMP reply and ignores
162 | | ... | all other packets.
163 | | ...
164 | | ... | *Arguments:*
165 | | ... | - tg_node - TG node where run traffic script. Type: dictionary
166 | | ... | - tg_interface - TG interface where send ICMP echo request.
167 | | ... | Type: string
168 | | ... | - dst_mac - Destination MAC address. Type: string
169 | | ... | - src_mac - Source MAC address. Type: string
170 | | ... | - dst_ip - Destination IP address. Type: string
171 | | ... | - src_ip - Source IP address. Type: string
172 | | ... | - timeout - Wait timeout in seconds (Default: 10). Type: integer
173 | | ...
174 | | ... | *Example:*
175 | | ...
176 | | ... | \| Send ICMP echo request and verify answer \
177 | | ... | \| ${nodes['TG']} \| eth2 \
178 | | ... | \| 08:00:27:46:2b:4c \| 08:00:27:66:b8:57 \
179 | | ... | \| 192.168.23.10 \| 192.168.23.1 \| 10 \|
180 | | ...
181 | | [Arguments] | ${tg_node} | ${tg_interface}
182 | | ... | ${dst_mac} | ${src_mac} | ${dst_ip} | ${src_ip} | ${timeout}=${10}
183 | | ...
184 | | ${tg_interface_name}= | Get interface name | ${tg_node} | ${tg_interface}
185 | | ${args}= | Catenate | --rx_if ${tg_interface_name}
186 | | ... | --tx_if ${tg_interface_name} | --dst_mac ${dst_mac}
187 | | ... | --src_mac ${src_mac} | --dst_ip ${dst_ip} | --src_ip ${src_ip}
188 | | ... | --timeout ${timeout}
189 | | Run Traffic Script On Node | send_icmp_wait_for_reply.py
190 | | ... | ${tg_node} | ${args}
191
192 | Configure IPv4 forwarding in circular topology
193 | | [Documentation]
194 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
195 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
196 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
197 | | ... | links. In case of 3-node topology setup IPv4 adresses with /30 prefix
198 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24
199 | | ... | and next hop of neighbour DUT interface IPv4 address. Configure route
200 | | ... | entries for remote hosts IPv4 addresses if required.
201 | | ...
202 | | ... | *Arguments:*
203 | | ... | - tg_if1_ip4 - IP address of TG interface1. Type: string
204 | | ... | - tg_if2_ip4 - IP address of TG interface2. Type: string
205 | | ... | - dut1_if1_ip4 - IP address of DUT1 interface1. Type: string
206 | | ... | - dut1_if2_ip4 - IP address of DUT1 interface1. Type: string
207 | | ... | - dut2_if1_ip4 - IP address of DUT2 interface1 (Optional).
208 | | ... | Type: string
209 | | ... | - dut2_if2_ip4 - IP address of DUT2 interface2 (Optional).
210 | | ... | Type: string
211 | | ... | - remote_host1_ip4 - IP address of remote host1 (Optional).
212 | | ... | Type: string
213 | | ... | - remote_host2_ip4 - IP address of remote host2 (Optional).
214 | | ... | Type: string
215 | | ... | - remote_host_ip4_prefix - IP address prefix for host IP addresses
216 | | ... | (Optional). Type: string or integer
217 | | ...
218 | | ... | *Example:*
219 | | ...
220 | | ... | \| Configure IPv4 forwarding in circular topology \
221 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 20.20.20.1 \|
222 | | ... | \| Configure IPv4 forwarding in circular topology \
223 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 20.20.20.1 \
224 | | ... | \| remote_host1_ip4=192.168.0.1 \| remote_host2_ip4=192.168.0.2 \
225 | | ... | \| remote_host_ip4_prefix=32 \|
226 | | ... | \| Configure IPv4 forwarding in circular topology \
227 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 1.1.1.1 \| 1.1.1.2 \
228 | | ... | \| 20.20.20.1 \|
229 | | ... | \| Configure IPv4 forwarding in circular topology \
230 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 1.1.1.1 \| 1.1.1.2 \
231 | | ... | \| 20.20.20.1 \| remote_host1_ip4=192.168.0.1 \
232 | | ... | \| remote_host2_ip4=192.168.0.2 \| remote_host_ip4_prefix=32 \|
233 | | ...
234 | | [Arguments] | ${tg_if1_ip4} | ${tg_if2_ip4} | ${dut1_if1_ip4}
235 | | ... | ${dut1_if2_ip4} | ${dut2_if1_ip4}=${NONE} | ${dut2_if2_ip4}=${NONE}
236 | | ... | ${remote_host1_ip4}=${NONE} | ${remote_host2_ip4}=${NONE}
237 | | ... | ${remote_host_ip4_prefix}=${NONE}
238 | | ...
239 | | Configure interfaces in path up
240 | | ...
241 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
242 | | ... | Variable Should Exist | ${dut2_node}
243 | | ...
244 | | Run Keyword If | '${dut2_status}' == 'PASS'
245 | | ... | Configure IPv4 forwarding in 3-node circular topology
246 | | ... | ${tg_if1_ip4} | ${tg_if2_ip4} | ${dut1_if1_ip4} | ${dut1_if2_ip4}
247 | | ... | ${dut2_if1_ip4} | ${dut2_if2_ip4} | ${remote_host1_ip4}
248 | | ... | ${remote_host2_ip4} | ${remote_host_ip4_prefix}
249 | | ... | ELSE
250 | | ... | Configure IPv4 forwarding in 2-node circular topology
251 | | ... | ${tg_if1_ip4} | ${tg_if2_ip4} | ${dut1_if1_ip4} | ${dut1_if2_ip4}
252 | | ... | remote_host1_ip4=${remote_host1_ip4}
253 | | ... | remote_host2_ip4=${remote_host2_ip4}
254 | | ... | remote_host_ip4_prefix=${remote_host_ip4_prefix}
255
256 | Configure IPv4 forwarding in 2-node circular topology
257 | | [Documentation]
258 | | ... | Set UP state on VPP interfaces on DUT node in 2-node circular
259 | | ... | topology. Get the interface MAC addresses and setup ARP on
260 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
261 | | ... | links. Configure route entries for remote hosts IPv4 addresses
262 | | ... | if required.
263 | | ...
264 | | ... | *Arguments:*
265 | | ... | - tg_if1_ip4 - IP address of TG interface1. Type: string
266 | | ... | - tg_if2_ip4 - IP address of TG interface2. Type: string
267 | | ... | - dut1_if1_ip4 - IP address of DUT1 interface1. Type: string
268 | | ... | - dut1_if2_ip4 - IP address of DUT1 interface1. Type: string
269 | | ... | - remote_host1_ip4 - IP address of remote host1 (Optional).
270 | | ... | Type: string
271 | | ... | - remote_host2_ip4 - IP address of remote host2 (Optional).
272 | | ... | Type: string
273 | | ... | - remote_host_ip4_prefix - IP address prefix for host IP addresses
274 | | ... | (Optional). Type: string or integer
275 | | ...
276 | | ... | *Example:*
277 | | ...
278 | | ... | \| Configure IPv4 forwarding in circular topology \
279 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 20.20.20.1 \|
280 | | ... | \| Configure IPv4 forwarding in circular topology \
281 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 20.20.20.1 \
282 | | ... | \| 192.168.0.1 \| 192.168.0.2 \| 32 \|
283 | | ...
284 | | [Arguments] | ${tg_if1_ip4} | ${tg_if2_ip4} | ${dut1_if1_ip4}
285 | | ... | ${dut1_if2_ip4} | ${remote_host1_ip4}=${NONE}
286 | | ... | ${remote_host2_ip4}=${NONE} | ${remote_host_ip4_prefix}=${NONE}
287 | | ...
288 | | ${dut_tg_ip4_prefix}= | Set Variable | 24
289 | | ...
290 | | Add arp on dut | ${dut_node} | ${dut_to_tg_if1} | ${tg_if1_ip4}
291 | | ... | ${tg_to_dut_if1_mac}
292 | | Add arp on dut | ${dut_node} | ${dut_to_tg_if2} | ${tg_if2_ip4}
293 | | ... | ${tg_to_dut_if2_mac}
294 | | ...
295 | | Configure IP addresses on interfaces | ${dut_node} | ${dut_to_tg_if1}
296 | | ... | ${dut1_if1_ip4} | ${dut_tg_ip4_prefix}
297 | | Configure IP addresses on interfaces | ${dut_node} | ${dut_to_tg_if2}
298 | | ... | ${dut1_if2_ip4} | ${dut_tg_ip4_prefix}
299 | | ...
300 | | Run Keyword Unless | '${remote_host1_ip4}' == '${NONE}'
301 | | ... | Vpp Route Add | ${dut_node} | ${remote_host1_ip4}
302 | | ... | ${remote_host_ip4_prefix} | gateway=${tg_if1_ip4}
303 | | ... | interface=${dut_to_tg_if1}
304 | | Run Keyword Unless | '${remote_host2_ip4}' == '${NONE}'
305 | | ... | Vpp Route Add | ${dut_node} | ${remote_host2_ip4}
306 | | ... | ${remote_host_ip4_prefix} | gateway=${tg_if2_ip4}
307 | | ... | interface=${dut_to_tg_if2}
308
309 | Configure IPv4 forwarding in 3-node circular topology
310 | | [Documentation]
311 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
312 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
313 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links.
314 | | ... | Configure IPv4 adresses with /30 prefix on DUT1-DUT2 link and set
315 | | ... | routing on both DUT nodes with prefix /24 and next hop of neighbour
316 | | ... | DUT interface IPv4 address. Configure route entries for remote hosts
317 | | ... | IPv4 addresses if required.
318 | | ...
319 | | ... | *Arguments:*
320 | | ... | - tg_if1_ip4 - IP address of TG interface1. Type: string
321 | | ... | - tg_if2_ip4 - IP address of TG interface2. Type: string
322 | | ... | - dut1_if1_ip4 - IP address of DUT1 interface1. Type: string
323 | | ... | - dut1_if2_ip4 - IP address of DUT1 interface1. Type: string
324 | | ... | - dut2_if1_ip4 - IP address of DUT2 interface1. Type: string
325 | | ... | - dut2_if2_ip4 - IP address of DUT2 interface2. Type: string
326 | | ... | - remote_host1_ip4 - IP address of remote host1 (Optional).
327 | | ... | Type: string
328 | | ... | - remote_host2_ip4 - IP address of remote host2 (Optional).
329 | | ... | Type: string
330 | | ... | - remote_host_ip4_prefix - IP address prefix for host IP addresses
331 | | ... | (Optional). Type: string or integer
332 | | ...
333 | | ... | *Example:*
334 | | ...
335 | | ... | \| Configure IPv4 forwarding in circular topology \
336 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 1.1.1.1 \| 1.1.1.2 \
337 | | ... | \| 20.20.20.1 \|
338 | | ... | \| Configure IPv4 forwarding in circular topology \
339 | | ... | \| 10.10.10.2 \| 20.20.20.2 \| 10.10.10.1 \| 1.1.1.1 \| 1.1.1.2 \
340 | | ... | \| 20.20.20.1 \| 192.168.0.1 \| 192.168.0.2 \| 32 \|
341 | | ...
342 | | [Arguments] | ${tg_if1_ip4} | ${tg_if2_ip4} | ${dut1_if1_ip4}
343 | | ... | ${dut1_if2_ip4} | ${dut2_if1_ip4} | ${dut2_if2_ip4}
344 | | ... | ${remote_host1_ip4}=${NONE} | ${remote_host2_ip4}=${NONE}
345 | | ... | ${remote_host_ip4_prefix}=${NONE}
346 | | ...
347 | | ${dut_tg_ip4_prefix}= | Set Variable | 24
348 | | ${dut_link_ip4_prefix}= | Set Variable | 30
349 | | ...
350 | | Add arp on dut | ${dut1_node} | ${dut1_to_tg} | ${tg_if1_ip4}
351 | | ... | ${tg_to_dut1_mac}
352 | | Add arp on dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_if1_ip4}
353 | | ... | ${dut2_to_dut1_mac}
354 | | Add arp on dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_if2_ip4}
355 | | ... | ${dut1_to_dut2_mac}
356 | | Add arp on dut | ${dut2_node} | ${dut2_to_tg} | ${tg_if2_ip4}
357 | | ... | ${tg_to_dut2_mac}
358 | | ...
359 | | Configure IP addresses on interfaces | ${dut1_node} | ${dut1_to_tg}
360 | | ... | ${dut1_if1_ip4} | ${dut_tg_ip4_prefix}
361 | | Configure IP addresses on interfaces | ${dut1_node} | ${dut1_to_dut2}
362 | | ... | ${dut1_if2_ip4} | ${dut_link_ip4_prefix}
363 | | Configure IP addresses on interfaces | ${dut2_node} | ${dut2_to_dut1}
364 | | ... | ${dut2_if1_ip4} | ${dut_link_ip4_prefix}
365 | | Configure IP addresses on interfaces | ${dut2_node} | ${dut2_to_tg}
366 | | ... | ${dut2_if2_ip4} | ${dut_tg_ip4_prefix}
367 | | ...
368 | | Vpp Route Add | ${dut1_node} | ${tg_if2_ip4} | ${dut_tg_ip4_prefix}
369 | | ... | gateway=${dut2_if1_ip4} | interface=${dut1_to_dut2}
370 | | Vpp Route Add | ${dut2_node} | ${tg_if1_ip4} | ${dut_tg_ip4_prefix}
371 | | ... | gateway=${dut1_if2_ip4} | interface=${dut2_to_dut1}
372 | | ...
373 | | Run Keyword Unless | '${remote_host1_ip4}' == '${NONE}'
374 | | ... | Vpp Route Add | ${dut1_node} | ${remote_host1_ip4}
375 | | ... | ${remote_host_ip4_prefix} | gateway=${tg_if1_ip4}
376 | | ... | interface=${dut1_to_tg}
377 | | Run Keyword Unless | '${remote_host2_ip4}' == '${NONE}'
378 | | ... | Vpp Route Add | ${dut1_node} | ${remote_host2_ip4}
379 | | ... | ${remote_host_ip4_prefix} | gateway=${dut2_if1_ip4}
380 | | ... | interface=${dut1_to_dut2}
381 | | Run Keyword Unless | '${remote_host1_ip4}' == '${NONE}'
382 | | ... | Vpp Route Add | ${dut2_node} | ${remote_host1_ip4}
383 | | ... | ${remote_host_ip4_prefix} | gateway=${dut1_if2_ip4}
384 | | ... | interface=${dut2_to_dut1}
385 | | Run Keyword Unless | '${remote_host2_ip4}' == '${NONE}'
386 | | ... | Vpp Route Add | ${dut2_node} | ${remote_host2_ip4}
387 | | ... | ${remote_host_ip4_prefix} | gateway=${tg_if2_ip4}
388 | | ... | interface=${dut2_to_tg}