CSIT-195: Update LISP test
[csit.git] / tests / suites / lisp / lisp_dataplane_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/testing_path.robot
17 | Resource | resources/libraries/robot/ipv4.robot
18 | Resource | resources/libraries/robot/traffic.robot
19 | Resource | resources/libraries/robot/lisp/lisp_static_mapping.robot
20 | Resource | resources/libraries/robot/l2_traffic.robot
21 | Library  | resources.libraries.python.IPUtil
22 | Library  | resources.libraries.python.Trace
23 | Library  | resources.libraries.python.IPv4Util.IPv4Util
24 # import additional Lisp settings from resource file
25 | Variables | resources/test_data/lisp/static_mapping/lisp_static_mapping.py
26 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
27 | ... | VM_ENV | HW_ENV
28 | Test Setup | Run Keywords | Setup all DUTs before test
29 | ...        | AND          | Setup all TGs before traffic script
30 | ...        | AND          | Update All Interface Data On All Nodes | ${nodes}
31 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
32 | ...           | AND          | Show vpp trace dump on all DUTs
33 | Documentation | *LISP static remote mapping test cases*
34 | ...
35 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
36 | ... | with single links between nodes.
37 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,
38 | ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel;
39 | ... | Eth-IPv6-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for
40 | ... | IPv6 routing over LISPoIPv6 tunnel; Eth-IPv6-LISP-IPv4-ICMPv4 on
41 | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv6
42 | ... | tunnel; Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on
43 | ... | TG-DUTn for IPv6 routing over LISPoIPv4 tunnel.
44 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4 (IPv6)
45 | ... | routing and static routes. LISPoIPv4 (oIPv6) tunnel is configured
46 | ... | between DUT1 and DUT2.
47 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets
48 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive
49 | ... | TG verifies packets for correctness and their IPv4 (IPv6) src-addr,
50 | ... | dst-addr and MAC addresses.
51 | ... | *[Ref] Applicable standard specifications:* RFC6830.
52
53 *** Test Cases ***
54 | TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISPoIPv4 tunnel
55 | | [Documentation]
56 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on \
57 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2
58 | | ... | configure IPv4 LISP remote static mappings. [Ver] Make TG send
59 | | ... | ICMPv4 Echo Req between its interfaces across both DUTs and LISP
60 | | ... | tunnel between them; verify IPv4 headers on received packets are
61 | | ... | correct. [Ref] RFC6830.
62 | | [Tags] | EXPECTED_FAILING
63 | | Given Path for 3-node testing is set
64 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
65 | | And   Interfaces in 3-node path are up
66 | | And   IP addresses are set on interfaces
67 | |       ... | ${dut1_node} | ${dut1_to_dut2}
68 | |       ... | ${dut1_to_dut2_ip4} | ${prefix4}
69 | |       ... | ${dut1_node} | ${dut1_to_tg}
70 | |       ... | ${dut1_to_tg_ip4} | ${prefix4}
71 | |       ... | ${dut2_node} | ${dut2_to_dut1}
72 | |       ... | ${dut2_to_dut1_ip4} | ${prefix4}
73 | |       ... | ${dut2_node} | ${dut2_to_tg}
74 | |       ... | ${dut2_to_tg_ip4} | ${prefix4}
75 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
76 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
77 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
78 | |       ... | ${tg_to_dut2_mac}
79 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
80 | |       ... | ${tg_to_dut1_mac}
81 | | When Set up Lisp topology
82 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
83 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
84 | |      ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
85 | |      ... | ${dut1_ip4_static_mapping} | ${dut2_ip4_static_mapping}
86 | | Then Send Packet And Check Headers
87 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
88 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
89 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
90 | | And Send Packet And Check Headers
91 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
92 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
93 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
94
95 | TC02: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv6 tunnel
96 | | [Documentation]
97 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-LISP-IPv6-ICMPv6 on \
98 | | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2
99 | | ... | configure IPv6 LISP remote static mappings. [Ver] Make TG send
100 | | ... | ICMPv6 Echo Req between its interfaces across both DUTs and LISP
101 | | ... | tunnel between them; verify IPv4 headers on received packets are
102 | | ... | correct. [Ref] RFC6830.
103 | | [Tags] | EXPECTED_FAILING
104 | | Given Path for 3-node testing is set
105 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
106 | | And   Interfaces in 3-node path are up
107 | | And   IP addresses are set on interfaces
108 | |       ... | ${dut1_node} | ${dut1_to_dut2}
109 | |       ... | ${dut1_to_dut2_ip6} | ${prefix6}
110 | |       ... | ${dut1_node} | ${dut1_to_tg}
111 | |       ... | ${dut1_to_tg_ip6} | ${prefix6}
112 | |       ... | ${dut2_node} | ${dut2_to_dut1}
113 | |       ... | ${dut2_to_dut1_ip6} | ${prefix6}
114 | |       ... | ${dut2_node} | ${dut2_to_tg}
115 | |       ... | ${dut2_to_tg_ip6} | ${prefix6}
116 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6}
117 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6}
118 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6}
119 | |       ... | ${tg_to_dut2_mac}
120 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6}
121 | |       ... | ${tg_to_dut1_mac}
122 | | When Set up Lisp topology
123 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
124 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
125 | |      ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid}
126 | |      ... | ${dut1_ip6_static_mapping} | ${dut2_ip6_static_mapping}
127 | | Then Send Packet And Check Headers
128 | |      ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6}
129 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
130 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
131 | | And Send Packet And Check Headers
132 | |      ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6}
133 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
134 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
135
136 | TC03: DUT1 and DUT2 route IPv4 bidirectionally over LISPoIPv6 tunnel
137 | | [Documentation]
138 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-LISP-IPv4-ICMPv4 on \
139 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2
140 | | ... | configure IPv6 LISP remote static mappings. [Ver] Make TG send
141 | | ... | ICMPv4 Echo Req between its interfaces across both DUTs and LISP
142 | | ... | tunnel between them; verify IPv4 headers on received packets are
143 | | ... | correct. [Ref] RFC6830.
144 | | [Tags] | EXPECTED_FAILING
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 | | And   IP addresses are set on interfaces
149 | |       ... | ${dut1_node} | ${dut1_to_dut2}
150 | |       ... | ${dut1_to_dut2_ip4o6} | ${dut_prefix4o6}
151 | |       ... | ${dut1_node} | ${dut1_to_tg}
152 | |       ... | ${dut1_to_tg_ip4o6} | ${tg_prefix4o6}
153 | |       ... | ${dut2_node} | ${dut2_to_dut1}
154 | |       ... | ${dut2_to_dut1_ip4o6} | ${dut_prefix4o6}
155 | |       ... | ${dut2_node} | ${dut2_to_tg}
156 | |       ... | ${dut2_to_tg_ip4o6} | ${tg_prefix4o6}
157 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4o6}
158 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4o6}
159 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4o6}
160 | |       ... | ${tg_to_dut2_mac}
161 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4o6}
162 | |       ... | ${tg_to_dut1_mac}
163 | | When Set up Lisp topology
164 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
165 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
166 | |      ... | ${duts_locator_set} | ${dut1_ip4o6_eid} | ${dut2_ip4o6_eid}
167 | |      ... | ${dut1_ip4o6_static_mapping} | ${dut2_ip4o6_static_mapping}
168 | | Then Send Packet And Check Headers
169 | |      ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6}
170 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
171 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
172 | | And Send Packet And Check Headers
173 | |      ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6}
174 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
175 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
176
177 | TC04: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel
178 | | [Documentation]
179 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on \
180 | | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2
181 | | ... | configure IPv4 LISP remote static mappings. [Ver] Make TG send
182 | | ... | ICMPv6 Echo Req between its interfaces across both DUTs and LISP
183 | | ... | tunnel between them; verify IPv4 headers on received packets are
184 | | ... | correct. [Ref] RFC6830.
185 | | [Tags] | EXPECTED_FAILING
186 | | Given Path for 3-node testing is set
187 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
188 | | And   Interfaces in 3-node path are up
189 | | And   IP addresses are set on interfaces
190 | |       ... | ${dut1_node} | ${dut1_to_dut2}
191 | |       ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4}
192 | |       ... | ${dut1_node} | ${dut1_to_tg}
193 | |       ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4}
194 | |       ... | ${dut2_node} | ${dut2_to_dut1}
195 | |       ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4}
196 | |       ... | ${dut2_node} | ${dut2_to_tg}
197 | |       ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4}
198 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4}
199 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4}
200 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4}
201 | |       ... | ${tg_to_dut2_mac}
202 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4}
203 | |       ... | ${tg_to_dut1_mac}
204 | | When Set up Lisp topology
205 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
206 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
207 | |      ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid}
208 | |      ... | ${dut1_ip6o4_static_mapping} | ${dut2_ip6o4_static_mapping}
209 | | Then Send Packet And Check Headers
210 | |      ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
211 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
212 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
213 | | And Send Packet And Check Headers
214 | |      ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
215 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
216 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
217
218 | TC05: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable
219 | | [Documentation]
220 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on \
221 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg1] On DUT1 and DUT2
222 | | ... | configure IPv4 LISP remote static mappings. [Ver1] Make TG send
223 | | ... | ICMPv4 Echo Req between its interfaces across both DUTs and LISP
224 | | ... | tunnel between them; verify IPv4 headers on received packets are
225 | | ... | correct. [Cfg2] Disable LISP. [Ver2] verify packets are not
226 | | ... | received via LISP tunnel. [Cfg3] Re-enable LISP. [Ver3] verify
227 | | ... | packets are received again via LISP tunnel. [Ref] RFC6830.
228 | | [Tags] | EXPECTED_FAILING
229 | | Given Path for 3-node testing is set
230 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
231 | | And   Interfaces in 3-node path are up
232 | | And   IP addresses are set on interfaces
233 | |       ... | ${dut1_node} | ${dut1_to_dut2}
234 | |       ... | ${dut1_to_dut2_ip4} | ${prefix4}
235 | |       ... | ${dut1_node} | ${dut1_to_tg}
236 | |       ... | ${dut1_to_tg_ip4} | ${prefix4}
237 | |       ... | ${dut2_node} | ${dut2_to_dut1}
238 | |       ... | ${dut2_to_dut1_ip4} | ${prefix4}
239 | |       ... | ${dut2_node} | ${dut2_to_tg}
240 | |       ... | ${dut2_to_tg_ip4} | ${prefix4}
241 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
242 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
243 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
244 | |       ... | ${tg_to_dut2_mac}
245 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
246 | |       ... | ${tg_to_dut1_mac}
247 | | When Set up Lisp topology
248 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
249 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
250 | |      ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
251 | |      ... | ${dut1_ip4_static_mapping} | ${dut2_ip4_static_mapping}
252 | | Then Send Packet And Check Headers
253 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
254 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
255 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
256 | | And Send Packet And Check Headers
257 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
258 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
259 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
260 | | When Disable Lisp | ${dut1_node}
261 | | Then Send packet from Port to Port should failed
262 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
263 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
264 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
265 | | And Send packet from Port to Port should failed
266 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
267 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
268 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
269 | | When Enable Lisp | ${dut1_node}
270 | | Then Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers
271 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
272 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
273 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
274 | | And Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers
275 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
276 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
277 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}