| 1 |
|
| 2 |
=================================== |
| 3 |
Implementation of L2 Border Gateway |
| 4 |
=================================== |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
Problem Description |
| 9 |
=================== |
| 10 |
|
| 11 |
The current implementation of the L2 Gateway connects bare metal servers |
| 12 |
connected to hardware switch to OpenStack overlay tenant networks. |
| 13 |
|
| 14 |
This spec propose an extension of the current functionality to a scenario where |
| 15 |
two or more overlay networks running on two or more different OpenStack domains |
| 16 |
(such as OpenStack instances, cells or regions) needs to be connected |
| 17 |
in Layer 2. |
| 18 |
|
| 19 |
The name - Border Gateway will be used in order to provide distinction between |
| 20 |
the L2GW functionality, which is to connect overlay network to bare metal |
| 21 |
servers and the functionality of the Border Gateway, which is to connect two or |
| 22 |
more overlay networks that resides on different clouds. |
| 23 |
|
| 24 |
The diagram below provides high level overview of the system components:: |
| 25 |
|
| 26 |
+-------------------+ |
| 27 |
| | OpenStack A |
| 28 |
| | |
| 29 |
| Computer Node | +----------------+ |
| 30 |
| | | | |
| 31 |
| +------------+ | VXLAN Tunnel | Border Gateway | <---------+ |
| 32 |
| | OVS | | <--------------> | | | |
| 33 |
| +------------+ | +----------------+ | |
| 34 |
+-------------------+ | |
| 35 |
| |
| 36 |
VXLAN | WAN |
| 37 |
Tunnel | |
| 38 |
| |
| 39 |
+-------------------+ | |
| 40 |
| | OpenStack B | |
| 41 |
| | | |
| 42 |
| Computer Node | +----------------+ | |
| 43 |
| | | | | |
| 44 |
| +------------+ | VXLAN Tunnel | Border Gateway | <---------+ |
| 45 |
| | OVS | | <--------------> | | |
| 46 |
| +------------+ | +----------------+ |
| 47 |
+-------------------+ |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
Network Segmentation Handling |
| 52 |
============================= |
| 53 |
|
| 54 |
The connection between the Border Gateway and the internal overlay network is |
| 55 |
unchanged and done by using the create gateway and create gateway-connection |
| 56 |
commands. These commands actually creates logical switch in the physical switch |
| 57 |
(L2GW device) and also create a tunnel from the logical switch to the OVS in |
| 58 |
each Compute Node. The segmentation of the overlay networks is done using the |
| 59 |
overlay network segmentation id. Each cloud manages its own segmentation id |
| 60 |
and so the usage of single end-to-end segmentation id, which is translated to |
| 61 |
VXLAN tunnel key, is hard to manage or even impossible. |
| 62 |
|
| 63 |
To overcome this challenge, the Border Gateway uses different tunnel key |
| 64 |
internally - to connect to each Compute Nodes, and externally - to connect the |
| 65 |
two Border Gateways. When configuring end-to-end connection between the overlay |
| 66 |
networks, the admin needs to make sure that the remote gateway connection uses |
| 67 |
the same segmentation id on both sides on the WAN link, as the configuration of |
| 68 |
the WAN tunnel is done on every Border Gateway separately. |
| 69 |
|
| 70 |
Following is a diagram that provides overview of the different segmentation id |
| 71 |
used by the Border Gateway:: |
| 72 |
|
| 73 |
OpenStack A |
| 74 |
+----------------+ +----------------+ |
| 75 |
| Compute Node 1 | ------------------ | Border Gateway |-----------------+ |
| 76 |
+----------------+ Seg-ID 123 +----------------+ Seg-ID 456 | |
| 77 |
| | | |
| 78 |
| Seg-ID 123 | | |
| 79 |
+----------------+ | | |
| 80 |
| Compute Node 2 | -------------------------+ | |
| 81 |
+----------------+ Seg-ID 123 | |
| 82 |
| |
| 83 |
| |
| 84 |
| |
| 85 |
OpenStack B | |
| 86 |
+----------------+ +----------------+ | |
| 87 |
| Compute Node | ------------------ | Border Gateway |-----------------+ |
| 88 |
+----------------+ Seg-ID 789 +----------------+ Seg-ID 456 |
| 89 |
|
| 90 |
|
| 91 |
The segmentation id that is used in each cloud between each of the Compute Nodes |
| 92 |
and the Border Gateway is handled by Neutron. When setting up gateway connection |
| 93 |
using l2-gateway-connection-create command, a tunnel is created between a |
| 94 |
logical switch in the Border Gateway and the OpenVSwitch in each Compute Node |
| 95 |
with the same segmentation id as the tunnel key. In the diagram above you can |
| 96 |
see segmentation ids 123 and 789 that are used for intra-cloud connection for |
| 97 |
OpenStack A and OpenStack B respectively. |
| 98 |
|
| 99 |
When setting up the connection between the Border Gateways, the admin need to |
| 100 |
provide segmentation id to be used by each of the gateways to connect the |
| 101 |
internal overlay network to the inter-cloud tunnel. |
| 102 |
|
| 103 |
The inter-cloud connection command, l2-remote-gateway-connection-create, needs |
| 104 |
to be run on the two Border Gateway while using the same segmentation id - 456 |
| 105 |
on both sides, in addition to the internal overlay network information. |
| 106 |
|
| 107 |
When configuring the inter-cloud tunnel, the segmentation id is optional and |
| 108 |
if not provided the tunnel between the Border Gateways will use the same |
| 109 |
segmentation id on this link as the id used for Border Gateway to Compute Node |
| 110 |
tunnels. |
| 111 |
|
| 112 |
|
| 113 |
OVSDB Support |
| 114 |
============= |
| 115 |
|
| 116 |
The L2 Gateway project uses OVSDB's HARDWARE VTEP schema to configure the |
| 117 |
hardware switches. The previous HARDWARE VTEP schema had a tunnel key parameter |
| 118 |
in the Logical_Switch table, which leads to a situation where all tunnels that |
| 119 |
connects to this logical switch would use the same tunnel id. The schema needs |
| 120 |
to be updated so Physical_Locator table will also have tunnel key parameter |
| 121 |
providing the ability to setup different tunnels the uses different tunnel key |
| 122 |
while connecting to a single logical switch. |
| 123 |
|
| 124 |
The tunnel setting will support hierarchical configuration in a way that if the |
| 125 |
tunnel key is configured in the Physical_Locator table, it will be used for the |
| 126 |
tunnel configuration, and if not, the tunnel key that is configured in the |
| 127 |
Logical_Switch table will be used. |
| 128 |
|
| 129 |
|
| 130 |
Tunnel Protocol Support |
| 131 |
======================= |
| 132 |
|
| 133 |
In the existing version, only VXLAN is supported as a tunnel protocol. The |
| 134 |
limitation is not a technical one but the fact that the encapsulation_type |
| 135 |
field in the Physical_Locator table is an enum with only one value: |
| 136 |
vxlan_over_ipv4. In future releases, a multi tunnel protocol support can be |
| 137 |
achieved with the different tunnel keys support for intra and inter cloud |
| 138 |
tunnels explained above by adding additional values to the encapsulation_type |
| 139 |
field. With these modifications, not only the inter-cloud and intra-cloud |
| 140 |
tunnels will be able to use other protocols than VXLAN, but the Border Gateway |
| 141 |
will be able to use different protocol for different connection (inter or intra |
| 142 |
cloud connection). |
| 143 |
|
| 144 |
Data Model Impact |
| 145 |
----------------- |
| 146 |
|
| 147 |
To support different segmentation id on each tunnel, a new column will be added |
| 148 |
to physical_locators Neutron table. |
| 149 |
|
| 150 |
Two Additional tables will be added to Neutron DB: |
| 151 |
|
| 152 |
1. l2remotegateways table that will hold remote gateway information |
| 153 |
|
| 154 |
2. l2remotegatewayconnections table that will hold configuration information |
| 155 |
for remote gateway connection. |
| 156 |
|
| 157 |
|
| 158 |
REST API Impact |
| 159 |
--------------- |
| 160 |
|
| 161 |
API commands will be added for the following: |
| 162 |
|
| 163 |
1. Create/Update/Delete/List/Show Remote Gateway configuration |
| 164 |
|
| 165 |
2. Create/Delete/List/Show Remote Gateway Connection configuration |
| 166 |
|
| 167 |
3. Create/Delete/List/Show Remote MAC configuration. This will enable adding |
| 168 |
remote host switching information. |
| 169 |
|
| 170 |
The above commands can be invoked by administrator or by special purpose |
| 171 |
process. |
| 172 |
|
| 173 |
See l2-border-gateway-api.rst document for more detailed information. |
| 174 |
|
| 175 |
|
| 176 |
Security Impact |
| 177 |
--------------- |
| 178 |
|
| 179 |
None. |
| 180 |
|
| 181 |
|
| 182 |
Notifications Impact |
| 183 |
-------------------- |
| 184 |
|
| 185 |
A cast message from the plugin to L2 gateway agents to create connection to |
| 186 |
remote gateway for unknown MAC addresses. This will instruct the switch to |
| 187 |
forward packets with unknown destination MAC addresses and broadcast |
| 188 |
destination MAC to a connection to remote gateway. |
| 189 |
|
| 190 |
A cast message from the plugin to L2 gateway agents to create remote MAC with |
| 191 |
a remote gateway connection to be used for packet forwarding. |
| 192 |
|
| 193 |
|
| 194 |
Performance Impact |
| 195 |
------------------ |
| 196 |
|
| 197 |
None |
| 198 |
|
| 199 |
IPv6 Impact |
| 200 |
----------- |
| 201 |
|
| 202 |
None |
| 203 |
|
| 204 |
Dependencies |
| 205 |
============ |
| 206 |
|
| 207 |
* L2 gateway APIs |
| 208 |
|
| 209 |
|
| 210 |
Implementation |
| 211 |
============== |
| 212 |
|
| 213 |
Assignee(s) |
| 214 |
----------- |
| 215 |
|
| 216 |
Ofer Ben-Yacov (oferby) |
| 217 |
|
| 218 |
|
| 219 |
Testing |
| 220 |
======= |
| 221 |
|
| 222 |
Tempest Tests |
| 223 |
------------- |
| 224 |
|
| 225 |
None |
| 226 |
|
| 227 |
Functional Tests |
| 228 |
---------------- |
| 229 |
|
| 230 |
None |
| 231 |
|
| 232 |
API Tests |
| 233 |
--------- |
| 234 |
None |
| 235 |
|
| 236 |
Documentation Impact |
| 237 |
==================== |
| 238 |
|
| 239 |
User Documentation |
| 240 |
------------------ |
| 241 |
|
| 242 |
Functionality and configuration details will be documented |
| 243 |
|
| 244 |
|
| 245 |
Developer Documentation |
| 246 |
----------------------- |
| 247 |
OpenStack Neutron wiki needs to be updated. |
| 248 |
See here: https://wiki.openstack.org/wiki/Neutron/L2-GW |
| 249 |
|
| 250 |
|
| 251 |
References |
| 252 |
========== |
| 253 |
|
| 254 |
API change request: https://bugs.launchpad.net/networking-l2gw/+bug/1529863 |