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