CSIT-1459: Migrate IP libraries from VAT to PAPI
[csit.git] / tests / vpp / func / ip4_tunnels / softwire / eth2p-ethip4--ethip6ip4-ip4base--ip6base-swiremape-func.robot
1 # Copyright (c) 2019 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
15 *** Settings ***
16 | Library  | resources.libraries.python.IPUtil
17 | Library  | resources.libraries.python.Trace
18 | ...
19 | Resource | resources/libraries/robot/ip/ip4.robot
20 | Resource | resources/libraries/robot/ip/ip6.robot
21 | Resource | resources/libraries/robot/ip/map.robot
22 | Resource | resources/libraries/robot/shared/default.robot
23 | Resource | resources/libraries/robot/shared/testing_path.robot
24 | ...
25 | Variables | resources/test_data/softwire/map_e_domains.py | ${5}
26 | ...
27 | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | SKIP_VPP_PATCH
28 | ... | SOFTWIRE
29 | ...
30 | Test Setup | Set up functional test
31 | ...
32 | Test Teardown | Tear down functional test
33 | ...
34 | Documentation | *Test for Basic mapping rule for MAP-E*\
35 | ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the
36 | ... | nodes.
37 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1.
38 | ... | Eth-IPv6-IPv4-UDP on TG-to-DUT-if2.
39 | ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG
40 | ... | interface and IPv6 address on second DUT-to-TG interface. MAP-E domain
41 | ... | is configured in test template based on test parameters.
42 | ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to
43 | ... | destination in MAP domain. IPv6 packets with encapsulated IPv4 are
44 | ... | received on TG interface.
45 | ... | *[Ref] Applicable standard specifications:* RFC7597.
46
47
48 *** Variables ***
49 | ${dut_ip4}= | 10.0.0.1
50 | ${dut_ip6}= | 2001:0::1
51 | ${dut_ip4_gw}= | 10.0.0.2
52 | ${dut_ip6_gw}= | 2001:0::2
53 | ${ipv4_prefix_len}= | 24
54 | ${ipv6_prefix_len}= | 64
55 | ${ipv6_br_src}= | 2001:db8:ffff::1
56 | ${ipv4_outside}= | 1.0.0.1
57
58
59 *** Test Cases ***
60 | TC01: BMR, then an IPv4 prefix is assigned
61 | | [Documentation]
62 | | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\
63 | | ... | IPv4 prefix length + ea bits length < 32 (o + r < 32)
64 | | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32
65 | | ...
66 | | ... | Arguments:
67 | | ...
68 | | ... | - ipv4_pfx
69 | | ... | - ipv6_pfx
70 | | ... | - ipv6_src
71 | | ... | - ea_bit_len
72 | | ... | - psid_offset
73 | | ... | - psid_len
74 | | ... | - ipv4_dst
75 | | ... | - dst_port
76 | | ... | - expected_ipv6_dst
77 | | ...
78 # TODO: replace setup when VPP-312 fixed
79 #| | [Setup] | Set Interfaces IP Addresses And Routes
80 | | [Setup] | Run Keywords
81 | | ... | Set up functional test | AND
82 | | ... | Set Interfaces IP Addresses And Routes
83 | | [Template] | Check MAP Configuration With Traffic Script
84 # |=================|===============|================|============|=============|==========|================|==========|==================================|
85 # | ipv4_pfx        | ipv6_pfx      | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port | expected_ipv6_dst                |
86 # |=================|===============|================|============|=============|==========|================|==========|==================================|
87 | | 20.0.0.0/8      | 2001:db8::/32 | ${ipv6_br_src} | ${4}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a000::14a0:0:0          |
88 | | 20.0.0.0/8      | 2001:db8::/32 | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a900::14a9:0:0          |
89 | | 20.0.0.0/8      | 2001:db8::/32 | ${ipv6_br_src} | ${10}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a9c0::14a9:c000:0       |
90 | | 20.0.0.0/8      | 2001:db8::/32 | ${ipv6_br_src} | ${16}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a9c9::14a9:c900:0       |
91 | | 20.0.0.0/8      | 2001:db8::/32 | ${ipv6_br_src} | ${20}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a9c9:d000:0:14a9:c9d0:0 |
92 | | 20.0.0.0/8      | 2001:db8::/32 | ${ipv6_br_src} | ${23}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a9c9:da00:0:14a9:c9da:0 |
93 | | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${4}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:d000::14a9:c9d0:0       |
94 | | 20.169.201.0/24 | 2001:db8::/32 | ${ipv6_br_src} | ${7}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:da00::14a9:c9da:0       |
95
96
97 | TC02: BMR, full IPv4 address is to be assigned
98 | | [Documentation]
99 | | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\
100 | | ... | IPv4 prefix length + ea bits length == 32 (o + r == 32)
101 | | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32
102 | | ...
103 | | ... | Arguments:
104 | | ...
105 | | ... | - ipv4_pfx
106 | | ... | - ipv6_pfx
107 | | ... | - ipv6_src
108 | | ... | - ea_bit_len
109 | | ... | - psid_offset
110 | | ... | - psid_len
111 | | ... | - ipv4_dst
112 | | ... | - dst_port
113 | | ... | - expected_ipv6_dst
114 | | ...
115 # TODO: replace setup when VPP-312 fixed
116 #| | [Setup] | Set Interfaces IP Addresses And Routes
117 | | [Setup] | Run Keywords
118 | | ... | Set up functional test | AND
119 | | ... | Set Interfaces IP Addresses And Routes
120 | | [Template] | Check MAP Configuration With Traffic Script
121 # |===================|===============|================|============|=============|==========|================|==========|==================================|
122 # | ipv4_pfx          | ipv6_pfx      | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port | expected_ipv6_dst                |
123 # |===================|===============|================|============|=============|==========|================|==========|==================================|
124 | | 20.0.0.0/8        | 2001:db8::/32 | ${ipv6_br_src} | ${24}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a9c9:db00:0:14a9:c9db:0 |
125 | | 20.160.0.0/12     | 2001:db8::/32 | ${ipv6_br_src} | ${20}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:9c9d:b000:0:14a9:c9db:0 |
126 | | 20.169.0.0/16     | 2001:db8::/32 | ${ipv6_br_src} | ${16}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:c9db::14a9:c9db:0       |
127 | | 20.169.200.0/22   | 2001:db8::/32 | ${ipv6_br_src} | ${10}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:76c0::14a9:c9db:0       |
128 | | 20.169.201.0/24   | 2001:db8::/32 | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:db00::14a9:c9db:0       |
129 | | 20.169.201.208/28 | 2001:db8::/32 | ${ipv6_br_src} | ${4}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:b000::14a9:c9db:0       |
130 | | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8::14a9:c9db:0            |
131 | | 20.0.0.0/8        | 2001:db8::/40 | ${ipv6_br_src} | ${24}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:a9:c9db:0:14a9:c9db:0   |
132 | | 20.160.0.0/12     | 2001:db8::/44 | ${ipv6_br_src} | ${20}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:9:c9db:0:14a9:c9db:0    |
133 | | 20.169.0.0/16     | 2001:db8::/48 | ${ipv6_br_src} | ${16}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:0:c9db:0:14a9:c9db:0    |
134 | | 20.169.200.0/22   | 2001:db8::/54 | ${ipv6_br_src} | ${10}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8:0:1db:0:14a9:c9db:0     |
135
136
137 | TC03: BMR, shared IPv4 address is to be assigned
138 | | [Documentation]
139 | | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\
140 | | ... | IPv4 prefix length + ea bits length > 32 (o + r > 32)
141 | | ... | ip6_prefix < 64, ip4_prefix <= 32
142 | | ...
143 | | ... | Arguments:
144 | | ...
145 | | ... | - ipv4_pfx
146 | | ... | - ipv6_pfx
147 | | ... | - ipv6_src
148 | | ... | - ea_bit_len
149 | | ... | - psid_offset
150 | | ... | - psid_len
151 | | ... | - ipv4_dst
152 | | ... | - dst_port
153 | | ... | - expected_ipv6_dst
154 | | ...
155 # TODO: replace setup when VPP-312 fixed
156 #| | [Setup] | Set Interfaces IP Addresses And Routes
157 | | [Setup] | Run Keywords
158 | | ... | Set up functional test | AND
159 | | ... | Set Interfaces IP Addresses And Routes
160 | | [Template] | Check MAP Configuration With Traffic Script
161 # |===================|===============|================|============|=============|==========|================|==========|===================================|
162 # | ipv4_pfx          | ipv6_pfx      | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port | expected_ipv6_dst                 |
163 # |===================|===============|================|============|=============|==========|================|==========|===================================|
164 | | 20.0.0.0/8        | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:a9c9:db34::14a9:c9db:34      |
165 | | 20.169.0.0/16     | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9db:3400::14a9:c9db:34      |
166 | | 20.169.201.0/24   | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db34::14a9:c9db:34           |
167 | | 20.169.201.219/32 | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:3400::14a9:c9db:34           |
168
169 | | 20.0.0.0/8        | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:a9:c9db:3400:0:14a9:c9db:34  |
170 | | 20.169.0.0/16     | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9:db34::14a9:c9db:34        |
171 | | 20.169.201.0/24   | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db:3400::14a9:c9db:34        |
172 | | 20.169.201.219/32 | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:34::14a9:c9db:34             |
173 | | 20.169.0.0/16     | 2001::/16     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9db:3400::14a9:c9db:34      |
174 | | 20.169.201.219/32 | 2001::/16     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:3400::14a9:c9db:34           |
175
176 | | 20.0.0.0/8        | 2001:db8::/32 | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:a9c9:db34:0:14a9:c9db:34 |
177 | | 20.169.0.0/16     | 2001:db8::/32 | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:c9db:3400:0:14a9:c9db:34 |
178 | | 20.169.201.0/24   | 2001:db8::/32 | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:db34::14a9:c9db:34       |
179 | | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:3400::14a9:c9db:34       |
180 | | 20.169.0.0/16     | 2001::/24     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9:db34::14a9:c9db:34        |
181 | | 20.169.201.0/24   | 2001::/24     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db:3400::14a9:c9db:34        |
182 | | 20.169.0.0/16     | 2001::/16     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9db:3400::14a9:c9db:34      |
183 | | 20.169.201.0/24   | 2001::/16     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db34::14a9:c9db:34           |
184
185 | | 20.160.0.0/12     | 2001:db8::/32 | ${ipv6_br_src} | ${25}      | ${6}        | ${5}     | 20.169.201.219 | ${1232}  | 2001:db8:9c9d:b300:0:14a9:c9db:6  |
186 | | 20.169.0.0/16     | 2001:db8::/32 | ${ipv6_br_src} | ${25}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:c9db:3400:0:14a9:c9db:34 |
187 | | 20.169.201.0/24   | 2001:db8::/32 | ${ipv6_br_src} | ${25}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:db34::14a9:c9db:34       |
188 | | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${25}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:3400::14a9:c9db:34       |
189
190 | | 20.169.192.0/20   | 2001:db8::/32 | ${ipv6_br_src} | ${17}      | ${6}        | ${5}     | 20.169.201.219 | ${1232}  | 2001:db8:9db3::14a9:c9db:6        |
191 | | 20.169.201.0/24   | 2001:db8::/32 | ${ipv6_br_src} | ${17}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:db34::14a9:c9db:34       |
192 | | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${17}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:3400::14a9:c9db:34       |
193
194 | | 20.169.201.0/24   | 2001:db8::/32 | ${ipv6_br_src} | ${12}      | ${6}        | ${4}     | 20.169.201.219 | ${1232}  | 2001:db8:db30::14a9:c9db:3        |
195 | | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${12}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db8:3400::14a9:c9db:34       |
196
197
198 | TC04: End user IPv6 prefix is 64
199 | | [Documentation]
200 | | ... | Supported End-User IPv6 prefix length is 64 bit.
201 | | ...
202 | | ... | Arguments:
203 | | ...
204 | | ... | - ipv4_pfx
205 | | ... | - ipv6_pfx
206 | | ... | - ipv6_src
207 | | ... | - ea_bit_len
208 | | ... | - psid_offset
209 | | ... | - psid_len
210 | | ... | - ipv4_dst
211 | | ... | - dst_port
212 | | ...
213 # TODO: replace setup when VPP-312 fixed
214 #| | [Setup] | Set Interfaces IP Addresses And Routes
215 | | [Setup] | Run Keywords
216 | | ... | Set up functional test | AND
217 | | ... | Set Interfaces IP Addresses And Routes
218 | | [Template] | Check MAP Configuration With Traffic Script
219 # |===================|=========================|================|============|=============|==========|================|==========|
220 # | ipv4_pfx          | ipv6_pfx                | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port |
221 # |===================|=========================|================|============|=============|==========|================|==========|
222 | | 20.0.0.0/8        | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
223 | | 20.169.201.208/28 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8}       | ${5}        | ${4}     | 20.169.201.219 | ${3280}  |
224 | | 20.0.0.0/8        | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
225 | | 20.169.201.219/32 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
226
227
228 | TC05: IPv4 prefix is 0
229 | | [Tags] | EXPECTED_FAILING
230 # TODO: replace setup when VPP-312 fixed
231 #| | [Setup] | Set Interfaces IP Addresses And Routes
232 | | [Setup] | Run Keywords
233 | | ... | Set up functional test | AND
234 | | ... | Set Interfaces IP Addresses And Routes
235 | | [Template] | Check MAP Configuration With Traffic Script
236 # |===================|=========================|================|============|=============|==========|================|==========|
237 # | ipv4_pfx          | ipv6_pfx                | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port |
238 # |===================|=========================|================|============|=============|==========|================|==========|
239 | | 0.0.0.0/0         | 2001:db8:0000::/40      | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
240 | | 0.0.0.0/0         | 2001:db8:0000::/40      | ${ipv6_br_src} | ${16}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
241 | | 0.0.0.0/0         | 2001:db8::/32           | ${ipv6_br_src} | ${32}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
242 | | 0.0.0.0/0         | 2001:d00::/24           | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  |
243 | | 0.0.0.0/0         | 2001::/16               | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  |
244
245
246 | TC06: Multiple domain and check with traffic script IPv4 source IPv6 destination
247 | | [Documentation]
248 | | ... | [Top] TG=DUT1.
249 | | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\
250 | | ... | file.
251 | | ... | [Ver] Send IPv4 to destination in configured domain and receive IPv6\
252 | | ... | packet.
253 | | ... | [Ref] RFC7597.
254 | | Given Configure path in 2-node circular topology
255 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
256 | | And Set interfaces in 2-node circular topology up
257 | | And Configure IP addresses on interfaces
258 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
259 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
260 | | And Vpp Route Add | ${dut_node} | :: | 0 | gateway=${dut_ip6_gw}
261 | | ... | interface=${dut_to_tg_if2}
262 | | And VPP Add IP Neighbor
263 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} | ${tg_to_dut_if2_mac}
264 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | gateway=${dut_ip4_gw}
265 | | ... | interface=${dut_to_tg_if1}
266 | | And VPP Add IP Neighbor
267 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} | ${tg_to_dut_if1_mac}
268 | | :FOR | ${domain_set} | IN | @{domain_sets}
269 | | | When Map Add Domain | ${dut_node} | @{domain_set}
270 | | :FOR | ${ip_set} | IN | @{ip_sets}
271 | | | ${ipv4}= | Get From List | ${ip_set} | 0
272 | | | ${ipv6}= | Get From List | ${ip_set} | 1
273 | | | ${port}= | Get From List | ${ip_set} | 2
274 | | | ${ipv6_br}= | Get From List | ${ip_set} | 3
275 | | | Then Send IPv4 UDP And Check Headers For Lightweight 4over6
276 | | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
277 | | | ... | ${dut_to_tg_if1_mac} | ${ipv4} | ${ipv4_outside} | ${port}
278 | | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${ipv6} | ${ipv6_br}
279 | | | And Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6
280 | | | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1}
281 | | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} | ${ipv6_br} | ${ipv6}
282 | | | ... | ${ipv4_outside} | ${ipv4} | ${port} | ${tg_to_dut_if1_mac}
283 | | | ... | ${dut_to_tg_if1_mac}
284
285
286 | TC07: Multiple domain and check with traffic script IPv6 source IPv6 destination
287 | | [Documentation]
288 | | ... | [Top] TG=DUT1.
289 | | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\
290 | | ... | file.
291 | | ... | [Ver] Send IPv4 encapsulated in IPv6. Source and destination are from\
292 | | ... | configured domains. Check if VPP translate IPv6 addresses.
293 | | ... | [Ref] RFC7597.
294 | | Given Configure path in 2-node circular topology
295 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
296 | | And Set interfaces in 2-node circular topology up
297 | | And Configure IP addresses on interfaces
298 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
299 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
300 | | And Vpp Route Add | ${dut_node} | :: | 0 | gateway=${dut_ip6_gw}
301 | | ... | interface=${dut_to_tg_if2}
302 | | And VPP Add IP Neighbor
303 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} | ${tg_to_dut_if2_mac}
304 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | gateway=${dut_ip4_gw}
305 | | ... | interface=${dut_to_tg_if1}
306 | | And VPP Add IP Neighbor
307 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} | ${tg_to_dut_if1_mac}
308 | | :FOR | ${domain_set} | IN | @{domain_sets}
309 | | | When Map Add Domain | ${dut_node} | @{domain_set}
310 | | ${ip_set_A}= | Get From List | ${ip_sets} | 0
311 | | ${ip_set_B}= | Get From List | ${ip_sets} | 1
312 | | ${ipv6_br}= | Get From List | ${ip_set_A} | 3
313 | | ${port_A}= | Get From List | ${ip_set_A} | 2
314 | | ${port_B}= | Get From List | ${ip_set_B} | 2
315 | | ${ipv6_A}= | Get From List | ${ip_set_A} | 1
316 | | ${ipv6_B}= | Get From List | ${ip_set_B} | 1
317 | | ${ipv4_A}= | Get From List | ${ip_set_A} | 0
318 | | ${ipv4_B}= | Get From List | ${ip_set_B} | 0
319 | | Then Send IPv4 UDP In IPv6 And Check Headers For Lightweight Hairpinning
320 | | ... | ${tg_node} | ${tg_to_dut_if2}
321 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac}
322 | | ... | ${ipv6_br} | ${ipv6_A}
323 | | ... | ${ipv4_B} | ${ipv4_A}
324 | | ... | ${port_B} | ${port_A}
325 | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac}
326 | | ... | ${ipv6_B} | ${ipv6_br}
327
328
329 | TC08: Encapsulate IPv4 ICMP into IPv6
330 | | [Documentation]
331 | | ... | [Top] TG=DUT1.
332 | | ... | [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP\
333 | | ... | on TG_if2_DUT.
334 | | ... | [Cfg] Multiple MAP-E domains are configured, values from variable\
335 | | ... | file.
336 | | ... | [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received\
337 | | ... | IPv4oIPv6 encapsulated packet is correct. Checks IPv6 destination\
338 | | ... | based on ICMP Identifier field.
339 | | ... | [Ref] RFC7597 section 8.2.
340 | | Given Configure path in 2-node circular topology
341 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
342 | | And Set interfaces in 2-node circular topology up
343 | | And Configure IP addresses on interfaces
344 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
345 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
346 | | And Vpp Route Add | ${dut_node} | :: | 0 | gateway=${dut_ip6_gw}
347 | | ... | interface=${dut_to_tg_if2}
348 | | And VPP Add IP Neighbor
349 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} | ${tg_to_dut_if2_mac}
350 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | gateway=${dut_ip4_gw}
351 | | ... | interface=${dut_to_tg_if1}
352 | | And VPP Add IP Neighbor
353 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} | ${tg_to_dut_if1_mac}
354 | | :FOR | ${domain_set} | IN | @{domain_sets}
355 | | | When Map Add Domain | ${dut_node} | @{domain_set}
356 | | ${ip_set_A}= | Get From List | ${ip_sets} | 0
357 | | ${ipv4_A}= | Get From List | ${ip_set_A} | 0
358 | | ${ipv6_A}= | Get From List | ${ip_set_A} | 1
359 | | ${icmp_id_A}= | Get From List | ${ip_set_A} | 2
360 | | ${ipv6_br}= | Get From List | ${ip_set_A} | 3
361 | | Then Send IPv4 ICMP And Check Headers For Lightweight 4over6
362 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
363 | | ... | ${dut_to_tg_if1_mac} | ${ipv4_A} | ${ipv4_outside}
364 | | ... | ${icmp_id_A} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac}
365 | | ... | ${ipv6_A} | ${ipv6_br}
366
367
368 | TC09: Repeated ip neighbor command doesnt put FIB to broken state
369 | | [Documentation] |
370 | | ... | Original issue described in https://jira.fd.io/browse/VPP-312.
371 | | ... | [Top] TG=DUT1.
372 | | ... | [Cfg] IP address are set on interfaces, ip neighbor multiple times
373 | | ... | [Ver] FIB is not in broken state. The steps are add route, \
374 | | ... | check with traffic then add same route
375 | | ... | again and check with traffic script.
376 | | Given Configure path in 2-node circular topology
377 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
378 | | And Set interfaces in 2-node circular topology up
379 | | When Configure IP addresses on interfaces
380 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
381 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
382 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | gateway=${dut_ip6_gw}
383 | | ... | interface=${dut_to_tg_if2}
384 | | And VPP Add IP Neighbor
385 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} | ${tg_to_dut_if2_mac}
386 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | gateway=${dut_ip4_gw}
387 | | ... | interface=${dut_to_tg_if1}
388 | | And VPP Add IP Neighbor
389 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} | ${tg_to_dut_if1_mac}
390 | | Then Check MAP Configuration With Traffic Script
391 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
392 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
393 | | When Configure IP addresses on interfaces
394 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
395 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
396 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | gateway=${dut_ip6_gw}
397 | | ... | interface=${dut_to_tg_if2}
398 | | And VPP Add IP Neighbor
399 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} | ${tg_to_dut_if2_mac}
400 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | gateway=${dut_ip4_gw}
401 | | ... | interface=${dut_to_tg_if1}
402 | | And VPP Add IP Neighbor
403 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} | ${tg_to_dut_if1_mac}
404 | | Then Check MAP Configuration With Traffic Script
405 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
406 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
407
408
409 | Bug: VPP-318
410 | | [Tags] | EXPECTED_FAILING
411 | | [Documentation] | qlen < psid length
412 | | Given Configure path in 2-node circular topology
413 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
414 | | And Set interfaces in 2-node circular topology up
415 | | And Configure IP addresses on interfaces
416 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
417 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
418 | | Then Run Keyword And Expect Error | Unable to add map domain *
419 | | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32
420 | | ... | ${ipv6_br_src} | ${20} | ${6} | ${8}
421
422
423 *** Keywords ***
424 | Set Interfaces IP Addresses And Routes
425 | | Configure path in 2-node circular topology
426 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
427 | | Set interfaces in 2-node circular topology up
428 | | Configure IP addresses on interfaces
429 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
430 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
431 | | Vpp Route Add | ${dut_node} | :: | 0 | gateway=${dut_ip6_gw}
432 | | ... | interface=${dut_to_tg_if2}
433 | | VPP Add IP Neighbor
434 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw} | ${tg_to_dut_if2_mac}
435 | | Vpp Route Add | ${dut_node} | ${ipv4_outside} | 32 | gateway=${dut_ip4_gw}
436 | | ... | interface=${dut_to_tg_if1}
437 | | VPP Add IP Neighbor
438 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw} | ${tg_to_dut_if1_mac}
439
440 | Check MAP Configuration With Traffic Script
441 | | [Documentation]
442 | | ... | Used as a test case template.\
443 | | ... | Configure MAP-E domain with given parameters, with traffic script send
444 | | ... | UDP in IPv4 packet to given UDP destination port and IP destination
445 | | ... | address and check if correctly received IPv6 packet. Vice versa send
446 | | ... | IPv6 packet and check if received IPv4 packet with correct source
447 | | ... | address.
448 | | ... | The MAP domain is deleted in teardown.
449 | | ... | The expected IPv6 address is compared with computed IPv6 address.
450 | | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len}
451 | | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port}
452 | | ... | ${expected_ipv6_dst}=${EMPTY}
453 | | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx}
454 | | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len}
455 | | ${computed_ipv6_dst}= | Compute IPv6 Map Destination Address
456 | | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset}
457 | | ... | ${psid_len} | ${ipv4_dst} | ${dst_port}
458 | | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}"
459 | | ... | Set Variable | ${computed_ipv6_dst}
460 | | ... | ELSE | Set Variable | ${expected_ipv6_dst}
461 | | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}"
462 | | ... | IP Addresses Should Be Equal
463 | | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst}
464 | | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst}
465 | | Check Encapsulation With Traffic Script
466 | | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
467 | | Check Decapsulation With Traffic Script
468 | | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port}
469 | | [Teardown] | Run Keywords
470 | | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND
471 | | ... | Show Packet Trace On All DUTs | ${nodes} | AND
472 | | ... | Clear Packet Trace On All DUTs | ${nodes} | AND
473 | | ... | Verify VPP PID in Teardown
474
475 | Check Encapsulation With Traffic Script
476 | | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
477 | | Send IPv4 UDP And Check Headers For Lightweight 4over6
478 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
479 | | ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside}
480 | | ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac}
481 | | ... | ${ipv6_dst} | ${ipv6_br_src}
482
483 | Check Decapsulation With Traffic Script
484 | | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port}
485 | | Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6
486 | | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1}
487 | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
488 | | ... | ${ipv6_br_src} | ${ipv6_ce_addr}
489 | | ... | ${ipv4_outside} | ${ipv4_inside} | ${port}
490 | | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}