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