49df42a63e05ed0f05afcdf2ba9e34d652f1250e
[csit.git] / tests / vpp / func / ip6_tunnels / vxlan / eth4p-ethip6vxlan-l2bdbasemaclrn-l2shg-func.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 *** Settings ***
15 | Resource | resources/libraries/robot/shared/default.robot
16 | Resource | resources/libraries/robot/shared/testing_path.robot
17 | Resource | resources/libraries/robot/overlay/vxlan.robot
18 | Resource | resources/libraries/robot/l2/l2_traffic.robot
19 | Resource | resources/libraries/robot/vm/qemu.robot
20 | Library  | resources.libraries.python.Trace
21 | Library | resources.libraries.python.IPv6Setup
22 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV
23 | Test Setup | Set up functional test
24 | Test Teardown | Tear down functional test
25 | Documentation | *L2BD with SHG combined with VXLAN test cases - IPv6*
26 | ...
27 | ... | *[Top] Network topologies:* TG=DUT1=DUT2=TG 3-node circular topology
28 | ... | with double parallel links.
29 | ... | *[Enc] Packet encapsulations:* th-IPv6-VXLAN-Eth-IPv6-ICMPv6 on
30 | ... | DUT1-DUT2, Eth-IPv6-ICMPv6 on TG-DUTn for L2 switching of IPv6.
31 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
32 | ... | bridge-domain (L2BD) switching combined with MAC learning enabled
33 | ... | and Split Horizon Groups (SHG); VXLAN tunnels are configured
34 | ... | between L2BDs on DUT1 and DUT2.
35 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent
36 | ... | in both directions by TG on links to DUT1 and DUT2; on receive TG
37 | ... | verifies packets for correctness and their IPv6 src-addr, dst-addr
38 | ... | and MAC addresses.
39 | ... | *[Ref] Applicable standard specifications:* RFC7348.
40
41 *** Variables ***
42 | ${vni_1}= | 23
43 | ${vni_2}= | 35
44
45 | ${bd_id1}= | 10
46 | ${bd_id2}= | 20
47 | ${bd_id3}= | 30
48 | ${shg1}= | 1
49 | ${shg2}= | 2
50
51 | ${ip6_addr1}= | 3ffe:64::1
52 | ${ip6_addr2}= | 3ffe:64::2
53 | ${ip6_prefix}= | 64
54
55 *** Test Cases ***
56 | TC01: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in SHG switch ICMPv6 between TG links
57 | | [Documentation]
58 | | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
59 | | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2
60 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
61 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
62 | | ... | interfaces into the same Split-Horizon-Group (SHG). On DUT2 configure
63 | | ... | two L2 bridge-domain (MAC learning enabled), each with one untagged
64 | | ... | interface to TG and one VXLAN interface towards the DUT1. [Ver] Make
65 | | ... | TG send ICMPv6 Echo Reqs between all four of its interfaces to be
66 | | ... | switched by DUT1 and DUT2; verify packets are not switched between
67 | | ... | TG interfaces connected to DUT2 that are isolated by SHG on DUT1.
68 | | ... | [Ref] RFC7348.
69 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
70 | | Given Configure path for 3-node BD-SHG test | ${nodes['TG']}
71 | | ...                                         | ${nodes['DUT1']}
72 | | ...                                         | ${nodes['DUT2']}
73 | | And Set interfaces in 3-node BD-SHG test up
74 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
75 | | ...                       | ${ip6_prefix}
76 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
77 | | ...                       | ${ip6_prefix}
78 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
79 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
80 | | And Vpp All RA Suppress Link Layer | ${nodes}
81 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
82 | | | ...                                          | ${ip6_addr1} | ${ip6_addr2}
83 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
84 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
85 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
86 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
87 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
88 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
89 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
90 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
91 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
92 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
93 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
94 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
95 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
96 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
97 | | ...                                     | ${bd_id1}
98 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
99 | | ...                                     | ${bd_id1}
100 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
101 | | ...                                     | ${bd_id1} | ${shg1}
102 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
103 | | ...                                     | ${bd_id1} | ${shg1}
104 | | And Create bridge domain | ${dut2_node} | ${bd_id2}
105 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
106 | | ...                                     | ${bd_id2}
107 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
108 | | ...                                     | ${bd_id2}
109 | | And Create bridge domain | ${dut2_node} | ${bd_id3}
110 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
111 | | ...                                     | ${bd_id3}
112 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
113 | | ...                                     | ${bd_id3}
114 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
115 | | ...                                          | ${tg_to_dut1_if1}
116 | | ...                                          | ${tg_to_dut2_if1}
117 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
118 | | ...                                         | ${tg_to_dut1_if1}
119 | | ...                                         | ${tg_to_dut2_if2}
120 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
121 | | ...                                         | ${tg_to_dut1_if2}
122 | | ...                                         | ${tg_to_dut2_if1}
123 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
124 | | ...                                         | ${tg_to_dut1_if2}
125 | | ...                                         | ${tg_to_dut2_if2}
126 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
127 | | ...                              | Send ICMPv6 bidirectionally and verify received packets
128 | | | ...                            | ${tg_node} | ${tg_to_dut2_if1}
129 | | | ...                            | ${tg_to_dut2_if2}
130
131 | TC02: DUT1 and DUT2 with L2BD and VXLANoIPv6 tunnels in different SHGs switch ICMPv6 between TG links
132 | | [Documentation]
133 | | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv6-VXLAN-Eth-IPv6-ICMPv6 on \
134 | | ... | DUT1-DUT2; Eth-IPv6-ICMPv6 on TG-DUTn. [Cfg] On DUT1 configure L2
135 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
136 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
137 | | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2
138 | | ... | configure two L2 bridge-domain (MAC learning enabled), each with one
139 | | ... | untagged interface to TG and one VXLAN interface towards the DUT1.
140 | | ... | [Ver] Make TG send ICMPv6 Echo Req between all four of its interfaces
141 | | ... | to be switched by DUT1 and DUT2; verify packets are switched between
142 | | ... | all TG interfaces. [Ref] RFC7348.
143 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
144 | | Given Configure path for 3-node BD-SHG test | ${nodes['TG']}
145 | | ...                                         | ${nodes['DUT1']}
146 | | ...                                         | ${nodes['DUT2']}
147 | | And Set interfaces in 3-node BD-SHG test up
148 | | And Set Interface Address | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr1}
149 | | ...                       | ${ip6_prefix}
150 | | And Set Interface Address | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr2}
151 | | ...                       | ${ip6_prefix}
152 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip6_addr2}
153 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip6_addr1}
154 | | And Vpp All RA Suppress Link Layer | ${nodes}
155 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
156 | | | ...                                          | ${ip6_addr1} | ${ip6_addr2}
157 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
158 | | | ...                                         | ${ip6_addr1} | ${ip6_addr2}
159 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
160 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
161 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
162 | | | ...                                         | ${ip6_addr2} | ${ip6_addr1}
163 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
164 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
165 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
166 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
167 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
168 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
169 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
170 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
171 | | ...                                     | ${bd_id1}
172 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
173 | | ...                                     | ${bd_id1}
174 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
175 | | ...                                     | ${bd_id1} | ${shg1}
176 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
177 | | ...                                     | ${bd_id1} | ${shg2}
178 | | And Create bridge domain | ${dut2_node} | ${bd_id2}
179 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
180 | | ...                                     | ${bd_id2}
181 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
182 | | ...                                     | ${bd_id2}
183 | | And Create bridge domain | ${dut2_node} | ${bd_id3}
184 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
185 | | ...                                     | ${bd_id3}
186 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
187 | | ...                                     | ${bd_id3}
188 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
189 | | ...                                          | ${tg_to_dut1_if1}
190 | | ...                                          | ${tg_to_dut2_if1}
191 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
192 | | ...                                         | ${tg_to_dut1_if1}
193 | | ...                                         | ${tg_to_dut2_if2}
194 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
195 | | ...                                         | ${tg_to_dut1_if2}
196 | | ...                                         | ${tg_to_dut2_if1}
197 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
198 | | ...                                         | ${tg_to_dut1_if2}
199 | | ...                                         | ${tg_to_dut2_if2}
200 | | And Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
201 | | ...                                         | ${tg_to_dut2_if1}
202 | | ...                                         | ${tg_to_dut2_if2}