CSIT-224 Update T-rex version to v2.06
[csit.git] / tests / func / 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_adjacency.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_adjacency/lisp_static_adjacency.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 adjacency 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 static adjacencies. [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_to_dut2_ip4_static_adjacency}
86 | |      ... | ${dut2_to_dut1_ip4_static_adjacency}
87 | | Then Send Packet And Check Headers
88 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
89 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
90 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
91 | | And Send Packet And Check Headers
92 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
93 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
94 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
95
96 | TC02: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv6 tunnel
97 | | [Documentation]
98 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-LISP-IPv6-ICMPv6 on \
99 | | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2
100 | | ... | configure IPv6 LISP static adjacencies. [Ver] Make TG send
101 | | ... | ICMPv6 Echo Req between its interfaces across both DUTs and LISP
102 | | ... | tunnel between them; verify IPv4 headers on received packets are
103 | | ... | correct. [Ref] RFC6830.
104 | | [Tags] | EXPECTED_FAILING
105 | | Given Path for 3-node testing is set
106 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
107 | | And   Interfaces in 3-node path are up
108 | | And   IP addresses are set on interfaces
109 | |       ... | ${dut1_node} | ${dut1_to_dut2}
110 | |       ... | ${dut1_to_dut2_ip6} | ${prefix6}
111 | |       ... | ${dut1_node} | ${dut1_to_tg}
112 | |       ... | ${dut1_to_tg_ip6} | ${prefix6}
113 | |       ... | ${dut2_node} | ${dut2_to_dut1}
114 | |       ... | ${dut2_to_dut1_ip6} | ${prefix6}
115 | |       ... | ${dut2_node} | ${dut2_to_tg}
116 | |       ... | ${dut2_to_tg_ip6} | ${prefix6}
117 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6}
118 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6}
119 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6}
120 | |       ... | ${tg_to_dut2_mac}
121 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6}
122 | |       ... | ${tg_to_dut1_mac}
123 | | When Set up Lisp topology
124 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
125 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
126 | |      ... | ${duts_locator_set} | ${dut1_ip6_eid} | ${dut2_ip6_eid}
127 | |      ... | ${dut1_to_dut2_ip6_static_adjacency}
128 | |      ... | ${dut2_to_dut1_ip6_static_adjacency}
129 | | Then Send Packet And Check Headers
130 | |      ... | ${tg_node} | ${tg1_ip6} | ${tg2_ip6}
131 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
132 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
133 | | And Send Packet And Check Headers
134 | |      ... | ${tg_node} | ${tg2_ip6} | ${tg1_ip6}
135 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
136 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
137
138 | TC03: DUT1 and DUT2 route IPv4 bidirectionally over LISPoIPv6 tunnel
139 | | [Documentation]
140 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-LISP-IPv4-ICMPv4 on \
141 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 and DUT2
142 | | ... | configure IPv6 LISP static adjacencies. [Ver] Make TG send
143 | | ... | ICMPv4 Echo Req between its interfaces across both DUTs and LISP
144 | | ... | tunnel between them; verify IPv4 headers on received packets are
145 | | ... | correct. [Ref] RFC6830.
146 | | [Tags] | EXPECTED_FAILING
147 | | Given Path for 3-node testing is set
148 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
149 | | And   Interfaces in 3-node path are up
150 | | And   IP addresses are set on interfaces
151 | |       ... | ${dut1_node} | ${dut1_to_dut2}
152 | |       ... | ${dut1_to_dut2_ip4o6} | ${dut_prefix4o6}
153 | |       ... | ${dut1_node} | ${dut1_to_tg}
154 | |       ... | ${dut1_to_tg_ip4o6} | ${tg_prefix4o6}
155 | |       ... | ${dut2_node} | ${dut2_to_dut1}
156 | |       ... | ${dut2_to_dut1_ip4o6} | ${dut_prefix4o6}
157 | |       ... | ${dut2_node} | ${dut2_to_tg}
158 | |       ... | ${dut2_to_tg_ip4o6} | ${tg_prefix4o6}
159 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4o6}
160 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4o6}
161 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4o6}
162 | |       ... | ${tg_to_dut2_mac}
163 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4o6}
164 | |       ... | ${tg_to_dut1_mac}
165 | | When Set up Lisp topology
166 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
167 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
168 | |      ... | ${duts_locator_set} | ${dut1_ip4o6_eid} | ${dut2_ip4o6_eid}
169 | |      ... | ${dut1_ip4o6_static_adjacency} | ${dut2_ip4o6_static_adjacency}
170 | | Then Send Packet And Check Headers
171 | |      ... | ${tg_node} | ${tg1_ip4o6} | ${tg2_ip4o6}
172 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
173 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
174 | | And Send Packet And Check Headers
175 | |      ... | ${tg_node} | ${tg2_ip4o6} | ${tg1_ip4o6}
176 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
177 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
178
179 | TC04: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel
180 | | [Documentation]
181 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on \
182 | | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 and DUT2
183 | | ... | configure IPv4 LISP static adjacencies. [Ver] Make TG send
184 | | ... | ICMPv6 Echo Req between its interfaces across both DUTs and LISP
185 | | ... | tunnel between them; verify IPv4 headers on received packets are
186 | | ... | correct. [Ref] RFC6830.
187 | | [Tags] | EXPECTED_FAILING
188 | | Given Path for 3-node testing is set
189 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
190 | | And   Interfaces in 3-node path are up
191 | | And   IP addresses are set on interfaces
192 | |       ... | ${dut1_node} | ${dut1_to_dut2}
193 | |       ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4}
194 | |       ... | ${dut1_node} | ${dut1_to_tg}
195 | |       ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4}
196 | |       ... | ${dut2_node} | ${dut2_to_dut1}
197 | |       ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4}
198 | |       ... | ${dut2_node} | ${dut2_to_tg}
199 | |       ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4}
200 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4}
201 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4}
202 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4}
203 | |       ... | ${tg_to_dut2_mac}
204 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4}
205 | |       ... | ${tg_to_dut1_mac}
206 | | When Set up Lisp topology
207 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
208 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
209 | |      ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid}
210 | |      ... | ${dut1_ip6o4_static_adjacency} | ${dut2_ip6o4_static_adjacency}
211 | | Then Send Packet And Check Headers
212 | |      ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
213 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
214 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
215 | | And Send Packet And Check Headers
216 | |      ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
217 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
218 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
219
220 | TC05: DUT1 and DUT2 route IPv4 over LISPoIPv4 tunnel after disable-enable
221 | | [Documentation]
222 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-LISP-IPv4-ICMPv4 on \
223 | | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg1] On DUT1 and DUT2
224 | | ... | configure IPv4 LISP static adjacencies. [Ver1] Make TG send
225 | | ... | ICMPv4 Echo Req between its interfaces across both DUTs and LISP
226 | | ... | tunnel between them; verify IPv4 headers on received packets are
227 | | ... | correct. [Cfg2] Disable LISP. [Ver2] verify packets are not
228 | | ... | received via LISP tunnel. [Cfg3] Re-enable LISP. [Ver3] verify
229 | | ... | packets are received again via LISP tunnel. [Ref] RFC6830.
230 | | [Tags] | EXPECTED_FAILING
231 | | Given Path for 3-node testing is set
232 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
233 | | And   Interfaces in 3-node path are up
234 | | And   IP addresses are set on interfaces
235 | |       ... | ${dut1_node} | ${dut1_to_dut2}
236 | |       ... | ${dut1_to_dut2_ip4} | ${prefix4}
237 | |       ... | ${dut1_node} | ${dut1_to_tg}
238 | |       ... | ${dut1_to_tg_ip4} | ${prefix4}
239 | |       ... | ${dut2_node} | ${dut2_to_dut1}
240 | |       ... | ${dut2_to_dut1_ip4} | ${prefix4}
241 | |       ... | ${dut2_node} | ${dut2_to_tg}
242 | |       ... | ${dut2_to_tg_ip4} | ${prefix4}
243 | | And   VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
244 | | And   VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
245 | | And   Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
246 | |       ... | ${tg_to_dut2_mac}
247 | | And   Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
248 | |       ... | ${tg_to_dut1_mac}
249 | | When Set up Lisp topology
250 | |      ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
251 | |      ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
252 | |      ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
253 | |      ... | ${dut1_to_dut2_ip4_static_adjacency}
254 | |      ... | ${dut2_to_dut1_ip4_static_adjacency}
255 | | Then Send Packet And Check Headers
256 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
257 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
258 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
259 | | And Send Packet And Check Headers
260 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
261 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
262 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
263 | | When Disable Lisp | ${dut1_node}
264 | | Then Send packet from Port to Port should failed
265 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
266 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
267 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
268 | | And Send packet from Port to Port should failed
269 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
270 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
271 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
272 | | When Enable Lisp | ${dut1_node}
273 | | Then Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers
274 | |      ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
275 | |      ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
276 | |      ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
277 | | And Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers
278 | |      ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
279 | |      ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
280 | |      ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}