e0b09e56bbcc6ce2f1a7653dbb744843d2d660ac
[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 | Suite Setup | Run Keywords
25 | ... | Setup all DUTs before test | AND
26 | ... | Setup all TGs before traffic script
27 | Test Setup | Run Keywords
28 | ... | Setup all DUTs before test | AND
29 | ... | Setup all TGs before traffic script
30 | Test Teardown | Run Keywords
31 | ... | Show packet trace on all DUTs | ${nodes} | AND
32 | ... | Show vpp trace dump on all DUTs
33 | Documentation | *Test for Basic mapping rule for MAP-E*\
34 | ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the
35 | ... | nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP on TG-to-DUT-if1.
37 | ... | Eth-IPv6-IPv4-UDP on TG-to-DUT-if2.
38 | ... | *[Cfg] DUT configuration:* DUT is configured with IPv4 on one DUT-to-TG
39 | ... | interface and IPv6 address on second DUT-to-TG interface. MAP-E domain
40 | ... | is configured in test template based on test parameters.
41 | ... | *[Ver] TG verification:* UDP packets in IPv4 are sent by TG to
42 | ... | destination in MAP domain. IPv6 packets with encapsulated IPv4 are
43 | ... | received on TG interface.
44 | ... | *[Ref] Applicable standard specifications:* RFC7597.
45
46
47 *** Variables ***
48 | ${dut_ip4}= | 10.0.0.1
49 | ${dut_ip6}= | 2001:0::1
50 | ${dut_ip4_gw}= | 10.0.0.2
51 | ${dut_ip6_gw}= | 2001:0::2
52 | ${ipv4_prefix_len}= | 24
53 | ${ipv6_prefix_len}= | 64
54 | ${ipv6_br_src}= | 2001:db8:ffff::1
55 | ${ipv4_outside}= | 100.0.0.1
56
57
58 *** Test Cases ***
59 | TC01: BMR, then an IPv4 prefix is assigned
60 | | [Tags] | EXPECTED_FAILING
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 | | [Tags] | EXPECTED_FAILING
167 | | [Documentation] |
168 | | ... | Supported End-User IPv6 prefix length is 64 bit.
169 | | ...
170 # TODO: replace setup when VPP-312 fixed
171 #| | [Setup] | Set interfaces IP addresses and routes
172 | | [Setup] | Run Keywords
173 | | ... | Setup all DUTs before test | AND
174 | | ... | Setup all TGs before traffic script | AND
175 | | ... | Set interfaces IP addresses and routes
176 | | [Template] | Check MAP configuration with traffic script
177 # |===================|=========================|================|============|=============|==========|================|==========|
178 # | ipv4_pfx          | ipv6_pfx                | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port |
179 # |===================|=========================|================|============|=============|==========|================|==========|
180 | | 20.0.0.0/8        | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
181 | | 20.169.201.208/28 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8}       | ${5}        | ${4}     | 20.169.201.219 | ${3280}  |
182 | | 20.0.0.0/8        | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
183 | | 20.169.201.219/32 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
184
185
186 | TC05: IPv4 prefix is 0
187 | | [Tags] | EXPECTED_FAILING
188 # TODO: replace setup when VPP-312 fixed
189 #| | [Setup] | Set interfaces IP addresses and routes
190 | | [Setup] | Run Keywords
191 | | ... | Setup all DUTs before test | AND
192 | | ... | Setup all TGs before traffic script | AND
193 | | ... | Set interfaces IP addresses and routes
194 | | [Template] | Check MAP configuration with traffic script
195 # |===================|=========================|================|============|=============|==========|================|==========|
196 # | ipv4_pfx          | ipv6_pfx                | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port |
197 # |===================|=========================|================|============|=============|==========|================|==========|
198 | | 0.0.0.0/0         | 2001:db8:0000::/40      | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
199 | | 0.0.0.0/0         | 2001:db8:0000::/40      | ${ipv6_br_src} | ${16}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
200 | | 0.0.0.0/0         | 2001:db8::/32           | ${ipv6_br_src} | ${32}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
201 | | 0.0.0.0/0         | 2001::/16               | ${ipv6_br_src} | ${48}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
202 | | 0.0.0.0/0         | 2001::/16               | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  |
203
204
205 | Bug: VPP-318
206 | | [Tags] | EXPECTED_FAILING
207 | | [Documentation] | qlen < psid length
208 | | Given Path for 2-node testing is set
209 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
210 | | And Interfaces in 2-node path are up
211 | | And IP addresses are set on interfaces
212 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
213 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
214 | | Then Run Keyword And Expect Error | Unable to add map domain *
215 | | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32
216 | | ... | ${ipv6_br_src} | ${20} | ${6} | ${8}
217
218
219 | Bug: VPP-312
220 | | [Tags] | EXPECTED_FAILING
221 | | [Documentation] |
222 | | ... | add route; add map; traffic pass; add route; add map; traffic fail
223 | | Given Path for 2-node testing is set
224 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
225 | | And Interfaces in 2-node path are up
226
227 | | When IP addresses are set on interfaces
228 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
229 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
230 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw}
231 | | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE}
232 | | And Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
233 | | ... | ${tg_to_dut_if2_mac}
234
235 | | Then Check MAP configuration with traffic script
236 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
237 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
238
239 | | When IP addresses are set on interfaces
240 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
241 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
242 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw}
243 | | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE}
244 | | And Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
245 | | ... | ${tg_to_dut_if2_mac}
246
247 | | Then Check MAP configuration with traffic script
248 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
249 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
250
251
252 *** Keywords ***
253 | Set interfaces IP addresses and routes
254 | | Path for 2-node testing is set
255 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
256 | | Interfaces in 2-node path are up
257 | | IP addresses are set on interfaces
258 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
259 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
260 | | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2}
261 | | ... | resolve_attempts=${NONE} | count=${NONE}
262 | | Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
263 | | ... | ${tg_to_dut_if2_mac}
264 | | Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} | ${dut_to_tg_if1}
265 | | ... | resolve_attempts=${NONE} | count=${NONE}
266 | | Add IP neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw}
267 | | ... | ${tg_to_dut_if1_mac}
268
269 | Check MAP configuration with traffic script
270 | | [Documentation] |
271 | | ... | Used as a test case template.\
272 | | ... | Configure MAP-E domain with given parameters, with traffic script send
273 | | ... | UDP in IPv4 packet to given UDP destination port and IP destination
274 | | ... | address and check if correctly received IPv6 packet. Vice versa send
275 | | ... | IPv6 packet and check if received IPv4 packet with correct source
276 | | ... | address.
277 | | ... | The MAP domain is deleted in teardown.
278 | | ... | The expected IPv6 address is compared with computed IPv6 address.
279 | | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len}
280 | | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port}
281 | | ... | ${expected_ipv6_dst}=${EMPTY}
282 | | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx}
283 | | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len}
284 | | ${computed_ipv6_dst}= | Compute IPv6 map destination address
285 | | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset}
286 | | ... | ${psid_len} | ${ipv4_dst} | ${dst_port}
287 | | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}"
288 | | ... | Set Variable | ${computed_ipv6_dst}
289 | | ... | ELSE |  Set Variable | ${expected_ipv6_dst}
290 | | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}"
291 | | ... | IP Addresses Should be Equal
292 | | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst}
293 | | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst}
294 | | Check encapsulation with traffic script
295 | | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
296 | | Check decapsulation with traffic script
297 | | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port}
298 | | [Teardown] | Run Keywords
299 | | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND
300 | | ... | Show packet trace on all DUTs | ${nodes} | AND
301 | | ... | Clear packet trace on all DUTs | ${nodes}
302
303 | Check encapsulation with traffic script
304 | | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
305 | | Send IPv4 UDP and check headers for lightweight 4over6
306 | |      ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
307 | |      ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside}
308 | |      ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac}
309 | |      ... | ${ipv6_dst} | ${ipv6_br_src}
310
311 | Check decapsulation with traffic script
312 | | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port}
313 | | Send IPv4 UDP in IPv6 and check headers for lightweight 4over6
314 | |      ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1}
315 | |      ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
316 | |      ... | ${ipv6_br_src} | ${ipv6_ce_addr}
317 | |      ... | ${ipv4_outside} | ${ipv4_inside} | ${port}
318 | |      ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}