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