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