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