1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
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.IPv6Util
18 | Library | resources.libraries.python.IPv6Setup
19 | Library | resources.libraries.python.TrafficScriptExecutor
20 | Library | resources.libraries.python.NodePath
21 | Library | resources.libraries.python.Routing
22 | Library | resources.libraries.python.InterfaceUtil
23 | Library | resources.libraries.python.topology.Topology
24 | Resource | resources/libraries/robot/shared/default.robot
25 | Resource | resources/libraries/robot/shared/counters.robot
27 | Documentation | Traffic keywords
30 | Send packet and verify headers
31 | | [Documentation] | Sends packet from IP (with source mac) to IP\
32 | | ... | (with dest mac). There has to be 4 MAC addresses when using\
33 | | ... | 2-node + xconnect (one for each eth).
35 | | ... | *Arguments:*
37 | | ... | _NOTE:_ Arguments are based on topology:
38 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
40 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
41 | | ... | - src_ip - IP of source interface (TG-if1). Type: string
42 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
43 | | ... | - tx_src_port - Interface of TG-if1. Type: string
44 | | ... | - tx_src_mac - MAC address of TG-if1. Type: string
45 | | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
46 | | ... | - rx_port - Interface of TG-if1. Type: string
47 | | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
48 | | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
49 | | ... | - encaps_tx - Expected encapsulation on TX side: Dot1q or Dot1ad
50 | | ... | (Optional). Type: string
51 | | ... | - vlan_tx - VLAN (inner) tag on TX side (Optional). Type: integer
52 | | ... | - vlan_outer_tx - .1AD VLAN (outer) tag on TX side (Optional).
53 | | ... | Type: integer
54 | | ... | - encaps_rx - Expected encapsulation on RX side: Dot1q or Dot1ad
55 | | ... | (Optional). Type: string
56 | | ... | - vlan_rx - VLAN (inner) tag on RX side (Optional). Type: integer
57 | | ... | - vlan_outer_rx - .1AD VLAN (outer) tag on RX side (Optional).
58 | | ... | Type: integer
61 | | ... | - No value returned
65 | | ... | \| Send packet and verify headers \| ${nodes['TG']} \| 10.0.0.1 \
66 | | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
67 | | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \|
69 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
70 | | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
71 | | ... | ${rx_dst_mac} | ${encaps_tx}=${EMPTY} | ${vlan_tx}=${EMPTY}
72 | | ... | ${vlan_outer_tx}=${EMPTY} | ${encaps_rx}=${EMPTY}
73 | | ... | ${vlan_rx}=${EMPTY} | ${vlan_outer_rx}=${EMPTY}
75 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
76 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
77 | | ${args}= | Catenate | --tg_src_mac ${tx_src_mac}
78 | | ... | --tg_dst_mac ${rx_dst_mac} | --dut_if1_mac ${tx_dst_mac}
79 | | ... | --dut_if2_mac ${rx_src_mac} | --src_ip ${src_ip} | --dst_ip ${dst_ip}
80 | | ... | --tx_if ${tx_port_name} | --rx_if ${rx_port_name}
81 | | ${args}= | Run Keyword If | '${encaps_tx}' == '${EMPTY}'
82 | | | ... | Set Variable | ${args}
83 | | ... | ELSE | Catenate
84 | | ... | ${args} | --encaps_tx ${encaps_tx} | --vlan_tx ${vlan_tx}
85 | | ${args}= | Run Keyword If | '${encaps_rx}' == '${EMPTY}'
86 | | | ... | Set Variable | ${args}
87 | | ... | ELSE | Catenate
88 | | ... | ${args} | --encaps_rx ${encaps_rx} | --vlan_rx ${vlan_rx}
89 | | ${args}= | Run Keyword If | '${vlan_outer_tx}' == '${EMPTY}'
90 | | | ... | Set Variable | ${args}
91 | | ... | ELSE | Catenate | ${args} | --vlan_outer_tx ${vlan_outer_tx}
92 | | ${args}= | Run Keyword If | '${vlan_outer_rx}' == '${EMPTY}'
93 | | | ... | Set Variable | ${args}
94 | | ... | ELSE | Catenate | ${args} | --vlan_outer_rx ${vlan_outer_rx}
95 | | Run Traffic Script On Node | send_icmp_check_headers.py | ${tg_node} |
98 | Packet transmission from port to port should fail
99 | | [Documentation] | Sends packet from ip (with specified mac) to ip\
100 | | ... | (with dest mac). Using keyword : Send packet And Check Headers\
101 | | ... | and subsequently checks the return value.
103 | | ... | *Arguments:*
105 | | ... | _NOTE:_ Arguments are based on topology:
106 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
108 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
109 | | ... | - src_ip - IP of source interface (TG-if1). Type: string
110 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
111 | | ... | - tx_src_port - Interface of TG-if1. Type: string
112 | | ... | - tx_src_mac - MAC address of TG-if1. Type: string
113 | | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
114 | | ... | - rx_port - Interface of TG-if1. Type: string
115 | | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
116 | | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
119 | | ... | - No value returned
123 | | ... | \| Packet transmission from port to port should fail \
124 | | ... | \| ${nodes['TG']} \| 10.0.0.1 \ \| 32.0.0.1 \| eth2 \
125 | | ... | \| 08:00:27:a2:52:5b \| eth3 \| 08:00:27:4d:ca:7a \
126 | | ... | \| 08:00:27:ee:fd:b3 \| 08:00:27:7d:fd:10 \|
127 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
128 | | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
129 | | ... | ${rx_dst_mac}
131 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
132 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
133 | | ${args}= | Catenate | --tg_src_mac ${tx_src_mac}
134 | | ... | --tg_dst_mac ${rx_dst_mac} | --dut_if1_mac ${tx_dst_mac}
135 | | ... | --dut_if2_mac ${rx_src_mac} | --src_ip ${src_ip} | --dst_ip ${dst_ip}
136 | | ... | --tx_if ${tx_port_name} | --rx_if ${rx_port_name}
137 | | Run Keyword And Expect Error | ICMP echo Rx timeout |
138 | | ... | Run Traffic Script On Node | send_icmp_check_headers.py
139 | | ... | ${tg_node} | ${args}
141 | Send packet and verify ARP request
142 | | [Documentation] | Send IP packet from tx_port and check if ARP Request\
143 | | ... | packet is received on rx_port.
145 | | ... | *Arguments:*
147 | | ... | _NOTE:_ Arguments are based on topology:
148 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
150 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
151 | | ... | - tx_src_ip - Source IP address of transferred packet (TG-if1).
152 | | ... | Type: string
153 | | ... | - tx_dst_ip - Destination IP address of transferred packet (TG-if2).
154 | | ... | Type: string
155 | | ... | - tx_port - Interface from which the IP packet is sent (TG-if1).
156 | | ... | Type: string
157 | | ... | - tx_dst_mac - Destination MAC address of IP packet (DUT-if1).
158 | | ... | Type: string
159 | | ... | - rx_port - Interface where the IP packet is received (TG-if2).
160 | | ... | Type: string
161 | | ... | - rx_src_mac - Source MAC address of ARP packet (DUT-if2).
162 | | ... | Type: string
163 | | ... | - rx_arp_src_ip - Source IP address of ARP packet (DUT-if2).
164 | | ... | Type: string
165 | | ... | - rx_arp_dst_ip - Destination IP address of ARP packet. Type: string
168 | | ... | - No value returned
172 | | ... | \| Send Packet And Check ARP Packet \| ${nodes['TG']} \| 16.0.0.1 \
173 | | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \
174 | | ... | \| eth4 \| 08:00:27:5b:49:dd \| 192.168.2.1 \| 192.168.2.2 \|
176 | | [Arguments] | ${tg_node} | ${tx_src_ip} | ${tx_dst_ip} | ${tx_port}
177 | | ... | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} | ${rx_arp_src_ip}
178 | | ... | ${rx_arp_dst_ip}
180 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port}
181 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
182 | | ${args}= | Catenate | --tx_dst_mac ${tx_dst_mac}
183 | | ... | --rx_src_mac ${rx_src_mac} | --tx_src_ip ${tx_src_ip}
184 | | ... | --tx_dst_ip ${tx_dst_ip} | --tx_if ${tx_port_name}
185 | | ... | --rx_if ${rx_port_name} | --rx_arp_src_ip ${rx_arp_src_ip}
186 | | ... | --rx_arp_dst_ip ${rx_arp_dst_ip}
187 | | Run Traffic Script On Node | send_icmp_check_arp.py | ${tg_node} | ${args}
189 | Send TCP or UDP packet and verify received packet
190 | | [Documentation] | Sends TCP or UDP packet with specified source\
191 | | ... | and destination port.
193 | | ... | *Arguments:*
195 | | ... | _NOTE:_ Arguments are based on topology:
196 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
198 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
199 | | ... | - src_ip - IP of source interface (TG-if1). Type: integer
200 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer
201 | | ... | - tx_port - Source interface (TG-if1). Type: string
202 | | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string
203 | | ... | - rx_port - Destionation interface (TG-if1). Type: string
204 | | ... | - rx_mac - MAC address of destination interface (TG-if1). Type: string
205 | | ... | - protocol - Type of protocol. Type: string
206 | | ... | - source_port - Source TCP/UDP port. Type: string or integer
207 | | ... | - destination_port - Destination TCP/UDP port. Type: string or integer
210 | | ... | - No value returned
214 | | ... | \| Send TCP or UDP packet and verify received packet \
215 | | ... | \| ${nodes['TG']} \| 16.0.0.1 \| 32.0.0.1 \| eth2 \
216 | | ... | \| 08:00:27:cc:4f:54 \| eth4 \| 08:00:27:c9:6a:d5 \| TCP \| 20 \
219 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} | ${tx_mac}
220 | | ... | ${rx_port} | ${rx_mac} | ${protocol} | ${source_port}
221 | | ... | ${destination_port}
223 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port}
224 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
225 | | ${args}= | Catenate | --tx_mac ${tx_mac} | --rx_mac ${rx_mac}
226 | | ... | --src_ip ${src_ip} | --dst_ip ${dst_ip}
227 | | ... | --tx_if ${tx_port_name} | --rx_if ${rx_port_name}
228 | | ... | --protocol ${protocol} | --source_port ${source_port}
229 | | ... | --destination_port ${destination_port}
230 | | Run Traffic Script On Node | send_tcp_udp.py
231 | | ... | ${tg_node} | ${args}
233 | TCP or UDP packet transmission should fail
234 | | [Documentation] | Sends TCP or UDP packet with specified source\
235 | | ... | and destination port.
237 | | ... | *Arguments:*
239 | | ... | _NOTE:_ Arguments are based on topology:
240 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
242 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
243 | | ... | - src_ip - IP of source interface (TG-if1). Type: integer
244 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer
245 | | ... | - tx_port - Source interface (TG-if1). Type: string
246 | | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string
247 | | ... | - rx_port - Destionation interface (TG-if1). Type: string
248 | | ... | - rx_mac - MAC address of destination interface (TG-if1). Type: string
249 | | ... | - protocol - Type of protocol. Type: string
250 | | ... | - source_port - Source TCP/UDP port. Type: string or integer
251 | | ... | - destination_port - Destination TCP/UDP port. Type: string or integer
254 | | ... | - No value returned
258 | | ... | \| TCP or UDP packet transmission should fail \| ${nodes['TG']} \
259 | | ... | \| 16.0.0.1 \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \
260 | | ... | \| eth4 \| 08:00:27:c9:6a:d5 \| TCP \| 20 \| 80 \|
262 | | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} | ${tx_mac}
263 | | ... | ${rx_port} | ${rx_mac} | ${protocol} | ${source_port}
264 | | ... | ${destination_port}
266 | | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port}
267 | | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
268 | | ${args}= | Catenate | --tx_mac ${tx_mac} | --rx_mac ${rx_mac}
269 | | ... | --src_ip ${src_ip} | --dst_ip ${dst_ip} | --tx_if ${tx_port_name}
270 | | ... | --rx_if ${rx_port_name} | --protocol ${protocol}
271 | | ... | --source_port ${source_port} | --destination_port ${destination_port}
272 | | Run Keyword And Expect Error | TCP/UDP Rx timeout
273 | | ... | Run Traffic Script On Node | send_tcp_udp.py
274 | | ... | ${tg_node} | ${args}
276 | Receive and verify router advertisement packet
277 | | [Documentation] | Wait until RA packet is received and then verify\
278 | | ... | specific fields of received RA packet.
280 | | ... | *Arguments:*
282 | | ... | - node - Node where to check for RA packet. Type: dictionary
283 | | ... | - rx_port - Interface where the packet is received. Type: string
284 | | ... | - src_mac - MAC address of source interface from which the link-local\
285 | | ... | IPv6 address is constructed and checked. Type: string
286 | | ... | - interval - Configured retransmit interval. Optional. Type: integer
289 | | ... | - No value returned
293 | | ... | \| Receive and verify router advertisement packet \
294 | | ... | \| ${nodes['DUT1']} \| eth2 \| 08:00:27:cc:4f:54 \|
296 | | [Arguments] | ${node} | ${rx_port} | ${src_mac} | ${interval}=${0}
298 | | ${rx_port_name}= | Get interface name | ${node} | ${rx_port}
299 | | ${args}= | Catenate | --rx_if ${rx_port_name} | --src_mac ${src_mac}
300 | | ... | --interval ${interval}
301 | | Run Traffic Script On Node | check_ra_packet.py | ${node} | ${args}
303 | Send router solicitation and verify response
304 | | [Documentation] | Send RS packet, wait for response and then verify\
305 | | ... | specific fields of received RA packet.
307 | | ... | *Arguments:*
309 | | ... | - tg_node - TG node to send RS packet from. Type: dictionary
310 | | ... | - dut_node - DUT node to send RS packet to. Type: dictionary
311 | | ... | - rx_port - Interface where the packet is sent from. Type: string
312 | | ... | - tx_port - Interface where the packet is sent to. Type: string
313 | | ... | - src_ip - Source IP address of RS packet. Optional. If not provided,\
314 | | ... | link local address will be used. Type: string
317 | | ... | - No value returned
321 | | ... | \| Send router solicitation and verify response \
322 | | ... | \| ${nodes['TG']} \| ${nodes['DUT1']} \| eth2 \
323 | | ... | \| GigabitEthernet0/8/0 \| 10::10 \|
325 | | [Arguments] | ${tg_node} | ${dut_node} | ${tx_port} | ${rx_port}
326 | | ... | ${src_ip}=''
328 | | ${src_mac}= | Get Interface Mac | ${tg_node} | ${tx_port}
329 | | ${dst_mac}= | Get Interface Mac | ${dut_node} | ${rx_port}
330 | | ${src_int_name}= | Get interface name | ${tg_node} | ${tx_port}
331 | | ${dst_int_name}= | Get interface name | ${dut_node} | ${rx_port}
332 | | ${args}= | Catenate | --rx_if ${dst_int_name} | --tx_if ${src_int_name}
333 | | ... | --src_mac ${src_mac} | --dst_mac ${dst_mac} | --src_ip ${src_ip}
334 | | Run Traffic Script On Node | send_rs_check_ra.py
335 | | ... | ${tg_node} | ${args}
338 | | [Documentation] | Send ARP Request and check if the ARP Response is\
341 | | ... | *Arguments:*
343 | | ... | _NOTE:_ Arguments are based on topology:
344 | | ... | TG(if1)<->(if1)DUT
346 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
347 | | ... | - tx_port - Interface from which the ARP packet is sent (TG-if1).
348 | | ... | Type: string
349 | | ... | - src_mac - Source MAC address of ARP packet (TG-if1).
350 | | ... | Type: string
351 | | ... | - tgt_mac - Target MAC address which is expected in the response
352 | | ... | (DUT-if1). Type: string
353 | | ... | - src_ip - Source IP address of ARP packet (TG-if1).
354 | | ... | Type: string
355 | | ... | - tgt_ip - Target IP address of ARP packet (DUT-if1).
356 | | ... | Type: string
359 | | ... | - No value returned
363 | | ... | \| Send ARP Request \| ${nodes['TG']} \| eth3 \
364 | | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:c9:6a:d5 \
365 | | ... | \| 10.0.0.100 \| 192.168.1.5 \|
367 | | [Arguments] | ${tg_node} | ${tx_port} | ${src_mac} | ${tgt_mac} | ${src_ip}
370 | | ${args}= | Catenate | --tx_if ${tx_port} | --src_mac ${src_mac}
371 | | ... | --dst_mac ${tgt_mac} | --src_ip ${src_ip} | --dst_ip ${tgt_ip}
372 | | Run Traffic Script On Node | arp_request.py | ${tg_node} | ${args}
374 | ARP request should fail
375 | | [Documentation] | Send ARP Request and the ARP Response should not\
376 | | ... | be received.
378 | | ... | *Arguments:*
380 | | ... | _NOTE:_ Arguments are based on topology:
381 | | ... | TG(if1)<->(if1)DUT
383 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
384 | | ... | - tx_port - Interface from which the ARP packet is sent (TG-if1).
385 | | ... | Type: string
386 | | ... | - src_mac - Source MAC address of ARP packet (TG-if1).
387 | | ... | Type: string
388 | | ... | - tgt_mac - Target MAC address which is expected in the response
389 | | ... | (DUT-if1). Type: string
390 | | ... | - src_ip - Source IP address of ARP packet (TG-if1).
391 | | ... | Type: string
392 | | ... | - tgt_ip - Target IP address of ARP packet (DUT-if1).
393 | | ... | Type: string
396 | | ... | - No value returned
400 | | ... | \| ARP request should fail \| ${nodes['TG']} \| eth3 \
401 | | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:c9:6a:d5 \
402 | | ... | \| 10.0.0.100 \| 192.168.1.5 \|
404 | | [Arguments] | ${tg_node} | ${tx_port} | ${src_mac} | ${tgt_mac} | ${src_ip}
407 | | ${args}= | Catenate | --tx_if ${tx_port} | --src_mac ${src_mac}
408 | | ... | --dst_mac ${tgt_mac} | --src_ip ${src_ip} | --dst_ip ${tgt_ip}
409 | | Run Keyword And Expect Error | ARP reply timeout
410 | | ... | Run Traffic Script On Node | arp_request.py | ${tg_node} | ${args}
412 | Send packets and verify multipath routing
413 | | [Documentation] | Send 100 IP ICMP packets traffic and check if it is\
414 | | ... | divided into two paths.
416 | | ... | *Arguments:*
418 | | ... | _NOTE:_ Arguments are based on topology:
419 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
421 | | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
422 | | ... | - src_port - Interface of TG-if1. Type: string
423 | | ... | - dst_port - Interface of TG-if2. Type: string
424 | | ... | - src_ip - IP of source interface (TG-if1). Type: string
425 | | ... | - dst_ip - IP of destination interface (TG-if2). Type: string
426 | | ... | - tx_src_mac - MAC address of TG-if1. Type: string
427 | | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
428 | | ... | - rx_src_mac - MAC address of DUT-if2. Type: string
429 | | ... | - rx_dst_mac_1 - MAC address of interface for path 1. Type: string
430 | | ... | - rx_dst_mac_2 - MAC address of interface for path 2. Type: string
433 | | ... | - No value returned
437 | | ... | \| Send Packet And Check Multipath Routing \| ${nodes['TG']} \
438 | | ... | \| eth2 \| eth3 \| 16.0.0.1 \| 32.0.0.1 \
439 | | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:c9:6a:d5 \| 08:00:27:54:59:f9 \
440 | | ... | \| 02:00:00:00:00:02 \| 02:00:00:00:00:03 \|
442 | | [Arguments] | ${tg_node} | ${src_port} | ${dst_port} | ${src_ip} | ${dst_ip}
443 | | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_src_mac} | ${rx_dst_mac_1}
444 | | ... | ${rx_dst_mac_2}
446 | | ${src_port_name}= | Get interface name | ${tg_node} | ${src_port}
447 | | ${dst_port_name}= | Get interface name | ${tg_node} | ${dst_port}
448 | | ${args}= | Catenate | --tx_if ${src_port_name}
449 | | ... | --rx_if ${dst_port_name} | --src_ip ${src_ip} | --dst_ip ${dst_ip}
450 | | ... | --tg_if1_mac ${tx_src_mac} | --dut_if1_mac ${tx_dst_mac}
451 | | ... | --dut_if2_mac ${rx_src_mac} | --path_1_mac ${rx_dst_mac_1}
452 | | ... | --path_2_mac ${rx_dst_mac_2}
453 | | Run Traffic Script On Node | send_icmp_check_multipath.py | ${tg_node}
456 | Send IPv4 ping packet and verify headers
457 | | [Documentation] | Send ICMP Echo Request message from source port of source\
458 | | ... | node to destination port of destination node and check the received\
459 | | ... | ICMP Echo Reply message for correctness inlcuding source and\
460 | | ... | destination IPv4 and MAC addresses and ttl value. If the destination\
461 | | ... | node is TG type the ttl of received ICMP Echo Request message is\
462 | | ... | checked too and corresponding ICMP Echo Reply message is created.
464 | | ... | *Arguments:*
466 | | ... | _NOTE:_ Arguments are based on topology:
467 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
469 | | ... | - tx_node - Source node to execute scripts on (mostly TG).
470 | | ... | Type: dictionary
471 | | ... | - tx_port - Source interface of tx_node. Type: string
472 | | ... | - rx_node - Destinantion node. Type: dictionary
473 | | ... | - rx_port - Destination interface of rx_node. Type: string
474 | | ... | - src_ip - IP address of source interface or source remote host.
475 | | ... | Type: string
476 | | ... | - dst_ip - IP address of destination interface or destination remote
477 | | ... | host. Type: string
478 | | ... | - first_hop_mac - Destination MAC address for the first hop in
479 | | ... | the path. Type: string
480 | | ... | - hops - Expected number of hops. Type: string or integer
483 | | ... | - No value returned
487 | | ... | \| Send IPv4 ping packet and verify headers \| ${nodes['TG']} \
488 | | ... | \| eth2 \| ${nodes['DUT1']} \| eth3 \| 16.0.0.1 \| 32.0.0.1 \
489 | | ... | \| 08:00:27:cc:4f:54 \| 1 \|
491 | | [Arguments] | ${tx_node} | ${tx_port} | ${rx_node} | ${rx_port}
492 | | ... | ${src_ip} | ${dst_ip} | ${first_hop_mac} | ${hops}
494 | | ${src_mac}= | Get interface MAC | ${tx_node} | ${tx_port}
495 | | ${dst_mac}= | Get interface MAC | ${rx_node} | ${rx_port}
496 | | ${is_dst_tg}= | Is TG node | ${rx_node}
497 | | ${tx_port_name}= | Get interface name | ${tx_node} | ${tx_port}
498 | | ${rx_port_name}= | Get interface name | ${rx_node} | ${rx_port}
499 | | ${args}= | Traffic Script Gen Arg | ${rx_port_name} | ${tx_port_name}
500 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
501 | | ${args}= | Catenate | ${args} | --hops ${hops}
502 | | ... | --first_hop_mac ${first_hop_mac} | --is_dst_tg ${is_dst_tg}
503 | | Run Traffic Script On Node | ipv4_ping_ttl_check.py | ${tx_node} | ${args}
505 | Send IPv6 echo request packet and verify headers
506 | | [Documentation] | Send ICMPv6 Echo Request message from source port of\
507 | | ... | source node to destination port of destination node and check\
508 | | ... | the received ICMPv6 Echo Reply message for correctness inlcuding\
509 | | ... | source and destination IPv4 and MAC addresses and hlim value. If\
510 | | ... | the destination node is TG type the hlim of received ICMP Echo\
511 | | ... | Request message is checked too and corresponding ICMP Echo Reply\
512 | | ... | message is created and sent.
514 | | ... | *Arguments:*
516 | | ... | _NOTE:_ Arguments are based on topology:
517 | | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
519 | | ... | - tx_node - Source node to execute scripts on (mostly TG).
520 | | ... | Type: dictionary
521 | | ... | - tx_port - Source interface of tx_node. Type: string
522 | | ... | - rx_node - Destinantion node. Type: dictionary
523 | | ... | - rx_port - Destination interface of rx_node. Type: string
524 | | ... | - src_ip - IPv6 address of source interface or source remote host.
525 | | ... | Type: string
526 | | ... | - dst_ip - IPv6 address of destination interface or destination remote
527 | | ... | host. Type: string
528 | | ... | - src_nh_mac - Destination MAC address for the first hop in
529 | | ... | the path in direction from source node. Type: string
530 | | ... | - hops - Expected number of hops. Type: string or integer
531 | | ... | - dst_nh_mac - Destination MAC address for the first hop in
532 | | ... | the path in direction from destination node (Optional). Type: string
535 | | ... | - No value returned
539 | | ... | \| Send IPv6 echo request packet and verify headers \
540 | | ... | \| ${nodes['TG']} \| eth2 \| ${nodes['DUT1']} \| eth3 \| 3ffe:5f::1 \
541 | | ... | \| 3ffe:5f::2 \| 08:00:27:cc:4f:54 \| 1 \|
543 | | [Arguments] | ${tx_node} | ${tx_port} | ${rx_node} | ${rx_port} | ${src_ip}
544 | | ... | ${dst_ip} | ${src_nh_mac} | ${hops} | ${dst_nh_mac}=${NONE}
546 | | ${src_mac}= | Get interface MAC | ${tx_node} | ${tx_port}
547 | | ${dst_mac}= | Get interface MAC | ${rx_node} | ${rx_port}
548 | | ${is_dst_tg}= | Is TG node | ${rx_node}
549 | | ${tx_port_name}= | Get interface name | ${tx_node} | ${tx_port}
550 | | ${rx_port_name}= | Get interface name | ${rx_node} | ${rx_port}
551 | | ${args}= | Traffic Script Gen Arg | ${rx_port_name} | ${tx_port_name}
552 | | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
553 | | ${args}= | Catenate | ${args} | --h_num ${hops} | --src_nh_mac ${src_nh_mac}
554 | | ... | --dst_nh_mac ${dst_nh_mac} | --is_dst_tg ${is_dst_tg}
555 | | Run Traffic Script On Node | icmpv6_echo_req_resp.py | ${tx_node} | ${args}