Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 1 | ====================================== |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 2 | Using DevStack with neutron Networking |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 3 | ====================================== |
| 4 | |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 5 | This guide will walk you through using OpenStack neutron with the ML2 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 6 | plugin and the Open vSwitch mechanism driver. |
| 7 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 8 | |
Sean M. Collins | 2977b30 | 2016-01-25 09:10:52 -0500 | [diff] [blame] | 9 | .. _single-interface-ovs: |
| 10 | |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 11 | Using Neutron with a Single Interface |
| 12 | ===================================== |
| 13 | |
| 14 | In some instances, like on a developer laptop, there is only one |
| 15 | network interface that is available. In this scenario, the physical |
| 16 | interface is added to the Open vSwitch bridge, and the IP address of |
| 17 | the laptop is migrated onto the bridge interface. That way, the |
Sean Dague | db48db1 | 2016-04-06 08:09:31 -0400 | [diff] [blame] | 18 | physical interface can be used to transmit self service project |
| 19 | network traffic, the OpenStack API traffic, and management traffic. |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 20 | |
| 21 | |
Sean M. Collins | 6b1f499 | 2016-03-10 12:23:09 -0500 | [diff] [blame] | 22 | .. warning:: |
| 23 | |
| 24 | When using a single interface networking setup, there will be a |
| 25 | temporary network outage as your IP address is moved from the |
| 26 | physical NIC of your machine, to the OVS bridge. If you are SSH'd |
| 27 | into the machine from another computer, there is a risk of being |
| 28 | disconnected from your ssh session (due to arp cache |
| 29 | invalidation), which would stop the stack.sh or leave it in an |
| 30 | unfinished state. In these cases, start stack.sh inside its own |
| 31 | screen session so it can continue to run. |
| 32 | |
| 33 | |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 34 | Physical Network Setup |
| 35 | ---------------------- |
| 36 | |
| 37 | In most cases where DevStack is being deployed with a single |
| 38 | interface, there is a hardware router that is being used for external |
| 39 | connectivity and DHCP. The developer machine is connected to this |
Mike Spreitzer | 4baa4ce | 2016-01-26 14:06:17 -0500 | [diff] [blame] | 40 | network and is on a shared subnet with other machines. The |
| 41 | `local.conf` exhibited here assumes that 1500 is a reasonable MTU to |
| 42 | use on that network. |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 43 | |
Stephen Finucane | 6512f01 | 2024-08-26 12:19:06 +0100 | [diff] [blame] | 44 | .. image:: /assets/images/neutron-network-1.png |
| 45 | :alt: Network configuration for a single DevStack node |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 46 | |
| 47 | |
| 48 | DevStack Configuration |
| 49 | ---------------------- |
| 50 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 51 | The following is a complete `local.conf` for the host named |
| 52 | `devstack-1`. It will run all the API and services, as well as |
| 53 | serving as a hypervisor for guest instances. |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 54 | |
| 55 | :: |
| 56 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 57 | [[local|localrc]] |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 58 | HOST_IP=172.18.161.6 |
| 59 | SERVICE_HOST=172.18.161.6 |
| 60 | MYSQL_HOST=172.18.161.6 |
| 61 | RABBIT_HOST=172.18.161.6 |
| 62 | GLANCE_HOSTPORT=172.18.161.6:9292 |
Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 63 | ADMIN_PASSWORD=secret |
| 64 | DATABASE_PASSWORD=secret |
| 65 | RABBIT_PASSWORD=secret |
| 66 | SERVICE_PASSWORD=secret |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 67 | |
| 68 | ## Neutron options |
| 69 | Q_USE_SECGROUP=True |
Christian Berendt | 1c39482 | 2015-09-10 12:15:16 +0200 | [diff] [blame] | 70 | FLOATING_RANGE="172.18.161.0/24" |
Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 71 | IPV4_ADDRS_SAFE_TO_USE="10.0.0.0/22" |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 72 | Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254 |
| 73 | PUBLIC_NETWORK_GATEWAY="172.18.161.1" |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 74 | PUBLIC_INTERFACE=eth0 |
Sean M. Collins | 2977b30 | 2016-01-25 09:10:52 -0500 | [diff] [blame] | 75 | |
| 76 | # Open vSwitch provider networking configuration |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 77 | Q_USE_PROVIDERNET_FOR_PUBLIC=True |
| 78 | OVS_PHYSICAL_BRIDGE=br-ex |
| 79 | PUBLIC_BRIDGE=br-ex |
| 80 | OVS_BRIDGE_MAPPINGS=public:br-ex |
| 81 | |
| 82 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 83 | Adding Additional Compute Nodes |
| 84 | ------------------------------- |
| 85 | |
| 86 | Let's suppose that after installing DevStack on the first host, you |
| 87 | also want to do multinode testing and networking. |
| 88 | |
| 89 | Physical Network Setup |
| 90 | ~~~~~~~~~~~~~~~~~~~~~~ |
| 91 | |
Stephen Finucane | 6512f01 | 2024-08-26 12:19:06 +0100 | [diff] [blame] | 92 | .. image:: /assets/images/neutron-network-2.png |
| 93 | :alt: Network configuration for multiple DevStack nodes |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 94 | |
| 95 | After DevStack installs and configures Neutron, traffic from guest VMs |
| 96 | flows out of `devstack-2` (the compute node) and is encapsulated in a |
| 97 | VXLAN tunnel back to `devstack-1` (the control node) where the L3 |
| 98 | agent is running. |
| 99 | |
| 100 | :: |
| 101 | |
| 102 | stack@devstack-2:~/devstack$ sudo ovs-vsctl show |
| 103 | 8992d965-0ba0-42fd-90e9-20ecc528bc29 |
| 104 | Bridge br-int |
| 105 | fail_mode: secure |
| 106 | Port br-int |
| 107 | Interface br-int |
| 108 | type: internal |
| 109 | Port patch-tun |
| 110 | Interface patch-tun |
| 111 | type: patch |
| 112 | options: {peer=patch-int} |
| 113 | Bridge br-tun |
| 114 | fail_mode: secure |
| 115 | Port "vxlan-c0a801f6" |
| 116 | Interface "vxlan-c0a801f6" |
| 117 | type: vxlan |
| 118 | options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"} |
| 119 | Port patch-int |
| 120 | Interface patch-int |
| 121 | type: patch |
| 122 | options: {peer=patch-tun} |
| 123 | Port br-tun |
| 124 | Interface br-tun |
| 125 | type: internal |
| 126 | ovs_version: "2.0.2" |
| 127 | |
| 128 | Open vSwitch on the control node, where the L3 agent runs, is |
| 129 | configured to de-encapsulate traffic from compute nodes, then forward |
| 130 | it over the `br-ex` bridge, where `eth0` is attached. |
| 131 | |
| 132 | :: |
| 133 | |
| 134 | stack@devstack-1:~/devstack$ sudo ovs-vsctl show |
| 135 | 422adeea-48d1-4a1f-98b1-8e7239077964 |
| 136 | Bridge br-tun |
| 137 | fail_mode: secure |
| 138 | Port br-tun |
| 139 | Interface br-tun |
| 140 | type: internal |
| 141 | Port patch-int |
| 142 | Interface patch-int |
| 143 | type: patch |
| 144 | options: {peer=patch-tun} |
| 145 | Port "vxlan-c0a801d8" |
| 146 | Interface "vxlan-c0a801d8" |
| 147 | type: vxlan |
| 148 | options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"} |
| 149 | Bridge br-ex |
| 150 | Port phy-br-ex |
| 151 | Interface phy-br-ex |
| 152 | type: patch |
| 153 | options: {peer=int-br-ex} |
| 154 | Port "eth0" |
| 155 | Interface "eth0" |
| 156 | Port br-ex |
| 157 | Interface br-ex |
| 158 | type: internal |
| 159 | Bridge br-int |
| 160 | fail_mode: secure |
| 161 | Port "tapce66332d-ea" |
| 162 | tag: 1 |
| 163 | Interface "tapce66332d-ea" |
| 164 | type: internal |
| 165 | Port "qg-65e5a4b9-15" |
| 166 | tag: 2 |
| 167 | Interface "qg-65e5a4b9-15" |
| 168 | type: internal |
| 169 | Port "qr-33e5e471-88" |
| 170 | tag: 1 |
| 171 | Interface "qr-33e5e471-88" |
| 172 | type: internal |
| 173 | Port "qr-acbe9951-70" |
| 174 | tag: 1 |
| 175 | Interface "qr-acbe9951-70" |
| 176 | type: internal |
| 177 | Port br-int |
| 178 | Interface br-int |
| 179 | type: internal |
| 180 | Port patch-tun |
| 181 | Interface patch-tun |
| 182 | type: patch |
| 183 | options: {peer=patch-int} |
| 184 | Port int-br-ex |
| 185 | Interface int-br-ex |
| 186 | type: patch |
| 187 | options: {peer=phy-br-ex} |
| 188 | ovs_version: "2.0.2" |
| 189 | |
| 190 | `br-int` is a bridge that the Open vSwitch mechanism driver creates, |
| 191 | which is used as the "integration bridge" where ports are created, and |
| 192 | plugged into the virtual switching fabric. `br-ex` is an OVS bridge |
| 193 | that is used to connect physical ports (like `eth0`), so that floating |
Sean Dague | db48db1 | 2016-04-06 08:09:31 -0400 | [diff] [blame] | 194 | IP traffic for project networks can be received from the physical |
| 195 | network infrastructure (and the internet), and routed to self service |
| 196 | project network ports. `br-tun` is a tunnel bridge that is used to |
| 197 | connect OpenStack nodes (like `devstack-2`) together. This bridge is |
| 198 | used so that project network traffic, using the VXLAN tunneling |
| 199 | protocol, flows between each compute node where project instances run. |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 200 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 201 | DevStack Compute Configuration |
| 202 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 203 | |
| 204 | The host `devstack-2` has a very minimal `local.conf`. |
| 205 | |
| 206 | :: |
| 207 | |
| 208 | [[local|localrc]] |
| 209 | HOST_IP=172.18.161.7 |
| 210 | SERVICE_HOST=172.18.161.6 |
| 211 | MYSQL_HOST=172.18.161.6 |
| 212 | RABBIT_HOST=172.18.161.6 |
| 213 | GLANCE_HOSTPORT=172.18.161.6:9292 |
Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 214 | ADMIN_PASSWORD=secret |
| 215 | MYSQL_PASSWORD=secret |
| 216 | RABBIT_PASSWORD=secret |
| 217 | SERVICE_PASSWORD=secret |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 218 | |
| 219 | ## Neutron options |
| 220 | PUBLIC_INTERFACE=eth0 |
Artom Lifshitz | 7e36ded | 2018-05-02 10:38:57 -0400 | [diff] [blame] | 221 | ENABLED_SERVICES=n-cpu,rabbit,q-agt,placement-client |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 222 | |
| 223 | Network traffic from `eth0` on the compute nodes is then NAT'd by the |
| 224 | controller node that runs Neutron's `neutron-l3-agent` and provides L3 |
| 225 | connectivity. |
| 226 | |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 227 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 228 | Neutron Networking with Open vSwitch and Provider Networks |
| 229 | ========================================================== |
| 230 | |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 231 | In some instances, it is desirable to use neutron's provider |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 232 | networking extension, so that networks that are configured on an |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 233 | external router can be utilized by neutron, and instances created via |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 234 | Nova can attach to the network managed by the external router. |
| 235 | |
| 236 | For example, in some lab environments, a hardware router has been |
| 237 | pre-configured by another party, and an OpenStack developer has been |
| 238 | given a VLAN tag and IP address range, so that instances created via |
| 239 | DevStack will use the external router for L3 connectivity, as opposed |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 240 | to the neutron L3 service. |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 241 | |
Sean M. Collins | 4696db9 | 2015-10-09 12:31:57 -0400 | [diff] [blame] | 242 | Physical Network Setup |
| 243 | ---------------------- |
| 244 | |
Stephen Finucane | 6512f01 | 2024-08-26 12:19:06 +0100 | [diff] [blame] | 245 | .. image:: /assets/images/neutron-network-3.png |
| 246 | :alt: Network configuration for provider networks |
Sean M. Collins | 4696db9 | 2015-10-09 12:31:57 -0400 | [diff] [blame] | 247 | |
Sean M. Collins | 887f182 | 2015-10-12 10:36:34 -0400 | [diff] [blame] | 248 | On a compute node, the first interface, eth0 is used for the OpenStack |
| 249 | management (API, message bus, etc) as well as for ssh for an |
| 250 | administrator to access the machine. |
| 251 | |
| 252 | :: |
| 253 | |
| 254 | stack@compute:~$ ifconfig eth0 |
| 255 | eth0 Link encap:Ethernet HWaddr bc:16:65:20:af:fc |
| 256 | inet addr:10.0.0.3 |
| 257 | |
| 258 | eth1 is manually configured at boot to not have an IP address. |
| 259 | Consult your operating system documentation for the appropriate |
| 260 | technique. For Ubuntu, the contents of `/etc/network/interfaces` |
| 261 | contains: |
| 262 | |
| 263 | :: |
| 264 | |
| 265 | auto eth1 |
| 266 | iface eth1 inet manual |
| 267 | up ifconfig $IFACE 0.0.0.0 up |
| 268 | down ifconfig $IFACE 0.0.0.0 down |
| 269 | |
| 270 | The second physical interface, eth1 is added to a bridge (in this case |
| 271 | named br-ex), which is used to forward network traffic from guest VMs. |
| 272 | |
| 273 | :: |
| 274 | |
| 275 | stack@compute:~$ sudo ovs-vsctl add-br br-ex |
| 276 | stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1 |
| 277 | stack@compute:~$ sudo ovs-vsctl show |
| 278 | 9a25c837-32ab-45f6-b9f2-1dd888abcf0f |
| 279 | Bridge br-ex |
| 280 | Port br-ex |
| 281 | Interface br-ex |
| 282 | type: internal |
| 283 | Port phy-br-ex |
| 284 | Interface phy-br-ex |
| 285 | type: patch |
| 286 | options: {peer=int-br-ex} |
| 287 | Port "eth1" |
| 288 | Interface "eth1" |
| 289 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 290 | |
| 291 | Service Configuration |
| 292 | --------------------- |
| 293 | |
| 294 | **Control Node** |
| 295 | |
| 296 | In this example, the control node will run the majority of the |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 297 | OpenStack API and management services (keystone, glance, |
| 298 | nova, neutron) |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 299 | |
| 300 | |
| 301 | **Compute Nodes** |
| 302 | |
| 303 | In this example, the nodes that will host guest instances will run |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 304 | the ``neutron-openvswitch-agent`` for network connectivity, as well as |
| 305 | the compute service ``nova-compute``. |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 306 | |
| 307 | DevStack Configuration |
| 308 | ---------------------- |
| 309 | |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 310 | .. _ovs-provider-network-controller: |
| 311 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 312 | The following is a snippet of the DevStack configuration on the |
| 313 | controller node. |
| 314 | |
| 315 | :: |
| 316 | |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 317 | HOST_IP=10.0.0.2 |
| 318 | SERVICE_HOST=10.0.0.2 |
| 319 | MYSQL_HOST=10.0.0.2 |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 320 | RABBIT_HOST=10.0.0.2 |
| 321 | GLANCE_HOSTPORT=10.0.0.2:9292 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 322 | PUBLIC_INTERFACE=eth1 |
| 323 | |
Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 324 | ADMIN_PASSWORD=secret |
| 325 | MYSQL_PASSWORD=secret |
| 326 | RABBIT_PASSWORD=secret |
| 327 | SERVICE_PASSWORD=secret |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 328 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 329 | ## Neutron options |
| 330 | Q_USE_SECGROUP=True |
Matthew Edmonds | 1481322 | 2018-07-27 15:48:38 -0400 | [diff] [blame] | 331 | ENABLE_TENANT_VLANS=True |
| 332 | TENANT_VLAN_RANGE=3001:4000 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 333 | PHYSICAL_NETWORK=default |
| 334 | OVS_PHYSICAL_BRIDGE=br-ex |
| 335 | |
| 336 | Q_USE_PROVIDER_NETWORKING=True |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 337 | |
Jan Stodt | 7eb672d | 2016-08-24 15:29:06 +0200 | [diff] [blame] | 338 | disable_service q-l3 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 339 | |
| 340 | ## Neutron Networking options used to create Neutron Subnets |
| 341 | |
Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 342 | IPV4_ADDRS_SAFE_TO_USE="203.0.113.0/24" |
syed ahsan shamim zaidi | 512be7d | 2015-10-20 21:20:27 +0000 | [diff] [blame] | 343 | NETWORK_GATEWAY=203.0.113.1 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 344 | PROVIDER_SUBNET_NAME="provider_net" |
| 345 | PROVIDER_NETWORK_TYPE="vlan" |
| 346 | SEGMENTATION_ID=2010 |
rajinir | c58a155 | 2016-09-27 17:14:59 -0500 | [diff] [blame] | 347 | USE_SUBNETPOOL=False |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 348 | |
Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 349 | In this configuration we are defining IPV4_ADDRS_SAFE_TO_USE to be a |
Sean M. Collins | d72b839 | 2015-06-18 12:40:09 -0400 | [diff] [blame] | 350 | publicly routed IPv4 subnet. In this specific instance we are using |
chengebj5238 | 7893012 | 2018-01-18 15:53:27 +0800 | [diff] [blame] | 351 | the special TEST-NET-3 subnet defined in `RFC 5737 <https://tools.ietf.org/html/rfc5737>`_, |
Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 352 | which is used for documentation. In your DevStack setup, IPV4_ADDRS_SAFE_TO_USE |
Sean M. Collins | d72b839 | 2015-06-18 12:40:09 -0400 | [diff] [blame] | 353 | would be a public IP address range that you or your organization has |
| 354 | allocated to you, so that you could access your instances from the |
| 355 | public internet. |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 356 | |
John Kasperski | bdc0fa8 | 2015-11-23 11:56:33 -0600 | [diff] [blame] | 357 | The following is the DevStack configuration on |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 358 | compute node 1. |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 359 | |
| 360 | :: |
| 361 | |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 362 | HOST_IP=10.0.0.3 |
| 363 | SERVICE_HOST=10.0.0.2 |
| 364 | MYSQL_HOST=10.0.0.2 |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 365 | RABBIT_HOST=10.0.0.2 |
| 366 | GLANCE_HOSTPORT=10.0.0.2:9292 |
Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 367 | ADMIN_PASSWORD=secret |
| 368 | MYSQL_PASSWORD=secret |
| 369 | RABBIT_PASSWORD=secret |
| 370 | SERVICE_PASSWORD=secret |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 371 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 372 | # Services that a compute node runs |
| 373 | ENABLED_SERVICES=n-cpu,rabbit,q-agt |
| 374 | |
Sean M. Collins | 2977b30 | 2016-01-25 09:10:52 -0500 | [diff] [blame] | 375 | ## Open vSwitch provider networking options |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 376 | PHYSICAL_NETWORK=default |
| 377 | OVS_PHYSICAL_BRIDGE=br-ex |
| 378 | PUBLIC_INTERFACE=eth1 |
| 379 | Q_USE_PROVIDER_NETWORKING=True |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 380 | |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 381 | Compute node 2's configuration will be exactly the same, except |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 382 | ``HOST_IP`` will be ``10.0.0.4`` |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 383 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 384 | When DevStack is configured to use provider networking (via |
vsaienko | d894221 | 2016-05-13 12:51:30 +0300 | [diff] [blame] | 385 | ``Q_USE_PROVIDER_NETWORKING`` is True) - |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 386 | DevStack will automatically add the network interface defined in |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 387 | ``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE`` |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 388 | |
| 389 | For example, with the above configuration, a bridge is |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 390 | created, named ``br-ex`` which is managed by Open vSwitch, and the |
| 391 | second interface on the compute node, ``eth1`` is attached to the |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 392 | bridge, to forward traffic sent by guest VMs. |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 393 | |
| 394 | Miscellaneous Tips |
| 395 | ================== |
| 396 | |
Mike Spreitzer | 4baa4ce | 2016-01-26 14:06:17 -0500 | [diff] [blame] | 397 | Non-Standard MTU on the Physical Network |
| 398 | ---------------------------------------- |
| 399 | |
Sean M. Collins | 087ed52 | 2016-03-16 11:53:09 -0400 | [diff] [blame] | 400 | Neutron by default uses a MTU of 1500 bytes, which is |
| 401 | the standard MTU for Ethernet. |
| 402 | |
| 403 | A different MTU can be specified by adding the following to |
| 404 | the Neutron section of `local.conf`. For example, |
| 405 | if you have network equipment that supports jumbo frames, you could |
| 406 | set the MTU to 9000 bytes by adding the following |
Mike Spreitzer | 4baa4ce | 2016-01-26 14:06:17 -0500 | [diff] [blame] | 407 | |
| 408 | :: |
Sean M. Collins | f81ae88 | 2016-02-01 14:00:20 -0500 | [diff] [blame] | 409 | |
Sean M. Collins | 087ed52 | 2016-03-16 11:53:09 -0400 | [diff] [blame] | 410 | [[post-config|/$Q_PLUGIN_CONF_FILE]] |
| 411 | global_physnet_mtu = 9000 |
Mike Spreitzer | 4baa4ce | 2016-01-26 14:06:17 -0500 | [diff] [blame] | 412 | |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 413 | |
| 414 | Disabling Next Generation Firewall Tools |
| 415 | ---------------------------------------- |
| 416 | |
| 417 | DevStack does not properly operate with modern firewall tools. Specifically |
| 418 | it will appear as if the guest VM can access the external network via ICMP, |
| 419 | but UDP and TCP packets will not be delivered to the guest VM. The root cause |
| 420 | of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's |
| 421 | firewall manager) apply firewall rules to all interfaces in the system, rather |
| 422 | then per-device. One solution to this problem is to revert to iptables |
| 423 | functionality. |
| 424 | |
| 425 | To get a functional firewall configuration for Fedora do the following: |
| 426 | |
| 427 | :: |
| 428 | |
| 429 | sudo service iptables save |
| 430 | sudo systemctl disable firewalld |
| 431 | sudo systemctl enable iptables |
| 432 | sudo systemctl stop firewalld |
| 433 | sudo systemctl start iptables |
| 434 | |
| 435 | |
| 436 | To get a functional firewall configuration for distributions containing ufw, |
| 437 | disable ufw. Note ufw is generally not enabled by default in Ubuntu. To |
| 438 | disable ufw if it was enabled, do the following: |
| 439 | |
| 440 | :: |
| 441 | |
| 442 | sudo service iptables save |
| 443 | sudo ufw disable |
| 444 | |
Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 445 | Configuring Extension Drivers for the ML2 Plugin |
| 446 | ------------------------------------------------ |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 447 | |
Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 448 | Extension drivers for the ML2 plugin are set with the variable |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 449 | ``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension |
Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 450 | by default. If you want to remove all the extension drivers (even |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 451 | 'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank. |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 452 | |
Sean M. Collins | 2977b30 | 2016-01-25 09:10:52 -0500 | [diff] [blame] | 453 | |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 454 | Using MacVTap instead of Open vSwitch |
| 455 | ------------------------------------------ |
| 456 | |
| 457 | Security groups are not supported by the MacVTap agent. Due to that, devstack |
| 458 | configures the NoopFirewall driver on the compute node. |
| 459 | |
| 460 | MacVTap agent does not support l3, dhcp and metadata agent. Due to that you can |
| 461 | chose between the following deployment scenarios: |
| 462 | |
| 463 | Single node with provider networks using config drive and external l3, dhcp |
| 464 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 465 | This scenario applies, if l3 and dhcp services are provided externally, or if |
| 466 | you do not require them. |
| 467 | |
| 468 | |
| 469 | :: |
| 470 | |
| 471 | [[local|localrc]] |
| 472 | HOST_IP=10.0.0.2 |
| 473 | SERVICE_HOST=10.0.0.2 |
| 474 | MYSQL_HOST=10.0.0.2 |
| 475 | RABBIT_HOST=10.0.0.2 |
| 476 | ADMIN_PASSWORD=secret |
| 477 | MYSQL_PASSWORD=secret |
| 478 | RABBIT_PASSWORD=secret |
| 479 | SERVICE_PASSWORD=secret |
| 480 | |
| 481 | Q_ML2_PLUGIN_MECHANISM_DRIVERS=macvtap |
| 482 | Q_USE_PROVIDER_NETWORKING=True |
| 483 | |
Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 484 | enable_plugin neutron https://opendev.org/openstack/neutron |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 485 | |
| 486 | ## MacVTap agent options |
| 487 | Q_AGENT=macvtap |
| 488 | PHYSICAL_NETWORK=default |
| 489 | |
Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 490 | IPV4_ADDRS_SAFE_TO_USE="203.0.113.0/24" |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 491 | NETWORK_GATEWAY=203.0.113.1 |
| 492 | PROVIDER_SUBNET_NAME="provider_net" |
| 493 | PROVIDER_NETWORK_TYPE="vlan" |
| 494 | SEGMENTATION_ID=2010 |
rajinir | c58a155 | 2016-09-27 17:14:59 -0500 | [diff] [blame] | 495 | USE_SUBNETPOOL=False |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 496 | |
| 497 | [[post-config|/$Q_PLUGIN_CONF_FILE]] |
| 498 | [macvtap] |
| 499 | physical_interface_mappings = $PHYSICAL_NETWORK:eth1 |
| 500 | |
| 501 | [[post-config|$NOVA_CONF]] |
| 502 | force_config_drive = True |
| 503 | |
| 504 | |
| 505 | Multi node with MacVTap compute node |
| 506 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 507 | This scenario applies, if you require OpenStack provided l3, dhcp or metadata |
| 508 | services. Those are hosted on a separate controller and network node, running |
| 509 | some other l2 agent technology (in this example Open vSwitch). This node needs |
| 510 | to be configured for VLAN tenant networks. |
| 511 | |
| 512 | For OVS, a similar configuration like described in the |
| 513 | :ref:`OVS Provider Network <ovs-provider-network-controller>` section can be |
Hironori Shiina | aa7ec81 | 2016-09-28 20:21:57 +0900 | [diff] [blame] | 514 | used. Just add the following line to this local.conf, which also loads |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 515 | the MacVTap mechanism driver: |
| 516 | |
| 517 | :: |
| 518 | |
| 519 | [[local|localrc]] |
| 520 | ... |
Brian Haley | 12abc72 | 2025-02-10 13:48:37 -0500 | [diff] [blame] | 521 | Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,macvtap |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 522 | ... |
| 523 | |
| 524 | For the MacVTap compute node, use this local.conf: |
| 525 | |
| 526 | :: |
| 527 | |
| 528 | HOST_IP=10.0.0.3 |
| 529 | SERVICE_HOST=10.0.0.2 |
| 530 | MYSQL_HOST=10.0.0.2 |
| 531 | RABBIT_HOST=10.0.0.2 |
| 532 | ADMIN_PASSWORD=secret |
| 533 | MYSQL_PASSWORD=secret |
| 534 | RABBIT_PASSWORD=secret |
| 535 | SERVICE_PASSWORD=secret |
| 536 | |
| 537 | # Services that a compute node runs |
| 538 | disable_all_services |
Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 539 | enable_plugin neutron https://opendev.org/openstack/neutron |
Andreas Scheuring | 28128e2 | 2016-04-14 14:23:53 +0200 | [diff] [blame] | 540 | ENABLED_SERVICES+=n-cpu,q-agt |
| 541 | |
| 542 | ## MacVTap agent options |
| 543 | Q_AGENT=macvtap |
| 544 | PHYSICAL_NETWORK=default |
| 545 | |
| 546 | [[post-config|/$Q_PLUGIN_CONF_FILE]] |
| 547 | [macvtap] |
| 548 | physical_interface_mappings = $PHYSICAL_NETWORK:eth1 |