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