CSIT-509: Add perf tests for vlan + l2 + vhost
[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 | TC09: Repeated ip neighbor command doesnt put FIB to broken state
315 | | [Documentation] |
316 | | ... | Original issue described in https://jira.fd.io/browse/VPP-312.
317 | | ... | [Top] TG=DUT1.
318 | | ... | [Cfg] IP address are set on interfaces, ip neighbor multiple times
319 | | ... | [Ver] FIB is not in broken state.  The steps are add route, \
320 | | ... | check with traffic then add same route
321 | | ... | again and check with traffic script.
322 | | Given Path For 2-node Testing Is Set
323 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
324 | | And Interfaces In 2-node Path Are Up
325 | | When IP Addresses Are Set On Interfaces
326 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
327 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
328 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw}
329 | | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE}
330 | | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
331 | | ... | ${tg_to_dut_if2_mac}
332 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw}
333 | | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE}
334 | | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw}
335 | | ... | ${tg_to_dut_if1_mac}
336 | | Then Check MAP Configuration With Traffic Script
337 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
338 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
339 | | When IP Addresses Are Set On Interfaces
340 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
341 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
342 | | And Vpp Route Add | ${dut_node} | 2001:: | 16 | ${dut_ip6_gw}
343 | | ... | ${dut_to_tg_if2} | resolve_attempts=${NONE} | count=${NONE}
344 | | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
345 | | ... | ${tg_to_dut_if2_mac}
346 | | And Vpp Route Add | ${dut_node} | 0.0.0.0 | 0 | ${dut_ip4_gw}
347 | | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE}
348 | | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw}
349 | | ... | ${tg_to_dut_if1_mac}
350 | | Then Check MAP Configuration With Traffic Script
351 | | ... | 20.0.0.0/8 | 2001::/16 | ${ipv6_br_src} | ${48} | ${6} | ${8}
352 | | ... | 20.169.201.219 | ${1232} | 2001:a9c9:db34::14a9:c9db:34
353
354
355 | Bug: VPP-318
356 | | [Tags] | EXPECTED_FAILING
357 | | [Documentation] | qlen < psid length
358 | | Given Path For 2-node Testing Is Set
359 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
360 | | And Interfaces In 2-node Path Are Up
361 | | And IP Addresses Are Set On Interfaces
362 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
363 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
364 | | Then Run Keyword And Expect Error | Unable to add map domain *
365 | | ... | Map Add Domain | ${dut_node} | 20.169.0.0/16 | 2001:db8::/32
366 | | ... | ${ipv6_br_src} | ${20} | ${6} | ${8}
367
368
369 *** Keywords ***
370 | Set Interfaces IP Addresses And Routes
371 | | Path For 2-node Testing Is Set
372 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
373 | | Interfaces In 2-node Path Are Up
374 | | IP Addresses Are Set On Interfaces
375 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4} | ${ipv4_prefix_len}
376 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6} | ${ipv6_prefix_len}
377 | | Vpp Route Add | ${dut_node} | :: | 0 | ${dut_ip6_gw} | ${dut_to_tg_if2}
378 | | ... | resolve_attempts=${NONE} | count=${NONE}
379 | | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dut_ip6_gw}
380 | | ... | ${tg_to_dut_if2_mac}
381 | | Vpp Route Add | ${dut_node} | ${ipv4_outside} | 32 | ${dut_ip4_gw}
382 | | ... | ${dut_to_tg_if1} | resolve_attempts=${NONE} | count=${NONE}
383 | | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip4_gw}
384 | | ... | ${tg_to_dut_if1_mac}
385
386 | Check MAP Configuration With Traffic Script
387 | | [Documentation]
388 | | ... | Used as a test case template.\
389 | | ... | Configure MAP-E domain with given parameters, with traffic script send
390 | | ... | UDP in IPv4 packet to given UDP destination port and IP destination
391 | | ... | address and check if correctly received IPv6 packet. Vice versa send
392 | | ... | IPv6 packet and check if received IPv4 packet with correct source
393 | | ... | address.
394 | | ... | The MAP domain is deleted in teardown.
395 | | ... | The expected IPv6 address is compared with computed IPv6 address.
396 | | [Arguments] | ${ipv4_pfx} | ${ipv6_pfx} | ${ipv6_br_src} | ${ea_bit_len}
397 | | ... | ${psid_offset} | ${psid_len} | ${ipv4_dst} | ${dst_port}
398 | | ... | ${expected_ipv6_dst}=${EMPTY}
399 | | ${domain_index}= | Map Add Domain | ${dut_node} | ${ipv4_pfx} | ${ipv6_pfx}
400 | | ... | ${ipv6_br_src} | ${ea_bit_len} | ${psid_offset} | ${psid_len}
401 | | ${computed_ipv6_dst}= | Compute IPv6 Map Destination Address
402 | | ... | ${ipv4_pfx} | ${ipv6_pfx} | ${ea_bit_len} | ${psid_offset}
403 | | ... | ${psid_len} | ${ipv4_dst} | ${dst_port}
404 | | ${ipv6_dst}= | Run Keyword If | "${expected_ipv6_dst}" == "${EMPTY}"
405 | | ... | Set Variable | ${computed_ipv6_dst}
406 | | ... | ELSE |  Set Variable | ${expected_ipv6_dst}
407 | | Run Keyword If | "${expected_ipv6_dst}" != "${EMPTY}"
408 | | ... | IP Addresses Should Be Equal
409 | | ... | ${computed_ipv6_dst} | ${expected_ipv6_dst}
410 | | ${ipv6_dst}= | Set Variable | ${computed_ipv6_dst}
411 | | Check Encapsulation With Traffic Script
412 | | ... | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
413 | | Check Decapsulation With Traffic Script
414 | | ... | ${ipv6_dst} | ${ipv4_dst} | ${dst_port}
415 | | [Teardown] | Run Keywords
416 | | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND
417 | | ... | Show Packet Trace On All DUTs | ${nodes} | AND
418 | | ... | Clear Packet Trace On All DUTs | ${nodes} | AND
419 | | ... | Check VPP PID in Teardown
420
421 | Check Encapsulation With Traffic Script
422 | | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst}
423 | | Send IPv4 UDP And Check Headers For Lightweight 4over6
424 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}
425 | | ... | ${dut_to_tg_if1_mac} | ${ipv4_dst} | ${ipv4_outside}
426 | | ... | ${dst_port} | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac}
427 | | ... | ${ipv6_dst} | ${ipv6_br_src}
428
429 | Check Decapsulation With Traffic Script
430 | | [Arguments] | ${ipv6_ce_addr} | ${ipv4_inside} | ${port}
431 | | Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6
432 | | ... | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1}
433 | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
434 | | ... | ${ipv6_br_src} | ${ipv6_ce_addr}
435 | | ... | ${ipv4_outside} | ${ipv4_inside} | ${port}
436 | | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}