CSIT-23 Add ARP request test.
[csit.git] / tests / suites / 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 | Documentation | Check if VPP sends ARP request to unknown destinations.
16 | Resource | resources/libraries/robot/default.robot
17 | Resource | resources/libraries/robot/counters.robot
18 | Resource | resources/libraries/robot/interfaces.robot
19 | Resource | resources/libraries/robot/testing_path.robot
20 | Resource | resources/libraries/robot/ipv4.robot
21 | Resource | resources/libraries/robot/l2_xconnect.robot
22 | Resource | resources/libraries/robot/traffic.robot
23 | Library | resources.libraries.python.Trace
24
25 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
26 | Suite Setup | Run Keywords | Setup all TGs before traffic script
27 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
28 | Test Setup | Setup all DUTs before test
29 | Test Teardown | Show packet trace on all DUTs | ${nodes}
30
31 *** Variables ***
32 | ${dut1_to_tg_ip}= | 192.168.1.1
33 | ${dut1_to_dut2_ip}= | 192.168.2.1
34 | ${dut1_to_dut2_ip_GW}= | 192.168.2.2
35 | ${test_dst_ip}= | 32.0.0.1
36 | ${test_src_ip}= | 16.0.0.1
37 | ${prefix_length}= | 24
38
39 *** Test Cases ***
40 | VPP sends ARP requests for unknown destinations
41 | | [Documentation] | Setup IP addresses and route.
42 | | ...             | Send ICMP packet and check if VPP sends ARP request.
43 | | Given Path for 3-node testing is set
44 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
45 | | And Interfaces in 3-node path are up
46 | | And L2 setup xconnect on DUT
47 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
48 | | When Set Interface Address | ${dut1_node}
49 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
50 | | And Set Interface Address | ${dut1_node}
51 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
52 | | And Vpp Route Add
53 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
54 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2}
55 | | Then Send Packet And Check ARP Request | ${tg_node}
56 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1}
57 | | ... | ${tg_to_dut2_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
58 | | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW}