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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 """Traffic keywords"""
17 | Library | resources.libraries.python.InterfaceUtil
18 | Library | resources.libraries.python.IPv6Util
19 | Library | resources.libraries.python.NodePath
20 | Library | resources.libraries.python.topology.Topology
21 | Library | resources.libraries.python.TrafficScriptExecutor
23 | Resource | resources/libraries/robot/shared/default.robot
24 | Resource | resources/libraries/robot/shared/counters.robot
26 | Documentation | Traffic keywords
29 | Send packet and verify headers
30 | | [Documentation] | Sends packet from IP (with source mac) to IP\
31 | | ... | (with dest mac). There has to be 4 MAC addresses when using\
32 | | ... | 2-node + xconnect (one for each eth).
34 | | ... | *Arguments:*
36 | | ... | _NOTE:_ Arguments are based on topology:
37 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
39 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
40 | | ... | - src_ip - IP of source interface (TG-if1). Type: string
41 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
42 | | ... | - tx_src_port - Interface of TG-if1. Type: string
43 | | ... | - tx_src_mac - MAC address of TG-if1. Type: string
44 | | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
45 | | ... | - rx_port - Interface of TG-if1. Type: string
46 | | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
47 | | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
48 | | ... | - encaps_tx - Expected encapsulation on TX side: Dot1q or Dot1ad
49 | | ... | (Optional). Type: string
50 | | ... | - vlan_tx - VLAN (inner) tag on TX side (Optional). Type: integer
51 | | ... | - vlan_outer_tx - .1AD VLAN (outer) tag on TX side (Optional).
52 | | ... | Type: integer
53 | | ... | - encaps_rx - Expected encapsulation on RX side: Dot1q or Dot1ad
54 | | ... | (Optional). Type: string
55 | | ... | - vlan_rx - VLAN (inner) tag on RX side (Optional). Type: integer
56 | | ... | - vlan_outer_rx - .1AD VLAN (outer) tag on RX side (Optional).
57 | | ... | Type: integer
60 | | ... | - No value returned
64 | | ... | \| Send packet and verify headers \| ${nodes['TG']} \| 10.0.0.1 \
65 | | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
66 | | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \|
68 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
69 | | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
70 | | ... | ${rx_dst_mac} | ${encaps_tx}=${EMPTY} | ${vlan_tx}=${EMPTY}
71 | | ... | ${vlan_outer_tx}=${EMPTY} | ${encaps_rx}=${EMPTY}
72 | | ... | ${vlan_rx}=${EMPTY} | ${vlan_outer_rx}=${EMPTY}
74 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
75 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
76 | | ${args}= | Catenate | --tg_src_mac ${tx_src_mac}
77 | | ... | --tg_dst_mac ${rx_dst_mac} | --dut_if1_mac ${tx_dst_mac}
78 | | ... | --dut_if2_mac ${rx_src_mac} | --src_ip ${src_ip} | --dst_ip ${dst_ip}
79 | | ... | --tx_if ${tx_port_name} | --rx_if ${rx_port_name}
80 | | ${args}= | Run Keyword If | '${encaps_tx}' == '${EMPTY}'
81 | | | ... | Set Variable | ${args}
82 | | ... | ELSE | Catenate
83 | | ... | ${args} | --encaps_tx ${encaps_tx} | --vlan_tx ${vlan_tx}
84 | | ${args}= | Run Keyword If | '${encaps_rx}' == '${EMPTY}'
85 | | | ... | Set Variable | ${args}
86 | | ... | ELSE | Catenate
87 | | ... | ${args} | --encaps_rx ${encaps_rx} | --vlan_rx ${vlan_rx}
88 | | ${args}= | Run Keyword If | '${vlan_outer_tx}' == '${EMPTY}'
89 | | | ... | Set Variable | ${args}
90 | | ... | ELSE | Catenate | ${args} | --vlan_outer_tx ${vlan_outer_tx}
91 | | ${args}= | Run Keyword If | '${vlan_outer_rx}' == '${EMPTY}'
92 | | | ... | Set Variable | ${args}
93 | | ... | ELSE | Catenate | ${args} | --vlan_outer_rx ${vlan_outer_rx}
94 | | Run Traffic Script On Node | send_icmp_check_headers.py | ${tg_node} |
97 | Packet transmission from port to port should fail
98 | | [Documentation] | Sends packet from ip (with specified mac) to ip\
99 | | ... | (with dest mac). Using keyword : Send packet And Check Headers\
100 | | ... | and subsequently checks the return value.
102 | | ... | *Arguments:*
104 | | ... | _NOTE:_ Arguments are based on topology:
105 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
107 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
108 | | ... | - src_ip - IP of source interface (TG-if1). Type: string
109 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
110 | | ... | - tx_src_port - Interface of TG-if1. Type: string
111 | | ... | - tx_src_mac - MAC address of TG-if1. Type: string
112 | | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
113 | | ... | - rx_port - Interface of TG-if1. Type: string
114 | | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
115 | | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
118 | | ... | - No value returned
122 | | ... | \| Packet transmission from port to port should fail \
123 | | ... | \| ${nodes['TG']} \| 10.0.0.1 \ \| 32.0.0.1 \| eth2 \
124 | | ... | \| 08:00:27:a2:52:5b \| eth3 \| 08:00:27:4d:ca:7a \
125 | | ... | \| 08:00:27:ee:fd:b3 \| 08:00:27:7d:fd:10 \|
126 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
127 | | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
128 | | ... | ${rx_dst_mac}
130 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
131 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
132 | | ${args}= | Catenate | --tg_src_mac ${tx_src_mac}
133 | | ... | --tg_dst_mac ${rx_dst_mac} | --dut_if1_mac ${tx_dst_mac}
134 | | ... | --dut_if2_mac ${rx_src_mac} | --src_ip ${src_ip} | --dst_ip ${dst_ip}
135 | | ... | --tx_if ${tx_port_name} | --rx_if ${rx_port_name}
136 | | Run Keyword And Expect Error | ICMP echo Rx timeout |
137 | | ... | Run Traffic Script On Node | send_icmp_check_headers.py
138 | | ... | ${tg_node} | ${args}
140 | Send packet and verify ARP request
141 | | [Documentation] | Send IP packet from tx_port and check if ARP Request\
142 | | ... | packet is received on rx_port.
144 | | ... | *Arguments:*
146 | | ... | _NOTE:_ Arguments are based on topology:
147 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
149 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
150 | | ... | - tx_src_ip - Source IP address of transferred packet (TG-if1).
151 | | ... | Type: string
152 | | ... | - tx_dst_ip - Destination IP address of transferred packet (TG-if2).
153 | | ... | Type: string
154 | | ... | - tx_port - Interface from which the IP packet is sent (TG-if1).
155 | | ... | Type: string
156 | | ... | - tx_dst_mac - Destination MAC address of IP packet (DUT-if1).
157 | | ... | Type: string
158 | | ... | - rx_port - Interface where the IP packet is received (TG-if2).
159 | | ... | Type: string
160 | | ... | - rx_src_mac - Source MAC address of ARP packet (DUT-if2).
161 | | ... | Type: string
162 | | ... | - rx_arp_src_ip - Source IP address of ARP packet (DUT-if2).
163 | | ... | Type: string
164 | | ... | - rx_arp_dst_ip - Destination IP address of ARP packet. Type: string
167 | | ... | - No value returned
171 | | ... | \| Send Packet And Check ARP Packet \| ${nodes['TG']} \| 16.0.0.1 \
172 | | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \
173 | | ... | \| eth4 \| 08:00:27:5b:49:dd \| 192.168.2.1 \| 192.168.2.2 \|
175 | | [Arguments] | ${tg_node} | ${tx_src_ip} | ${tx_dst_ip} | ${tx_port}
176 | | ... | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} | ${rx_arp_src_ip}
177 | | ... | ${rx_arp_dst_ip}
179 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port}
180 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
181 | | ${args}= | Catenate | --tx_dst_mac ${tx_dst_mac}
182 | | ... | --rx_src_mac ${rx_src_mac} | --tx_src_ip ${tx_src_ip}
183 | | ... | --tx_dst_ip ${tx_dst_ip} | --tx_if ${tx_port_name}
184 | | ... | --rx_if ${rx_port_name} | --rx_arp_src_ip ${rx_arp_src_ip}
185 | | ... | --rx_arp_dst_ip ${rx_arp_dst_ip}
186 | | Run Traffic Script On Node | send_icmp_check_arp.py | ${tg_node} | ${args}
188 | Send TCP or UDP packet and verify received packet
189 | | [Documentation] | Sends TCP or UDP packet with specified source\
190 | | ... | and destination port.
192 | | ... | *Arguments:*
194 | | ... | _NOTE:_ Arguments are based on topology:
195 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
197 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
198 | | ... | - src_ip - IP of source interface (TG-if1). Type: integer
199 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer
200 | | ... | - tx_port - Source interface (TG-if1). Type: string
201 | | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string
202 | | ... | - rx_port - Destionation interface (TG-if1). Type: string
203 | | ... | - rx_mac - MAC address of destination interface (TG-if1). Type: string
204 | | ... | - protocol - Type of protocol. Type: string
205 | | ... | - source_port - Source TCP/UDP port. Type: string or integer
206 | | ... | - destination_port - Destination TCP/UDP port. Type: string or integer
209 | | ... | - No value returned
213 | | ... | \| Send TCP or UDP packet and verify received packet \
214 | | ... | \| ${nodes['TG']} \| 16.0.0.1 \| 32.0.0.1 \| eth2 \
215 | | ... | \| 08:00:27:cc:4f:54 \| eth4 \| 08:00:27:c9:6a:d5 \| TCP \| 20 \
218 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} | ${tx_mac}
219 | | ... | ${rx_port} | ${rx_mac} | ${protocol} | ${source_port}
220 | | ... | ${destination_port}
222 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port}
223 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
224 | | ${args}= | Catenate | --tx_mac ${tx_mac} | --rx_mac ${rx_mac}
225 | | ... | --src_ip ${src_ip} | --dst_ip ${dst_ip}
226 | | ... | --tx_if ${tx_port_name} | --rx_if ${rx_port_name}
227 | | ... | --protocol ${protocol} | --source_port ${source_port}
228 | | ... | --destination_port ${destination_port}
229 | | Run Traffic Script On Node | send_tcp_udp.py
230 | | ... | ${tg_node} | ${args}
232 | TCP or UDP packet transmission should fail
233 | | [Documentation] | Sends TCP or UDP packet with specified source\
234 | | ... | and destination port.
236 | | ... | *Arguments:*
238 | | ... | _NOTE:_ Arguments are based on topology:
239 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
241 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
242 | | ... | - src_ip - IP of source interface (TG-if1). Type: integer
243 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer
244 | | ... | - tx_port - Source interface (TG-if1). Type: string
245 | | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string
246 | | ... | - rx_port - Destionation interface (TG-if1). Type: string
247 | | ... | - rx_mac - MAC address of destination interface (TG-if1). Type: string
248 | | ... | - protocol - Type of protocol. Type: string
249 | | ... | - source_port - Source TCP/UDP port. Type: string or integer
250 | | ... | - destination_port - Destination TCP/UDP port. Type: string or integer
253 | | ... | - No value returned
257 | | ... | \| TCP or UDP packet transmission should fail \| ${nodes['TG']} \
258 | | ... | \| 16.0.0.1 \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \
259 | | ... | \| eth4 \| 08:00:27:c9:6a:d5 \| TCP \| 20 \| 80 \|
261 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} | ${tx_mac}
262 | | ... | ${rx_port} | ${rx_mac} | ${protocol} | ${source_port}
263 | | ... | ${destination_port}
265 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port}
266 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
267 | | ${args}= | Catenate | --tx_mac ${tx_mac} | --rx_mac ${rx_mac}
268 | | ... | --src_ip ${src_ip} | --dst_ip ${dst_ip} | --tx_if ${tx_port_name}
269 | | ... | --rx_if ${rx_port_name} | --protocol ${protocol}
270 | | ... | --source_port ${source_port} | --destination_port ${destination_port}
271 | | Run Keyword And Expect Error | TCP/UDP Rx timeout
272 | | ... | Run Traffic Script On Node | send_tcp_udp.py
273 | | ... | ${tg_node} | ${args}
275 | Receive and verify router advertisement packet
276 | | [Documentation] | Wait until RA packet is received and then verify\
277 | | ... | specific fields of received RA packet.
279 | | ... | *Arguments:*
281 | | ... | - node - Node where to check for RA packet. Type: dictionary
282 | | ... | - rx_port - Interface where the packet is received. Type: string
283 | | ... | - src_mac - MAC address of source interface from which the link-local\
284 | | ... | IPv6 address is constructed and checked. Type: string
285 | | ... | - interval - Configured retransmit interval. Optional. Type: integer
288 | | ... | - No value returned
292 | | ... | \| Receive and verify router advertisement packet \
293 | | ... | \| ${nodes['DUT1']} \| eth2 \| 08:00:27:cc:4f:54 \|
295 | | [Arguments] | ${node} | ${rx_port} | ${src_mac} | ${interval}=${0}
297 | | ${rx_port_name}= | Get interface name | ${node} | ${rx_port}
298 | | ${args}= | Catenate | --rx_if ${rx_port_name} | --src_mac ${src_mac}
299 | | ... | --interval ${interval}
300 | | Run Traffic Script On Node | check_ra_packet.py | ${node} | ${args}
302 | Send router solicitation and verify response
303 | | [Documentation] | Send RS packet, wait for response and then verify\
304 | | ... | specific fields of received RA packet.
306 | | ... | *Arguments:*
308 | | ... | - tg_node - TG node to send RS packet from. Type: dictionary
309 | | ... | - dut_node - DUT node to send RS packet to. Type: dictionary
310 | | ... | - rx_port - Interface where the packet is sent from. Type: string
311 | | ... | - tx_port - Interface where the packet is sent to. Type: string
312 | | ... | - src_ip - Source IP address of RS packet. Optional. If not provided,\
313 | | ... | link local address will be used. Type: string
316 | | ... | - No value returned
320 | | ... | \| Send router solicitation and verify response \
321 | | ... | \| ${nodes['TG']} \| ${nodes['DUT1']} \| eth2 \
322 | | ... | \| GigabitEthernet0/8/0 \| 10::10 \|
324 | | [Arguments] | ${tg_node} | ${dut_node} | ${tx_port} | ${rx_port}
325 | | ... | ${src_ip}=''
327 | | ${src_mac}= | Get Interface Mac | ${tg_node} | ${tx_port}
328 | | ${dst_mac}= | Get Interface Mac | ${dut_node} | ${rx_port}
329 | | ${src_int_name}= | Get interface name | ${tg_node} | ${tx_port}
330 | | ${dst_int_name}= | Get interface name | ${dut_node} | ${rx_port}
331 | | ${args}= | Catenate | --rx_if ${dst_int_name} | --tx_if ${src_int_name}
332 | | ... | --src_mac ${src_mac} | --dst_mac ${dst_mac} | --src_ip ${src_ip}
333 | | Run Traffic Script On Node | send_rs_check_ra.py
334 | | ... | ${tg_node} | ${args}
337 | | [Documentation] | Send ARP Request and check if the ARP Response is\
340 | | ... | *Arguments:*
342 | | ... | _NOTE:_ Arguments are based on topology:
343 | | ... | TG(if1)<->(if1)DUT
345 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
346 | | ... | - tx_port - Interface from which the ARP packet is sent (TG-if1).
347 | | ... | Type: string
348 | | ... | - src_mac - Source MAC address of ARP packet (TG-if1).
349 | | ... | Type: string
350 | | ... | - tgt_mac - Target MAC address which is expected in the response
351 | | ... | (DUT-if1). Type: string
352 | | ... | - src_ip - Source IP address of ARP packet (TG-if1).
353 | | ... | Type: string
354 | | ... | - tgt_ip - Target IP address of ARP packet (DUT-if1).
355 | | ... | Type: string
358 | | ... | - No value returned
362 | | ... | \| Send ARP Request \| ${nodes['TG']} \| eth3 \
363 | | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:c9:6a:d5 \
364 | | ... | \| 10.0.0.100 \| 192.168.1.5 \|
366 | | [Arguments] | ${tg_node} | ${tx_port} | ${src_mac} | ${tgt_mac} | ${src_ip}
369 | | ${args}= | Catenate | --tx_if ${tx_port} | --src_mac ${src_mac}
370 | | ... | --dst_mac ${tgt_mac} | --src_ip ${src_ip} | --dst_ip ${tgt_ip}
371 | | Run Traffic Script On Node | arp_request.py | ${tg_node} | ${args}
373 | ARP request should fail
374 | | [Documentation] | Send ARP Request and the ARP Response should not\
375 | | ... | be received.
377 | | ... | *Arguments:*
379 | | ... | _NOTE:_ Arguments are based on topology:
380 | | ... | TG(if1)<->(if1)DUT
382 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
383 | | ... | - tx_port - Interface from which the ARP packet is sent (TG-if1).
384 | | ... | Type: string
385 | | ... | - src_mac - Source MAC address of ARP packet (TG-if1).
386 | | ... | Type: string
387 | | ... | - tgt_mac - Target MAC address which is expected in the response
388 | | ... | (DUT-if1). Type: string
389 | | ... | - src_ip - Source IP address of ARP packet (TG-if1).
390 | | ... | Type: string
391 | | ... | - tgt_ip - Target IP address of ARP packet (DUT-if1).
392 | | ... | Type: string
395 | | ... | - No value returned
399 | | ... | \| ARP request should fail \| ${nodes['TG']} \| eth3 \
400 | | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:c9:6a:d5 \
401 | | ... | \| 10.0.0.100 \| 192.168.1.5 \|
403 | | [Arguments] | ${tg_node} | ${tx_port} | ${src_mac} | ${tgt_mac} | ${src_ip}
406 | | ${args}= | Catenate | --tx_if ${tx_port} | --src_mac ${src_mac}
407 | | ... | --dst_mac ${tgt_mac} | --src_ip ${src_ip} | --dst_ip ${tgt_ip}
408 | | Run Keyword And Expect Error | ARP reply timeout
409 | | ... | Run Traffic Script On Node | arp_request.py | ${tg_node} | ${args}
411 | Send packets and verify multipath routing
412 | | [Documentation] | Send 100 IP ICMP packets traffic and check if it is\
413 | | ... | divided into two paths.
415 | | ... | *Arguments:*
417 | | ... | _NOTE:_ Arguments are based on topology:
418 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
420 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
421 | | ... | - src_port - Interface of TG-if1. Type: string
422 | | ... | - dst_port - Interface of TG-if2. Type: string
423 | | ... | - src_ip - IP of source interface (TG-if1). Type: string
424 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
425 | | ... | - tx_src_mac - MAC address of TG-if1. Type: string
426 | | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
427 | | ... | - rx_src_mac - MAC address of DUT-if2. Type: string
428 | | ... | - rx_dst_mac_1 - MAC address of interface for path 1. Type: string
429 | | ... | - rx_dst_mac_2 - MAC address of interface for path 2. Type: string
432 | | ... | - No value returned
436 | | ... | \| Send Packet And Check Multipath Routing \| ${nodes['TG']} \
437 | | ... | \| eth2 \| eth3 \| 16.0.0.1 \| 32.0.0.1 \
438 | | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:c9:6a:d5 \| 08:00:27:54:59:f9 \
439 | | ... | \| 02:00:00:00:00:02 \| 02:00:00:00:00:03 \|
441 | | [Arguments] | ${tg_node} | ${src_port} | ${dst_port} | ${src_ip} | ${dst_ip}
442 | | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_src_mac} | ${rx_dst_mac_1}
443 | | ... | ${rx_dst_mac_2}
445 | | ${src_port_name}= | Get interface name | ${tg_node} | ${src_port}
446 | | ${dst_port_name}= | Get interface name | ${tg_node} | ${dst_port}
447 | | ${args}= | Catenate | --tx_if ${src_port_name}
448 | | ... | --rx_if ${dst_port_name} | --src_ip ${src_ip} | --dst_ip ${dst_ip}
449 | | ... | --tg_if1_mac ${tx_src_mac} | --dut_if1_mac ${tx_dst_mac}
450 | | ... | --dut_if2_mac ${rx_src_mac} | --path_1_mac ${rx_dst_mac_1}
451 | | ... | --path_2_mac ${rx_dst_mac_2}
452 | | Run Traffic Script On Node | send_icmp_check_multipath.py | ${tg_node}
455 | Send IPv4 ping packet and verify headers
456 | | [Documentation] | Send ICMP Echo Request message from source port of source\
457 | | ... | node to destination port of destination node and check the received\
458 | | ... | ICMP Echo Reply message for correctness inlcuding source and\
459 | | ... | destination IPv4 and MAC addresses and ttl value. If the destination\
460 | | ... | node is TG type the ttl of received ICMP Echo Request message is\
461 | | ... | checked too and corresponding ICMP Echo Reply message is created.
463 | | ... | *Arguments:*
465 | | ... | _NOTE:_ Arguments are based on topology:
466 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
468 | | ... | - tx_node - Source node to execute scripts on (mostly TG).
469 | | ... | Type: dictionary
470 | | ... | - tx_port - Source interface of tx_node. Type: string
471 | | ... | - rx_node - Destinantion node. Type: dictionary
472 | | ... | - rx_port - Destination interface of rx_node. Type: string
473 | | ... | - src_ip - IP address of source interface or source remote host.
474 | | ... | Type: string
475 | | ... | - dst_ip - IP address of destination interface or destination remote
476 | | ... | host. Type: string
477 | | ... | - first_hop_mac - Destination MAC address for the first hop in
478 | | ... | the path. Type: string
479 | | ... | - hops - Expected number of hops. Type: string or integer
482 | | ... | - No value returned
486 | | ... | \| Send IPv4 ping packet and verify headers \| ${nodes['TG']} \
487 | | ... | \| eth2 \| ${nodes['DUT1']} \| eth3 \| 16.0.0.1 \| 32.0.0.1 \
488 | | ... | \| 08:00:27:cc:4f:54 \| 1 \|
490 | | [Arguments] | ${tx_node} | ${tx_port} | ${rx_node} | ${rx_port}
491 | | ... | ${src_ip} | ${dst_ip} | ${first_hop_mac} | ${hops}
493 | | ${src_mac}= | Get interface MAC | ${tx_node} | ${tx_port}
494 | | ${dst_mac}= | Get interface MAC | ${rx_node} | ${rx_port}
495 | | ${is_dst_tg}= | Is TG node | ${rx_node}
496 | | ${tx_port_name}= | Get interface name | ${tx_node} | ${tx_port}
497 | | ${rx_port_name}= | Get interface name | ${rx_node} | ${rx_port}
498 | | ${args}= | Traffic Script Gen Arg | ${rx_port_name} | ${tx_port_name}
499 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
500 | | ${args}= | Catenate | ${args} | --hops ${hops}
501 | | ... | --first_hop_mac ${first_hop_mac} | --is_dst_tg ${is_dst_tg}
502 | | Run Traffic Script On Node | ipv4_ping_ttl_check.py | ${tx_node} | ${args}
504 | Send IPv6 echo request packet and verify headers
505 | | [Documentation] | Send ICMPv6 Echo Request message from source port of\
506 | | ... | source node to destination port of destination node and check\
507 | | ... | the received ICMPv6 Echo Reply message for correctness inlcuding\
508 | | ... | source and destination IPv4 and MAC addresses and hlim value. If\
509 | | ... | the destination node is TG type the hlim of received ICMP Echo\
510 | | ... | Request message is checked too and corresponding ICMP Echo Reply\
511 | | ... | message is created and sent.
513 | | ... | *Arguments:*
515 | | ... | _NOTE:_ Arguments are based on topology:
516 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
518 | | ... | - tx_node - Source node to execute scripts on (mostly TG).
519 | | ... | Type: dictionary
520 | | ... | - tx_port - Source interface of tx_node. Type: string
521 | | ... | - rx_node - Destinantion node. Type: dictionary
522 | | ... | - rx_port - Destination interface of rx_node. Type: string
523 | | ... | - src_ip - IPv6 address of source interface or source remote host.
524 | | ... | Type: string
525 | | ... | - dst_ip - IPv6 address of destination interface or destination remote
526 | | ... | host. Type: string
527 | | ... | - src_nh_mac - Destination MAC address for the first hop in
528 | | ... | the path in direction from source node. Type: string
529 | | ... | - hops - Expected number of hops. Type: string or integer
530 | | ... | - dst_nh_mac - Destination MAC address for the first hop in
531 | | ... | the path in direction from destination node (Optional). Type: string
534 | | ... | - No value returned
538 | | ... | \| Send IPv6 echo request packet and verify headers \
539 | | ... | \| ${nodes['TG']} \| eth2 \| ${nodes['DUT1']} \| eth3 \| 3ffe:5f::1 \
540 | | ... | \| 3ffe:5f::2 \| 08:00:27:cc:4f:54 \| 1 \|
542 | | [Arguments] | ${tx_node} | ${tx_port} | ${rx_node} | ${rx_port} | ${src_ip}
543 | | ... | ${dst_ip} | ${src_nh_mac} | ${hops} | ${dst_nh_mac}=${NONE}
545 | | ${src_mac}= | Get interface MAC | ${tx_node} | ${tx_port}
546 | | ${dst_mac}= | Get interface MAC | ${rx_node} | ${rx_port}
547 | | ${is_dst_tg}= | Is TG node | ${rx_node}
548 | | ${tx_port_name}= | Get interface name | ${tx_node} | ${tx_port}
549 | | ${rx_port_name}= | Get interface name | ${rx_node} | ${rx_port}
550 | | ${args}= | Traffic Script Gen Arg | ${rx_port_name} | ${tx_port_name}
551 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
552 | | ${args}= | Catenate | ${args} | --h_num ${hops} | --src_nh_mac ${src_nh_mac}
553 | | ... | --dst_nh_mac ${dst_nh_mac} | --is_dst_tg ${is_dst_tg}
554 | | Run Traffic Script On Node | icmpv6_echo_req_resp.py | ${tx_node} | ${args}