a387eed85fcfc9207e64da51ce85b3b9a454a382
[csit.git] / tests / func / ipv4 / ipv4_arp_untagged.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/counters.robot
17 | Resource | resources/libraries/robot/interfaces.robot
18 | Resource | resources/libraries/robot/testing_path.robot
19 | Resource | resources/libraries/robot/ipv4.robot
20 | Resource | resources/libraries/robot/l2_xconnect.robot
21 | Resource | resources/libraries/robot/traffic.robot
22 | Library | resources.libraries.python.Trace
23
24 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
25 | Suite Setup | Run Keywords | Setup all TGs before traffic script
26 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
27 | Test Setup | Setup all DUTs before test
28 | Test Teardown | Run Keyword If Test Failed | Run Keywords
29 | ... | Show packet trace on all DUTs | ${nodes} | AND
30 | ... | Show vpp trace dump on all DUTs
31 | Documentation | *IPv4 ARP test cases*
32 | ...
33 | ... | RFC826 ARP: Eth-IPv4 and Eth-ARP on links TG-DUT1, TG-DUT2, DUT1-DUT2:
34 | ... | IPv4 ARP tests use 3-node topology TG - DUT1 - DUT2 - TG with one link
35 | ... | between the nodes. DUT1 and DUT2 are configured with IPv4 routing and
36 | ... | static routes. DUT ARP functionality is tested by making TG send ICMPv4
37 | ... | Echo Requests towards its other interface via DUT1 and DUT2.
38
39 *** Variables ***
40 | ${dut1_to_tg_ip}= | 192.168.1.1
41 | ${dut1_to_dut2_ip}= | 192.168.2.1
42 | ${dut1_to_dut2_ip_GW}= | 192.168.2.2
43 | ${test_dst_ip}= | 32.0.0.1
44 | ${test_src_ip}= | 16.0.0.1
45 | ${prefix_length}= | 24
46
47 *** Test Cases ***
48 | TC01: DUT sends ARP Request for unresolved locally connected IPv4 address
49 | | [Documentation]
50 | | ... | Make TG send test packet destined to IPv4 address of its other\
51 | | ... | interface connected to DUT2. Make TG verify DUT2 sends ARP
52 | | ... | Request for locally connected TG IPv4 address.
53 | | Given Path for 3-node testing is set
54 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
55 | | And Interfaces in 3-node path are up
56 | | And L2 setup xconnect on DUT
57 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
58 | | When Set Interface Address | ${dut1_node}
59 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
60 | | And Set Interface Address | ${dut1_node}
61 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
62 | | Then Send Packet And Check ARP Request | ${tg_node}
63 | | ... | ${test_src_ip} | ${dut1_to_dut2_ip_GW} | ${tg_to_dut1}
64 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
65 | | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW}
66
67 | TC02: DUT sends ARP Request for route next hop IPv4 address
68 | | [Documentation] |
69 | | ... | Make TG send test packet destined to IPv4 address matching\
70 | | ... | static route on DUT2. Make TG verify DUT2 sends ARP Request for
71 | | ... | next hop of the static route.
72 | | Given Path for 3-node testing is set
73 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
74 | | And Interfaces in 3-node path are up
75 | | And L2 setup xconnect on DUT
76 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
77 | | When Set Interface Address | ${dut1_node}
78 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
79 | | And Set Interface Address | ${dut1_node}
80 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
81 | | And Vpp Route Add
82 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
83 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} | resolve_attempts=${NONE}
84 | | Then Send Packet And Check ARP Request | ${tg_node}
85 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1}
86 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
87 | | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW}