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