34cff8f9fc3aa1816d9d6bf95b42333d7a52c609
[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 | | [Documentation] |
61 | | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\
62 | | ... | IPv4 prefix length + ea bits length < 32 (o + r < 32)
63 | | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32
64 | | ...
65 # TODO: replace setup when VPP-312 fixed
66 #| | [Setup] | Set interfaces IP addresses and routes
67 | | [Setup] | Run Keywords
68 | | ... | Setup all DUTs before test | AND
69 | | ... | Setup all TGs before traffic script | AND
70 | | ... | Set interfaces IP addresses and routes
71 | | [Template] | Check MAP configuration with traffic script
72 # |=================|===============|================|============|=============|==========|================|==========|==================================|
73 # | ipv4_pfx        | ipv6_pfx      | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port | expected_ipv6_dst                |
74 # |=================|===============|================|============|=============|==========|================|==========|==================================|
75 | | 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          |
76 | | 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          |
77 | | 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       |
78 | | 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       |
79 | | 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 |
80 | | 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 |
81 | | 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       |
82 | | 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       |
83
84
85 | TC02: BMR, full IPv4 address is to be assigned
86 | | [Documentation] |
87 | | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\
88 | | ... | IPv4 prefix length + ea bits length == 32 (o + r == 32)
89 | | ... | psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32
90 | | ...
91 # TODO: replace setup when VPP-312 fixed
92 #| | [Setup] | Set interfaces IP addresses and routes
93 | | [Setup] | Run Keywords
94 | | ... | Setup all DUTs before test | AND
95 | | ... | Setup all TGs before traffic script | AND
96 | | ... | Set interfaces IP addresses and routes
97 | | [Template] | Check MAP configuration with traffic script
98 # |===================|===============|================|============|=============|==========|================|==========|==================================|
99 # | ipv4_pfx          | ipv6_pfx      | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port | expected_ipv6_dst                |
100 # |===================|===============|================|============|=============|==========|================|==========|==================================|
101 | | 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 |
102 | | 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 |
103 | | 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       |
104 | | 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       |
105 | | 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       |
106 | | 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       |
107 | | 20.169.201.219/32 | 2001:db8::/32 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  | 2001:db8::14a9:c9db:0            |
108 | | 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   |
109 | | 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    |
110 | | 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    |
111 | | 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     |
112
113
114 | TC03: BMR, shared IPv4 address is to be assigned
115 | | [Documentation] |
116 | | ... | Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2\
117 | | ... | IPv4 prefix length + ea bits length > 32 (o + r > 32)
118 | | ... | ip6_prefix < 64, ip4_prefix <= 32
119 | | ...
120 # TODO: replace setup when VPP-312 fixed
121 #| | [Setup] | Set interfaces IP addresses and routes
122 | | [Setup] | Run Keywords
123 | | ... | Setup all DUTs before test | AND
124 | | ... | Setup all TGs before traffic script | AND
125 | | ... | Set interfaces IP addresses and routes
126 | | [Template] | Check MAP configuration with traffic script
127 # |===================|===============|================|============|=============|==========|================|==========|===================================|
128 # | ipv4_pfx          | ipv6_pfx      | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port | expected_ipv6_dst                 |
129 # |===================|===============|================|============|=============|==========|================|==========|===================================|
130 | | 20.0.0.0/8        | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:a9c9:db34::14a9:c9db:34      |
131 | | 20.169.0.0/16     | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9db:3400::14a9:c9db:34      |
132 | | 20.169.201.0/24   | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db34::14a9:c9db:34           |
133 | | 20.169.201.219/32 | 2001::/16     | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:3400::14a9:c9db:34           |
134
135 | | 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  |
136 | | 20.169.0.0/16     | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9:db34::14a9:c9db:34        |
137 | | 20.169.201.0/24   | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db:3400::14a9:c9db:34        |
138 | | 20.169.201.219/32 | 2001::/24     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:34::14a9:c9db:34             |
139 | | 20.169.0.0/16     | 2001::/16     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9db:3400::14a9:c9db:34      |
140 | | 20.169.201.219/32 | 2001::/16     | ${ipv6_br_src} | ${40}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:3400::14a9:c9db:34           |
141
142 | | 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 |
143 | | 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 |
144 | | 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       |
145 | | 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       |
146 | | 20.169.0.0/16     | 2001::/24     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9:db34::14a9:c9db:34        |
147 | | 20.169.201.0/24   | 2001::/24     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db:3400::14a9:c9db:34        |
148 | | 20.169.0.0/16     | 2001::/16     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:c9db:3400::14a9:c9db:34      |
149 | | 20.169.201.0/24   | 2001::/16     | ${ipv6_br_src} | ${32}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  | 2001:db34::14a9:c9db:34           |
150
151 | | 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  |
152 | | 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 |
153 | | 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       |
154 | | 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       |
155
156 | | 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        |
157 | | 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       |
158 | | 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       |
159
160 | | 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        |
161 | | 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       |
162
163
164 | TC04: End user IPv6 prefix is 64
165 | | [Documentation] |
166 | | ... | Supported End-User IPv6 prefix length is 64 bit.
167 | | ...
168 # TODO: replace setup when VPP-312 fixed
169 #| | [Setup] | Set interfaces IP addresses and routes
170 | | [Setup] | Run Keywords
171 | | ... | Setup all DUTs before test | AND
172 | | ... | Setup all TGs before traffic script | AND
173 | | ... | Set interfaces IP addresses and routes
174 | | [Template] | Check MAP configuration with traffic script
175 # |===================|=========================|================|============|=============|==========|================|==========|
176 # | ipv4_pfx          | ipv6_pfx                | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port |
177 # |===================|=========================|================|============|=============|==========|================|==========|
178 | | 20.0.0.0/8        | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
179 | | 20.169.201.208/28 | 2001:db8:0012:3400::/56 | ${ipv6_br_src} | ${8}       | ${5}        | ${4}     | 20.169.201.219 | ${3280}  |
180 | | 20.0.0.0/8        | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
181 | | 20.169.201.219/32 | 2001:db8:0012:3400::/64 | ${ipv6_br_src} | ${0}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
182
183
184 | TC05: IPv4 prefix is 0
185 | | [Tags] | EXPECTED_FAILING
186 # TODO: replace setup when VPP-312 fixed
187 #| | [Setup] | Set interfaces IP addresses and routes
188 | | [Setup] | Run Keywords
189 | | ... | Setup all DUTs before test | AND
190 | | ... | Setup all TGs before traffic script | AND
191 | | ... | Set interfaces IP addresses and routes
192 | | [Template] | Check MAP configuration with traffic script
193 # |===================|=========================|================|============|=============|==========|================|==========|
194 # | ipv4_pfx          | ipv6_pfx                | ipv6_src       | ea_bit_len | psid_offset | psid_len | ipv4_dst       | dst_port |
195 # |===================|=========================|================|============|=============|==========|================|==========|
196 | | 0.0.0.0/0         | 2001:db8:0000::/40      | ${ipv6_br_src} | ${8}       | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
197 | | 0.0.0.0/0         | 2001:db8:0000::/40      | ${ipv6_br_src} | ${16}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
198 | | 0.0.0.0/0         | 2001:db8::/32           | ${ipv6_br_src} | ${32}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
199 | | 0.0.0.0/0         | 2001::/16               | ${ipv6_br_src} | ${48}      | ${0}        | ${0}     | 20.169.201.219 | ${1232}  |
200 | | 0.0.0.0/0         | 2001::/16               | ${ipv6_br_src} | ${48}      | ${6}        | ${8}     | 20.169.201.219 | ${1232}  |
201
202
203 | Bug: VPP-318
204 | | [Tags] | EXPECTED_FAILING
205 | | [Documentation] | qlen < psid length
206 | | Given Path for 2-node testing is set
207 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
208 | | And Interfaces in 2-node path are up
209 | | And IP addresses are set on interfaces
210 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
211 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
212 | | Then Run Keyword And Expect Error | Unable to add map domain *
213 | | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32
214 | | ... | ${ipv6_br_src} | ${20} | ${6} | ${8}
215
216
217 | Bug: VPP-312
218 | | [Tags] | EXPECTED_FAILING
219 | | [Documentation] |
220 | | ... | add route; add map; traffic pass; add route; add map; traffic fail
221 | | Given Path for 2-node testing is set
222 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
223 | | And Interfaces in 2-node path are up
224
225 | | When IP addresses are set on interfaces
226 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
227 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
228 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw}
229 | | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE}
230 | | And Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
231 | | ... | ${tg_to_dut_if2_mac}
232
233 | | Then Check MAP configuration with traffic script
234 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
235 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
236
237 | | When IP addresses are set on interfaces
238 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
239 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
240 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw}
241 | | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE}
242 | | And Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
243 | | ... | ${tg_to_dut_if2_mac}
244
245 | | Then Check MAP configuration with traffic script
246 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
247 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
248
249
250 *** Keywords ***
251 | Set interfaces IP addresses and routes
252 | | Path for 2-node testing is set
253 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
254 | | Interfaces in 2-node path are up
255 | | 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 | | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2}
259 | | ... | resolve_attempts=${NONE} | count=${NONE}
260 | | Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
261 | | ... | ${tg_to_dut_if2_mac}
262 | | Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw} | ${dut_to_tg_if1}
263 | | ... | resolve_attempts=${NONE} | count=${NONE}
264 | | Add IP neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw}
265 | | ... | ${tg_to_dut_if1_mac}
266
267 | Check MAP configuration with traffic script
268 | | [Documentation] |
269 | | ... | Used as a test case template.\
270 | | ... | Configure MAP-E domain with given parameters, with traffic script send
271 | | ... | UDP in IPv4 packet to given UDP destination port and IP destination
272 | | ... | address and check if correctly received IPv6 packet. Vice versa send
273 | | ... | IPv6 packet and check if received IPv4 packet with correct source
274 | | ... | address.
275 | | ... | The MAP domain is deleted in teardown.
276 | | ... | The expected IPv6 address is compared with computed IPv6 address.
277 | | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len}
278 | | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port}
279 | | ... | ${expected_ipv6_dst}=${EMPTY}
280 | | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx}
281 | | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len}
282 | | ${computed_ipv6_dst}= | Compute IPv6 map destination address
283 | | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset}
284 | | ... | ${psid_len} | ${ipv4_dst} | ${dst_port}
285 | | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}"
286 | | ... | Set Variable | ${computed_ipv6_dst}
287 | | ... | ELSE |  Set Variable | ${expected_ipv6_dst}
288 | | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}"
289 | | ... | IP Addresses Should be Equal
290 | | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst}
291 | | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst}
292 | | Check encapsulation with traffic script
293 | | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
294 | | Check decapsulation with traffic script
295 | | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port}
296 | | [Teardown] | Run Keywords
297 | | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND
298 | | ... | Show packet trace on all DUTs | ${nodes} | AND
299 | | ... | Clear packet trace on all DUTs | ${nodes}
300
301 | Check encapsulation with traffic script
302 | | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
303 | | Send IPv4 UDP and check headers for lightweight 4over6
304 | |      ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
305 | |      ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside}
306 | |      ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac}
307 | |      ... | ${ipv6_dst} | ${ipv6_br_src}
308
309 | Check decapsulation with traffic script
310 | | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port}
311 | | Send IPv4 UDP in IPv6 and check headers for lightweight 4over6
312 | |      ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1}
313 | |      ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
314 | |      ... | ${ipv6_br_src} | ${ipv6_ce_addr}
315 | |      ... | ${ipv4_outside} | ${ipv4_inside} | ${port}
316 | |      ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}