FIB table add/delete
[csit.git] / tests / vpp / func / ip4 / eth2p-ethip4-ip4base-ip4arp-func.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/shared/default.robot
16 | Resource | resources/libraries/robot/shared/counters.robot
17 | Resource | resources/libraries/robot/shared/interfaces.robot
18 | Resource | resources/libraries/robot/shared/testing_path.robot
19 | Resource | resources/libraries/robot/ip/ip4.robot
20 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
21 | Resource | resources/libraries/robot/shared/traffic.robot
22 | Library | resources.libraries.python.Trace
23 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
24 | Test Setup | Set up functional test
25 | Test Teardown | Tear down functional test
26 | Documentation | *IPv4 ARP test cases*
27 | ...
28 | ... | RFC826 ARP: Eth-IPv4 and Eth-ARP on links TG-DUT1, TG-DUT2, DUT1-DUT2:
29 | ... | IPv4 ARP tests use 3-node topology TG - DUT1 - DUT2 - TG with one link
30 | ... | between the nodes. DUT1 and DUT2 are configured with IPv4 routing and
31 | ... | static routes. DUT ARP functionality is tested by making TG send ICMPv4
32 | ... | Echo Requests towards its other interface via DUT1 and DUT2.
33
34 *** Variables ***
35 | ${dut1_to_tg_ip}= | 192.168.1.1
36 | ${dut1_to_dut2_ip}= | 192.168.2.1
37 | ${dut1_to_dut2_ip_GW}= | 192.168.2.2
38 | ${test_dst_ip}= | 32.0.0.1
39 | ${test_src_ip}= | 16.0.0.1
40 | ${prefix_length}= | 24
41
42 *** Test Cases ***
43 | TC01: DUT sends ARP Request for unresolved locally connected IPv4 address
44 | | [Documentation]
45 | | ... | Make TG send test packet destined to IPv4 address of its other\
46 | | ... | interface connected to DUT2. Make TG verify DUT2 sends ARP
47 | | ... | Request for locally connected TG IPv4 address.
48 | | Given Configure path in 3-node circular topology
49 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
50 | | And Set interfaces in 3-node circular topology up
51 | | And Configure L2XC
52 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
53 | | When Set Interface Address | ${dut1_node}
54 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
55 | | And Set Interface Address | ${dut1_node}
56 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
57 | | Then Send packet and verify ARP request | ${tg_node}
58 | | ... | ${test_src_ip} | ${dut1_to_dut2_ip_GW} | ${tg_to_dut1}
59 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
60 | | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW}
61
62 | TC02: DUT sends ARP Request for route next hop IPv4 address
63 | | [Documentation] |
64 | | ... | Make TG send test packet destined to IPv4 address matching\
65 | | ... | static route on DUT2. Make TG verify DUT2 sends ARP Request for
66 | | ... | next hop of the static route.
67 | | Given Configure path in 3-node circular topology
68 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
69 | | And Set interfaces in 3-node circular topology up
70 | | And Configure L2XC
71 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
72 | | When Set Interface Address | ${dut1_node}
73 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
74 | | And Set Interface Address | ${dut1_node}
75 | | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length}
76 | | And Vpp Route Add
77 | | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length}
78 | | ... | ${dut1_to_dut2_ip_GW} | ${dut1_to_dut2} | resolve_attempts=${NONE}
79 | | Then Send packet and verify ARP request | ${tg_node}
80 | | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1}
81 | | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac}
82 | | ... | ${dut1_to_dut2_ip} | ${dut1_to_dut2_ip_GW}

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.