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