| 1 |
|
| 2 |
|
| 3 |
============== |
| 4 |
L2 Gateway API |
| 5 |
============== |
| 6 |
|
| 7 |
Until this version, the L2GW was meant to connect overlay Neutron network to |
| 8 |
bare metal servers via hardware switches. This was done by connecting the |
| 9 |
hardware switch to the local Compute Nodes using VXLAN and connecting the bare |
| 10 |
metal servers to the hardware switches physical ports. To bind the proper |
| 11 |
overlay network to the bare metal server the L2GW uses the overlay network's |
| 12 |
segmentation-id as VXLAN tunnel id and VLANs on the hardware switch. |
| 13 |
|
| 14 |
It is our intention to use this project to also support the connection of the |
| 15 |
local overlay networks with remote overlay networks. One possible scenario is to |
| 16 |
connect multiple OpenStack clouds in a way that the overlay networks could be |
| 17 |
connected and act as local networks that are connected via WAN link |
| 18 |
(inter-cloud connection). Currently the L2GW support L2 connection only but this |
| 19 |
can also be changed in the future to add L3 connection as well. |
| 20 |
|
| 21 |
To support the inter-cloud connection, the L2GW API is extended to provide a way |
| 22 |
to stretch the network between the local and the remote clouds. |
| 23 |
|
| 24 |
Note: the proposed API is an extension of the existing API and can be executed |
| 25 |
by admin users only, as the previous one. |
| 26 |
|
| 27 |
================ |
| 28 |
New API Commands |
| 29 |
================ |
| 30 |
|
| 31 |
1. Remote Gateway |
| 32 |
|
| 33 |
Remote Gateway is an entity that connects to a local Gateway using tunnel to |
| 34 |
enable connection between local and remote networks. Different networks are |
| 35 |
connected using different segmentation id. The segmentation id is implementation |
| 36 |
specific. Different implementation can use different tunnel protocol with its |
| 37 |
own tunnel key to be used as the segmentation id (VxLAN, GRE, Geneve, Etc.). |
| 38 |
Single Remote Gateway can connect to multiple local Gateways and the local |
| 39 |
networks that are attached to them. Also Local Gateway can connect to multiple |
| 40 |
Remote Gateways using multiple Remote Gateway Connections, each connection to |
| 41 |
a different Remote Gateway. |
| 42 |
|
| 43 |
1.1. Remote Gateway creation: |
| 44 |
|
| 45 |
usage: l2-remote-gateway-create <REMOTE-GATEWAY-NAME> <IP-ADDRESS> |
| 46 |
|
| 47 |
where <REMOTE-GATEWAY-NAME> is a logical name for the remote gateway |
| 48 |
and <IP-ADDRESS> is the IP address of the remote gateway which will be the end |
| 49 |
point of the tunnel. |
| 50 |
|
| 51 |
|
| 52 |
1.2. Remote Gateway update: |
| 53 |
|
| 54 |
usage: l2-remote-gateway-update <L2_REMOTE_GATEWAY> |
| 55 |
|
| 56 |
After creating a Remote Gateway, one can use this command to update the |
| 57 |
IP address or/and the gateway's logical name. |
| 58 |
|
| 59 |
1.3. Remote Gateway deletion: |
| 60 |
|
| 61 |
usage: l2-remote-gateway-delete <L2_REMOTE_GATEWAY> |
| 62 |
|
| 63 |
Use this command to delete Remote Gateway using its logical name or UUID. |
| 64 |
|
| 65 |
1.4. Remote Gateway list: |
| 66 |
|
| 67 |
usage: l2-remote-gateway-list |
| 68 |
|
| 69 |
This command lists all the Remote Gateways. A response will look like |
| 70 |
the following: |
| 71 |
|
| 72 |
+--------------------------------------+------+----------+ |
| 73 |
| id | name | ipaddr | |
| 74 |
+--------------------------------------+------+----------+ |
| 75 |
| 63821629-6cfd-44c8-8c4a-14c4b5fe28ea | rgw1 | 10.0.0.1 | |
| 76 |
+--------------------------------------+------+----------+ |
| 77 |
|
| 78 |
|
| 79 |
1.5. Remote Gateway show: |
| 80 |
|
| 81 |
usage: l2-remote-gateway-show <L2_REMOTE_GATEWAY> |
| 82 |
|
| 83 |
Get information of specific Remote Gateway using its logical name or UUID. |
| 84 |
Example of response: |
| 85 |
|
| 86 |
+--------+--------------------------------------+ |
| 87 |
| Field | Value | |
| 88 |
+--------+--------------------------------------+ |
| 89 |
| id | 63821629-6cfd-44c8-8c4a-14c4b5fe28ea | |
| 90 |
| ipaddr | 10.0.0.1 | |
| 91 |
| name | rgw1 | |
| 92 |
+--------+--------------------------------------+ |
| 93 |
|
| 94 |
|
| 95 |
2. Remote Gateway Connection |
| 96 |
|
| 97 |
Remote Gateway Connection is a connection between local and remote networks. |
| 98 |
Currently the connections are implemented using VXLAN between the local |
| 99 |
and remote switches. |
| 100 |
|
| 101 |
|
| 102 |
2.1 Remote Gateway Connection creation: |
| 103 |
|
| 104 |
Use this command to create a connection between local and remote network. |
| 105 |
|
| 106 |
usage: l2-remote-gateway-connection-create <GATEWAY-NAME/UUID> |
| 107 |
<NETWORK-NAME/UUID> |
| 108 |
<REMOTE-GATEWAY-NAME/UUID> |
| 109 |
|
| 110 |
|
| 111 |
<GATEWAY-NAME/UUID> is UUID or logical name of previously created local gateway. |
| 112 |
|
| 113 |
<NETWORK-NAME/UUID> is UUID or logical name of tenant network that was |
| 114 |
previously added to local gateway using l2-gateway-connection-create command. |
| 115 |
|
| 116 |
<REMOTE-GATEWAY-NAME/UUID> is UUID or logical name of the Remote Gateway that |
| 117 |
the remote network is connected to. |
| 118 |
|
| 119 |
--seg-id is an optional parameter that will be used as tunnel key for the |
| 120 |
connection between the local and remote Gateways. This parameter is optional and |
| 121 |
in case it will not be used, the tunnel key that will be used is the overlay |
| 122 |
network segmentation id. |
| 123 |
|
| 124 |
--flood is an optional string of True/False values that state if the local |
| 125 |
switch should flood unknown MACs or broadcast MAC to the remote connection. |
| 126 |
|
| 127 |
|
| 128 |
2.2 Remote Gateway Connection delete: |
| 129 |
|
| 130 |
usage: l2-remote-gateway-connection-delete <L2_GATEWAY_CONNECTION> |
| 131 |
|
| 132 |
use Remote Gateway UUID to delete connection to remote network. |
| 133 |
|
| 134 |
2.3 Remote Gateway Connection list: |
| 135 |
|
| 136 |
|
| 137 |
usage: l2-remote-gateway-connection-list |
| 138 |
|
| 139 |
Lists all the connection to Remote Gateways. |
| 140 |
example of response: |
| 141 |
|
| 142 |
+------------+-------------------+-----------------+-----------------+ |
| 143 |
| id | l2_gateway_id | network_id | segmentation_id | |
| 144 |
+------------+-------------------+-----------------+-----------------+ |
| 145 |
| 31c204.... | c8da3e74-fde9-... | d90db94a-2b3... | 9765 | |
| 146 |
+------------+-------------------+-----------------+-----------------+ |
| 147 |
|
| 148 |
|
| 149 |
2.4 Remote Gateway Connection show: |
| 150 |
|
| 151 |
Show information of a single connection to a Remote Gateway using the |
| 152 |
connection UUID. |
| 153 |
|
| 154 |
example: |
| 155 |
|
| 156 |
l2-remote-gateway-connection-show 31c20418-9cf2-4d47-b17e-d92906e3f248 |
| 157 |
|
| 158 |
+-----------------+--------------------------------------+ |
| 159 |
| Field | Value | |
| 160 |
+-----------------+--------------------------------------+ |
| 161 |
| id | 31c20418-9cf2-4d47-b17e-d92906e3f248 | |
| 162 |
| l2_gateway_id | c8da3e74-fde9-48e3-81f2-5fee756dd9de | |
| 163 |
| network_id | d90db94a-2b3c-4415-971f-967e2f52248d | |
| 164 |
| segmentation_id | 9765 | |
| 165 |
| tenant_id | 84429618ed684296bc48eb120acf57bc | |
| 166 |
+-----------------+--------------------------------------+ |
| 167 |
|
| 168 |
|
| 169 |
3. Remote MAC |
| 170 |
|
| 171 |
The following command could be used by orchestration application to provide |
| 172 |
information on remote hosts - their MAC address, IP address |
| 173 |
(for ARP suppression) and link them to Remote Gateway Connection for the local |
| 174 |
switch to know where to switch the packets to. |
| 175 |
|
| 176 |
3.1 Remote MAC creation: |
| 177 |
|
| 178 |
usage: l2-remote-mac-create <MAC-IP> <REMOTE-GATEWAY-CONN-UUID> |
| 179 |
|
| 180 |
<MAC-IP> is a tuple of remote host MAC address and optional IP address. |
| 181 |
The format is as followed: |
| 182 |
|
| 183 |
<MAC>[;<IP>] |
| 184 |
|
| 185 |
Where: |
| 186 |
<MAC> is the MAC address of the remote host in the form of 00:00:00:00:00:00 |
| 187 |
<IP> IP address of the remote host (optional). |
| 188 |
|
| 189 |
<REMOTE-GATEWAY-CONN-UUID> the UUID of the Remote Gateway Connection that |
| 190 |
will lead to the network where the remote host is located. |
| 191 |
|
| 192 |
REST message format: |
| 193 |
|
| 194 |
{ |
| 195 |
"remote-mac" : { |
| 196 |
"mac": "00:11:22:33:44:55', |
| 197 |
"ip": "1.2.3.4" |
| 198 |
} |
| 199 |
|
| 200 |
} |
| 201 |
|
| 202 |
|
| 203 |
3.2 Bulk Remote MAC creation |
| 204 |
|
| 205 |
To send bulk remote MAC creation to the server, the following REST message |
| 206 |
should be used: |
| 207 |
|
| 208 |
{ |
| 209 |
"remote-macs": [ |
| 210 |
{ |
| 211 |
"mac": "00:11:22:33:44:55', |
| 212 |
"ip": "1.2.3.5" |
| 213 |
}, |
| 214 |
{ |
| 215 |
"mac": "00:11:22:33:44:66', |
| 216 |
"ip": "1.2.3.6" |
| 217 |
} |
| 218 |
] |
| 219 |
} |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
3.3 Remote MAC delete: |
| 224 |
|
| 225 |
usage: l2-remote-mac-delete <L2_REMOTE_MAC> |
| 226 |
|
| 227 |
L2_REMOTE_MAC is the UUID of the MAC address to be deleted. |
| 228 |
|
| 229 |
|
| 230 |
3.4 Remote MAC list: |
| 231 |
|
| 232 |
usage: l2-remote-mac-list [--remote-connection UUID] |
| 233 |
|
| 234 |
Lists all the remote MAC addresses. |
| 235 |
example of a response: |
| 236 |
|
| 237 |
+--------------+-------------------+--------------------------------------+ |
| 238 |
| uuid | mac | ip_addr | rgw_connection | |
| 239 |
+--------------+-------------------+--------------------------------------+ |
| 240 |
| b59584eb-... | 00:11:22:33:44:55 | 192.168.10.23 | a60dc097-... | |
| 241 |
+--------------+-------------------+--------------------------------------+ |
| 242 |
|
| 243 |
if the optional remote-connection is provided, only MACs that are configured |
| 244 |
on this connection will be displayed. |
| 245 |
|
| 246 |
3.4 Remote MAC show: |
| 247 |
|
| 248 |
usage: l2-remote-mac-show <L2_REMOTE_MAC> |
| 249 |
|
| 250 |
show information of a specific MAC address using its UUID. |
| 251 |
example of response: |
| 252 |
|
| 253 |
l2-remote-mac-show b59584eb-432a-4dba-9a09-f929e77da0c7 |
| 254 |
|
| 255 |
+----------------+--------------------------------------+ |
| 256 |
| Field | Value | |
| 257 |
+----------------+--------------------------------------+ |
| 258 |
| ipaddr | 3.3.3.3 | |
| 259 |
| mac | 00:11:22:33:44:55 | |
| 260 |
| rgw_connection | a60dc097-13d7-4a9a-9842-117440911eb9 | |
| 261 |
| uuid | b59584eb-432a-4dba-9a09-f929e77da0c7 | |
| 262 |
+----------------+--------------------------------------+ |