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