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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.