Remove _base from test suite dir names
[csit.git] / tests / func / ipv4 / eth2p-ethip4-ip4base-ip4proxyarp-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/default.robot
16 | Resource | resources/libraries/robot/interfaces.robot
17 | Resource | resources/libraries/robot/testing_path.robot
18 | Resource | resources/libraries/robot/ipv4.robot
19 | Resource | resources/libraries/robot/traffic.robot
20 | Library | resources.libraries.python.Trace
21 | Library | resources.libraries.python.ProxyArp
22 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO
23 | Test Setup | Func Test Setup
24 | Test Teardown | Func Test Teardown
25 | Documentation | *RFC1027 Proxy ARP test cases*
26 | ...
27 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with
28 | ... | single link between nodes.
29 | ... | *[Cfg] DUT configuration:* DUT1 is configured with Proxy ARP
30 | ... | *[Ver] TG verification:* Test ARP Request packet is sent
31 | ... | from TG on link to DUT1; on receive TG verifies ARP reply packet
32 | ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
33 | ... | *[Ref] Applicable standard specifications:* RFC1027.
34
35 *** Variables ***
36 | ${tg_to_dut1_ip}= | 10.0.0.100
37 | ${dut1_to_tg_ip}= | 10.0.0.1
38 | ${prefix_length}= | 24
39 | ${lo_ip4_addr}= | 192.168.1.2
40 | ${hi_ip4_addr}= | 192.168.1.10
41 | ${pass_test_ip}= | 192.168.1.5
42 | ${pass_test_lo_ip}= | 192.168.1.2
43 | ${pass_test_hi_ip}= | 192.168.1.10
44 | ${fail_test_lo_ip}= | 192.168.1.1
45 | ${fail_test_hi_ip}= | 192.168.1.11
46
47 *** Test Cases ***
48 | TC01: DUT sends ARP reply on behalf of another machine from the IP range
49 | | [Documentation]
50 | | ... | [Top] TG-DUT1.
51 | | ... | [Ref] RFC1027.
52 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
53 | | ... | for IP range.
54 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
55 | | ... | verify if DUT1 sends correct ARP reply on behalf of machine which
56 | | ... | IP is in range.
57 | | Given Path for 3-node testing is set
58 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
59 | | And Interfaces in 3-node path are up
60 | | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg}
61 | | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1}
62 | | When Set Interface Address | ${dut1_node}
63 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
64 | | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr}
65 | | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name}
66 | | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name}
67 | | ...                   | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
68 | | ...                   | ${tg_to_dut1_ip} | ${pass_test_ip}
69
70 | TC02: DUT sends ARP reply on behalf of another machine from beginning of the IP range
71 | | [Documentation]
72 | | ... | [Top] TG-DUT1.
73 | | ... | [Ref] RFC1027.
74 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
75 | | ... | for IP range.
76 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
77 | | ... | verify if DUT1 sends correct ARP reply on behalf of machine which
78 | | ... | IP is from beginning of the IP range.
79 | | Given Path for 3-node testing is set
80 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
81 | | And Interfaces in 3-node path are up
82 | | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg}
83 | | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1}
84 | | When Set Interface Address | ${dut1_node}
85 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
86 | | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr}
87 | | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name}
88 | | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name}
89 | | ...                   | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
90 | | ...                   | ${tg_to_dut1_ip} | ${pass_test_lo_ip}
91
92 | TC03: DUT sends ARP reply on behalf of another machine from end of the IP range
93 | | [Documentation]
94 | | ... | [Top] TG-DUT1.
95 | | ... | [Ref] RFC1027.
96 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
97 | | ... | for IP range.
98 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
99 | | ... | verify if DUT1 sends correct ARP reply on behalf of machine which
100 | | ... | IP is from end of the IP range.
101 | | Given Path for 3-node testing is set
102 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
103 | | And Interfaces in 3-node path are up
104 | | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg}
105 | | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1}
106 | | When Set Interface Address | ${dut1_node}
107 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
108 | | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr}
109 | | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name}
110 | | Then Send ARP Request | ${tg_node} | ${tg_to_dut1_name}
111 | | ...                   | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
112 | | ...                   | ${tg_to_dut1_ip} | ${pass_test_hi_ip}
113
114 | TC04: DUT does not send ARP reply on behalf of another machine from below of the IP range
115 | | [Documentation]
116 | | ... | [Top] TG-DUT1.
117 | | ... | [Ref] RFC1027.
118 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
119 | | ... | for IP range.
120 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
121 | | ... | verify if DUT1 does not send ARP reply on behalf of machine which
122 | | ... | IP is from below of the IP range.
123 | | Given Path for 3-node testing is set
124 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
125 | | And Interfaces in 3-node path are up
126 | | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg}
127 | | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1}
128 | | When Set Interface Address | ${dut1_node}
129 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
130 | | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr}
131 | | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name}
132 | | Then Send ARP Request should failed | ${tg_node} | ${tg_to_dut1_name}
133 | | ...                                 | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
134 | | ...                                 | ${tg_to_dut1_ip} | ${fail_test_lo_ip}
135
136 | TC05: DUT does not send ARP reply on behalf of another machine from above of the IP range
137 | | [Documentation]
138 | | ... | [Top] TG-DUT1.
139 | | ... | [Ref] RFC1027.
140 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
141 | | ... | for IP range.
142 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
143 | | ... | verify if DUT1 does not send ARP reply on behalf of machine which
144 | | ... | IP is from above of the IP range.
145 | | Given Path for 3-node testing is set
146 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
147 | | And Interfaces in 3-node path are up
148 | | ${dut1_to_tg_name}= | Get interface name | ${dut1_node} | ${dut1_to_tg}
149 | | ${tg_to_dut1_name}= | Get interface name | ${tg_node} | ${tg_to_dut1}
150 | | When Set Interface Address | ${dut1_node}
151 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
152 | | And Vpp Add Proxy ARP | ${dut1_node} | ${lo_ip4_addr} | ${hi_ip4_addr}
153 | | And Vpp Proxy ARP Interface Enable | ${dut1_node} | ${dut1_to_tg_name}
154 | | Then Send ARP Request should failed | ${tg_node} | ${tg_to_dut1_name}
155 | | ...                                 | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
156 | | ...                                 | ${tg_to_dut1_ip} | ${fail_test_hi_ip}