FIX: VXLAN scale tests
[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 | Resource | resources/libraries/robot/vm/qemu.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 - IPv4*
30 | ...
31 | ... | *[Top] Network topologies:* TG=DUT1=DUT2=TG 3-node circular topology
32 | ... | with double parallel links.
33 | ... | *[Enc] Packet encapsulations:* Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on
34 | ... | DUT1-DUT2, Eth-IPv4-ICMPv4 on TG-DUTn for L2 switching of IPv4.
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 IPv4 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 | ${ip4_addr1}= | 172.16.0.1
56 | ${ip4_addr2}= | 172.16.0.2
57 | ${ip4_prefix}= | 24
58
59 *** Test Cases ***
60 | TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in SHG switch ICMPv4 between TG links
61 | | [Documentation]
62 | | ... | [Top] TG=DUT1=DUT2=TG. [Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \
63 | | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 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 ICMPv4 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 | ${nodes['TG']}
75 | | ... | ${nodes['DUT1']} | ${nodes['DUT2']}
76 | | And Set interfaces in 3-node BD-SHG test up
77 | | And VPP Interface Set IP Address | ${dut1_node} | ${dut1_to_dut2}
78 | | ... | ${ip4_addr1} | ${ip4_prefix}
79 | | And VPP Interface Set IP Address | ${dut2_node} | ${dut2_to_dut1}
80 | | ... | ${ip4_addr2} | ${ip4_prefix}
81 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2}
82 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1}
83 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
84 | | | ... | ${ip4_addr1} | ${ip4_addr2}
85 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
86 | | | ... | ${ip4_addr1} | ${ip4_addr2}
87 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
88 | | | ... | ${ip4_addr2} | ${ip4_addr1}
89 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
90 | | | ... | ${ip4_addr2} | ${ip4_addr1}
91 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
92 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
93 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
94 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
95 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
96 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
97 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
98 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
99 | | ... | ${bd_id1}
100 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
101 | | ... | ${bd_id1}
102 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
103 | | ... | ${bd_id1} | ${shg1}
104 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
105 | | ... | ${bd_id1} | ${shg1}
106 | | And Create bridge domain | ${dut2_node} | ${bd_id2}
107 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
108 | | ... | ${bd_id2}
109 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
110 | | ... | ${bd_id2}
111 | | And Create bridge domain | ${dut2_node} | ${bd_id3}
112 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
113 | | ... | ${bd_id3}
114 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
115 | | ... | ${bd_id3}
116 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
117 | | ... | ${tg_to_dut1_if1} | ${tg_to_dut2_if1}
118 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
119 | | ... | ${tg_to_dut1_if1} | ${tg_to_dut2_if2}
120 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
121 | | ... | ${tg_to_dut1_if2} | ${tg_to_dut2_if1}
122 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
123 | | ... | ${tg_to_dut1_if2} | ${tg_to_dut2_if2}
124 | | And Run Keyword And Expect Error | ICMP echo Rx timeout
125 | | ... | Send ICMPv4 bidirectionally and verify received packets
126 | | ... | ${tg_node} | ${tg_to_dut2_if1} | ${tg_to_dut2_if2}
127
128 | TC01: DUT1 and DUT2 with L2BD and VXLANoIPv4 tunnels in different SHGs switch ICMPv4 between TG links
129 | | [Documentation]
130 | | ... | [Top] TG=DUT1=DUT2=TG.[Enc] Eth-IPv4-VXLAN-Eth-IPv4-ICMPv4 on \
131 | | ... | DUT1-DUT2; Eth-IPv4-ICMPv4 on TG-DUTn. [Cfg] On DUT1 configure L2
132 | | ... | bridge-domain (MAC learning enabled) with two untagged interfaces
133 | | ... | to TG and two VXLAN interfaces towards the DUT2 and put both VXLAN
134 | | ... | interfaces into the different Split-Horizon-Group (SHGs). On DUT2
135 | | ... | configure two L2 bridge-domain (MAC learning enabled), each with one
136 | | ... | untagged interface to TG and one VXLAN interface towards the DUT1.
137 | | ... | [Ver] Make TG send ICMPv4 Echo Req between all four of its interfaces
138 | | ... | to be switched by DUT1 and DUT2; verify packets are switched between
139 | | ... | all TG interfaces. [Ref] RFC7348.
140 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
141 | | Given Configure path for 3-node BD-SHG test | ${nodes['TG']}
142 | | ... | ${nodes['DUT1']} | ${nodes['DUT2']}
143 | | And Set interfaces in 3-node BD-SHG test up
144 | | And VPP Interface Set IP Address | ${dut1_node} | ${dut1_to_dut2}
145 | | ... | ${ip4_addr1} | ${ip4_prefix}
146 | | And VPP Interface Set IP Address | ${dut2_node} | ${dut2_to_dut1}
147 | | ... | ${ip4_addr2} | ${ip4_prefix}
148 | | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${ip4_addr2}
149 | | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${ip4_addr1}
150 | | ${dut1s_vxlan1}= | When Create VXLAN interface | ${dut1_node} | ${vni_1}
151 | | | ... | ${ip4_addr1} | ${ip4_addr2}
152 | | ${dut1s_vxlan2}= | And Create VXLAN interface | ${dut1_node} | ${vni_2}
153 | | | ... | ${ip4_addr1} | ${ip4_addr2}
154 | | ${dut2s_vxlan1}= | And Create VXLAN interface | ${dut2_node} | ${vni_1}
155 | | | ... | ${ip4_addr2} | ${ip4_addr1}
156 | | ${dut2s_vxlan2}= | And Create VXLAN interface | ${dut2_node} | ${vni_2}
157 | | | ... | ${ip4_addr2} | ${ip4_addr1}
158 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan1} | up
159 | | And Set Interface State | ${dut1_node} | ${dut1s_vxlan2} | up
160 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan1} | up
161 | | And Set Interface State | ${dut2_node} | ${dut2s_vxlan2} | up
162 | | And Vpp Node Interfaces Ready Wait | ${dut1_node}
163 | | And Vpp Node Interfaces Ready Wait | ${dut2_node}
164 | | And Create bridge domain | ${dut1_node} | ${bd_id1}
165 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
166 | | ... | ${bd_id1}
167 | | And Add interface to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
168 | | ... | ${bd_id1}
169 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan1}
170 | | ... | ${bd_id1} | ${shg1}
171 | | And Add interface to bridge domain | ${dut1_node} | ${dut1s_vxlan2}
172 | | ... | ${bd_id1} | ${shg2}
173 | | And Create bridge domain | ${dut2_node} | ${bd_id2}
174 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
175 | | ... | ${bd_id2}
176 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan1}
177 | | ... | ${bd_id2}
178 | | And Create bridge domain | ${dut2_node} | ${bd_id3}
179 | | And Add interface to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
180 | | ... | ${bd_id3}
181 | | And Add interface to bridge domain | ${dut2_node} | ${dut2s_vxlan2}
182 | | ... | ${bd_id3}
183 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
184 | | ... | ${tg_to_dut1_if1} | ${tg_to_dut2_if1}
185 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
186 | | ... | ${tg_to_dut1_if1} | ${tg_to_dut2_if2}
187 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
188 | | ... | ${tg_to_dut1_if2} | ${tg_to_dut2_if1}
189 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
190 | | ... | ${tg_to_dut1_if2} | ${tg_to_dut2_if2}
191 | | And Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
192 | | ... | ${tg_to_dut2_if1} | ${tg_to_dut2_if2}