| 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 | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 9 | Using Neutron with a Single Interface | 
 | 10 | ===================================== | 
 | 11 |  | 
 | 12 | In some instances, like on a developer laptop, there is only one | 
 | 13 | network interface that is available. In this scenario, the physical | 
 | 14 | interface is added to the Open vSwitch bridge, and the IP address of | 
 | 15 | the laptop is migrated onto the bridge interface. That way, the | 
 | 16 | physical interface can be used to transmit tenant network traffic, | 
 | 17 | the OpenStack API traffic, and management traffic. | 
 | 18 |  | 
 | 19 |  | 
 | 20 | Physical Network Setup | 
 | 21 | ---------------------- | 
 | 22 |  | 
 | 23 | In most cases where DevStack is being deployed with a single | 
 | 24 | interface, there is a hardware router that is being used for external | 
 | 25 | connectivity and DHCP. The developer machine is connected to this | 
 | 26 | network and is on a shared subnet with other machines. | 
 | 27 |  | 
 | 28 | .. nwdiag:: | 
 | 29 |  | 
 | 30 |         nwdiag { | 
 | 31 |                 inet [ shape = cloud ]; | 
 | 32 |                 router; | 
 | 33 |                 inet -- router; | 
 | 34 |  | 
 | 35 |                 network hardware_network { | 
 | 36 |                         address = "172.18.161.0/24" | 
 | 37 |                         router [ address = "172.18.161.1" ]; | 
| Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 38 |                         devstack-1 [ address = "172.18.161.6" ]; | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 39 |                 } | 
 | 40 |         } | 
 | 41 |  | 
 | 42 |  | 
 | 43 | DevStack Configuration | 
 | 44 | ---------------------- | 
 | 45 |  | 
| Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 46 | The following is a complete `local.conf` for the host named | 
 | 47 | `devstack-1`. It will run all the API and services, as well as | 
 | 48 | serving as a hypervisor for guest instances. | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 49 |  | 
 | 50 | :: | 
 | 51 |  | 
| Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 52 |         [[local|localrc]] | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 53 |         HOST_IP=172.18.161.6 | 
 | 54 |         SERVICE_HOST=172.18.161.6 | 
 | 55 |         MYSQL_HOST=172.18.161.6 | 
 | 56 |         RABBIT_HOST=172.18.161.6 | 
 | 57 |         GLANCE_HOSTPORT=172.18.161.6:9292 | 
 | 58 |         ADMIN_PASSWORD=secrete | 
| Swapnil (coolsvap) Kulkarni | c988bf6 | 2015-10-08 13:10:43 +0530 | [diff] [blame] | 59 |         DATABASE_PASSWORD=secrete | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 60 |         RABBIT_PASSWORD=secrete | 
 | 61 |         SERVICE_PASSWORD=secrete | 
 | 62 |         SERVICE_TOKEN=secrete | 
 | 63 |  | 
| Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 64 |         # Do not use Nova-Network | 
 | 65 |         disable_service n-net | 
 | 66 |         # Enable Neutron | 
 | 67 |         ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3 | 
 | 68 |  | 
 | 69 |  | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 70 |         ## Neutron options | 
 | 71 |         Q_USE_SECGROUP=True | 
| Christian Berendt | 1c39482 | 2015-09-10 12:15:16 +0200 | [diff] [blame] | 72 |         FLOATING_RANGE="172.18.161.0/24" | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 73 |         FIXED_RANGE="10.0.0.0/24" | 
 | 74 |         Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254 | 
 | 75 |         PUBLIC_NETWORK_GATEWAY="172.18.161.1" | 
 | 76 |         Q_L3_ENABLED=True | 
 | 77 |         PUBLIC_INTERFACE=eth0 | 
 | 78 |         Q_USE_PROVIDERNET_FOR_PUBLIC=True | 
 | 79 |         OVS_PHYSICAL_BRIDGE=br-ex | 
 | 80 |         PUBLIC_BRIDGE=br-ex | 
 | 81 |         OVS_BRIDGE_MAPPINGS=public:br-ex | 
 | 82 |  | 
 | 83 |  | 
| Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 84 | Adding Additional Compute Nodes | 
 | 85 | ------------------------------- | 
 | 86 |  | 
 | 87 | Let's suppose that after installing DevStack on the first host, you | 
 | 88 | also want to do multinode testing and networking. | 
 | 89 |  | 
 | 90 | Physical Network Setup | 
 | 91 | ~~~~~~~~~~~~~~~~~~~~~~ | 
 | 92 |  | 
 | 93 | .. nwdiag:: | 
 | 94 |  | 
 | 95 |         nwdiag { | 
 | 96 |                 inet [ shape = cloud ]; | 
 | 97 |                 router; | 
 | 98 |                 inet -- router; | 
 | 99 |  | 
 | 100 |                 network hardware_network { | 
 | 101 |                         address = "172.18.161.0/24" | 
 | 102 |                         router [ address = "172.18.161.1" ]; | 
 | 103 |                         devstack-1 [ address = "172.18.161.6" ]; | 
 | 104 |                         devstack-2 [ address = "172.18.161.7" ]; | 
 | 105 |                 } | 
 | 106 |         } | 
 | 107 |  | 
 | 108 |  | 
 | 109 | After DevStack installs and configures Neutron, traffic from guest VMs | 
 | 110 | flows out of `devstack-2` (the compute node) and is encapsulated in a | 
 | 111 | VXLAN tunnel back to `devstack-1` (the control node) where the L3 | 
 | 112 | agent is running. | 
 | 113 |  | 
 | 114 | :: | 
 | 115 |  | 
 | 116 |     stack@devstack-2:~/devstack$ sudo ovs-vsctl show | 
 | 117 |     8992d965-0ba0-42fd-90e9-20ecc528bc29 | 
 | 118 |         Bridge br-int | 
 | 119 |             fail_mode: secure | 
 | 120 |             Port br-int | 
 | 121 |                 Interface br-int | 
 | 122 |                     type: internal | 
 | 123 |             Port patch-tun | 
 | 124 |                 Interface patch-tun | 
 | 125 |                     type: patch | 
 | 126 |                     options: {peer=patch-int} | 
 | 127 |         Bridge br-tun | 
 | 128 |             fail_mode: secure | 
 | 129 |             Port "vxlan-c0a801f6" | 
 | 130 |                 Interface "vxlan-c0a801f6" | 
 | 131 |                     type: vxlan | 
 | 132 |                     options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"} | 
 | 133 |             Port patch-int | 
 | 134 |                 Interface patch-int | 
 | 135 |                     type: patch | 
 | 136 |                     options: {peer=patch-tun} | 
 | 137 |             Port br-tun | 
 | 138 |                 Interface br-tun | 
 | 139 |                     type: internal | 
 | 140 |         ovs_version: "2.0.2" | 
 | 141 |  | 
 | 142 | Open vSwitch on the control node, where the L3 agent runs, is | 
 | 143 | configured to de-encapsulate traffic from compute nodes, then forward | 
 | 144 | it over the `br-ex` bridge, where `eth0` is attached. | 
 | 145 |  | 
 | 146 | :: | 
 | 147 |  | 
 | 148 |     stack@devstack-1:~/devstack$ sudo ovs-vsctl show | 
 | 149 |     422adeea-48d1-4a1f-98b1-8e7239077964 | 
 | 150 |         Bridge br-tun | 
 | 151 |             fail_mode: secure | 
 | 152 |             Port br-tun | 
 | 153 |                 Interface br-tun | 
 | 154 |                     type: internal | 
 | 155 |             Port patch-int | 
 | 156 |                 Interface patch-int | 
 | 157 |                     type: patch | 
 | 158 |                     options: {peer=patch-tun} | 
 | 159 |             Port "vxlan-c0a801d8" | 
 | 160 |                 Interface "vxlan-c0a801d8" | 
 | 161 |                     type: vxlan | 
 | 162 |                     options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"} | 
 | 163 |         Bridge br-ex | 
 | 164 |             Port phy-br-ex | 
 | 165 |                 Interface phy-br-ex | 
 | 166 |                     type: patch | 
 | 167 |                     options: {peer=int-br-ex} | 
 | 168 |             Port "eth0" | 
 | 169 |                 Interface "eth0" | 
 | 170 |             Port br-ex | 
 | 171 |                 Interface br-ex | 
 | 172 |                     type: internal | 
 | 173 |         Bridge br-int | 
 | 174 |             fail_mode: secure | 
 | 175 |             Port "tapce66332d-ea" | 
 | 176 |                 tag: 1 | 
 | 177 |                 Interface "tapce66332d-ea" | 
 | 178 |                     type: internal | 
 | 179 |             Port "qg-65e5a4b9-15" | 
 | 180 |                 tag: 2 | 
 | 181 |                 Interface "qg-65e5a4b9-15" | 
 | 182 |                     type: internal | 
 | 183 |             Port "qr-33e5e471-88" | 
 | 184 |                 tag: 1 | 
 | 185 |                 Interface "qr-33e5e471-88" | 
 | 186 |                     type: internal | 
 | 187 |             Port "qr-acbe9951-70" | 
 | 188 |                 tag: 1 | 
 | 189 |                 Interface "qr-acbe9951-70" | 
 | 190 |                     type: internal | 
 | 191 |             Port br-int | 
 | 192 |                 Interface br-int | 
 | 193 |                     type: internal | 
 | 194 |             Port patch-tun | 
 | 195 |                 Interface patch-tun | 
 | 196 |                     type: patch | 
 | 197 |                     options: {peer=patch-int} | 
 | 198 |             Port int-br-ex | 
 | 199 |                 Interface int-br-ex | 
 | 200 |                     type: patch | 
 | 201 |                     options: {peer=phy-br-ex} | 
 | 202 |         ovs_version: "2.0.2" | 
 | 203 |  | 
 | 204 | `br-int` is a bridge that the Open vSwitch mechanism driver creates, | 
 | 205 | which is used as the "integration bridge" where ports are created, and | 
 | 206 | plugged into the virtual switching fabric. `br-ex` is an OVS bridge | 
 | 207 | that is used to connect physical ports (like `eth0`), so that floating | 
 | 208 | IP traffic for tenants can be received from the physical network | 
 | 209 | infrastructure (and the internet), and routed to tenant network ports. | 
 | 210 | `br-tun` is a tunnel bridge that is used to connect OpenStack nodes | 
 | 211 | (like `devstack-2`) together. This bridge is used so that tenant | 
 | 212 | network traffic, using the VXLAN tunneling protocol, flows between | 
 | 213 | each compute node where tenant instances run. | 
 | 214 |  | 
 | 215 |  | 
 | 216 |  | 
 | 217 | DevStack Compute Configuration | 
 | 218 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
 | 219 |  | 
 | 220 | The host `devstack-2` has a very minimal `local.conf`. | 
 | 221 |  | 
 | 222 | :: | 
 | 223 |  | 
 | 224 |     [[local|localrc]] | 
 | 225 |     HOST_IP=172.18.161.7 | 
 | 226 |     SERVICE_HOST=172.18.161.6 | 
 | 227 |     MYSQL_HOST=172.18.161.6 | 
 | 228 |     RABBIT_HOST=172.18.161.6 | 
 | 229 |     GLANCE_HOSTPORT=172.18.161.6:9292 | 
 | 230 |     ADMIN_PASSWORD=secrete | 
 | 231 |     MYSQL_PASSWORD=secrete | 
 | 232 |     RABBIT_PASSWORD=secrete | 
 | 233 |     SERVICE_PASSWORD=secrete | 
 | 234 |     SERVICE_TOKEN=secrete | 
 | 235 |  | 
 | 236 |     ## Neutron options | 
 | 237 |     PUBLIC_INTERFACE=eth0 | 
 | 238 |     ENABLED_SERVICES=n-cpu,rabbit,q-agt | 
 | 239 |  | 
 | 240 | Network traffic from `eth0` on the compute nodes is then NAT'd by the | 
 | 241 | controller node that runs Neutron's `neutron-l3-agent` and provides L3 | 
 | 242 | connectivity. | 
 | 243 |  | 
| Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 244 |  | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 245 | Neutron Networking with Open vSwitch and Provider Networks | 
 | 246 | ========================================================== | 
 | 247 |  | 
| Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 248 | In some instances, it is desirable to use neutron's provider | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 249 | networking extension, so that networks that are configured on an | 
| Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 250 | external router can be utilized by neutron, and instances created via | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 251 | Nova can attach to the network managed by the external router. | 
 | 252 |  | 
 | 253 | For example, in some lab environments, a hardware router has been | 
 | 254 | pre-configured by another party, and an OpenStack developer has been | 
 | 255 | given a VLAN tag and IP address range, so that instances created via | 
 | 256 | DevStack will use the external router for L3 connectivity, as opposed | 
| Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 257 | to the neutron L3 service. | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 258 |  | 
| Sean M. Collins | 4696db9 | 2015-10-09 12:31:57 -0400 | [diff] [blame] | 259 | Physical Network Setup | 
 | 260 | ---------------------- | 
 | 261 |  | 
 | 262 | .. nwdiag:: | 
 | 263 |  | 
 | 264 |         nwdiag { | 
 | 265 |                 inet [ shape = cloud ]; | 
 | 266 |                 router; | 
 | 267 |                 inet -- router; | 
 | 268 |  | 
 | 269 |                 network provider_net { | 
 | 270 |                         address = "203.0.113.0/24" | 
 | 271 |                         router [ address = "203.0.113.1" ]; | 
 | 272 |                         controller; | 
 | 273 |                         compute1; | 
 | 274 |                         compute2; | 
 | 275 |                 } | 
 | 276 |  | 
 | 277 |                 network control_plane { | 
 | 278 |                         router [ address = "10.0.0.1" ] | 
 | 279 |                         address = "10.0.0.0/24" | 
 | 280 |                         controller [ address = "10.0.0.2" ] | 
 | 281 |                         compute1 [ address = "10.0.0.3" ] | 
 | 282 |                         compute2 [ address = "10.0.0.4" ] | 
 | 283 |                 } | 
 | 284 |         } | 
 | 285 |  | 
 | 286 |  | 
| Sean M. Collins | 887f182 | 2015-10-12 10:36:34 -0400 | [diff] [blame] | 287 | On a compute node, the first interface, eth0 is used for the OpenStack | 
 | 288 | management (API, message bus, etc) as well as for ssh for an | 
 | 289 | administrator to access the machine. | 
 | 290 |  | 
 | 291 | :: | 
 | 292 |  | 
 | 293 |         stack@compute:~$ ifconfig eth0 | 
 | 294 |         eth0      Link encap:Ethernet  HWaddr bc:16:65:20:af:fc | 
 | 295 |                   inet addr:10.0.0.3 | 
 | 296 |  | 
 | 297 | eth1 is manually configured at boot to not have an IP address. | 
 | 298 | Consult your operating system documentation for the appropriate | 
 | 299 | technique. For Ubuntu, the contents of `/etc/network/interfaces` | 
 | 300 | contains: | 
 | 301 |  | 
 | 302 | :: | 
 | 303 |  | 
 | 304 |         auto eth1 | 
 | 305 |         iface eth1 inet manual | 
 | 306 |                 up ifconfig $IFACE 0.0.0.0 up | 
 | 307 |                 down ifconfig $IFACE 0.0.0.0 down | 
 | 308 |  | 
 | 309 | The second physical interface, eth1 is added to a bridge (in this case | 
 | 310 | named br-ex), which is used to forward network traffic from guest VMs. | 
 | 311 |  | 
 | 312 | :: | 
 | 313 |  | 
 | 314 |         stack@compute:~$ sudo ovs-vsctl add-br br-ex | 
 | 315 |         stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1 | 
 | 316 |         stack@compute:~$ sudo ovs-vsctl show | 
 | 317 |         9a25c837-32ab-45f6-b9f2-1dd888abcf0f | 
 | 318 |             Bridge br-ex | 
 | 319 |                 Port br-ex | 
 | 320 |                     Interface br-ex | 
 | 321 |                         type: internal | 
 | 322 |                 Port phy-br-ex | 
 | 323 |                     Interface phy-br-ex | 
 | 324 |                         type: patch | 
 | 325 |                         options: {peer=int-br-ex} | 
 | 326 |                 Port "eth1" | 
 | 327 |                     Interface "eth1" | 
 | 328 |  | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 329 |  | 
 | 330 | Service Configuration | 
 | 331 | --------------------- | 
 | 332 |  | 
 | 333 | **Control Node** | 
 | 334 |  | 
 | 335 | In this example, the control node will run the majority of the | 
| Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 336 | OpenStack API and management services (keystone, glance, | 
 | 337 | nova, neutron) | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 338 |  | 
 | 339 |  | 
 | 340 | **Compute Nodes** | 
 | 341 |  | 
 | 342 | In this example, the nodes that will host guest instances will run | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 343 | the ``neutron-openvswitch-agent`` for network connectivity, as well as | 
 | 344 | the compute service ``nova-compute``. | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 345 |  | 
 | 346 | DevStack Configuration | 
 | 347 | ---------------------- | 
 | 348 |  | 
 | 349 | The following is a snippet of the DevStack configuration on the | 
 | 350 | controller node. | 
 | 351 |  | 
 | 352 | :: | 
 | 353 |  | 
| Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 354 |         HOST_IP=10.0.0.2 | 
 | 355 |         SERVICE_HOST=10.0.0.2 | 
 | 356 |         MYSQL_HOST=10.0.0.2 | 
 | 357 |         SERVICE_HOST=10.0.0.2 | 
 | 358 |         MYSQL_HOST=10.0.0.2 | 
 | 359 |         RABBIT_HOST=10.0.0.2 | 
 | 360 |         GLANCE_HOSTPORT=10.0.0.2:9292 | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 361 |         PUBLIC_INTERFACE=eth1 | 
 | 362 |  | 
| Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 363 |         ADMIN_PASSWORD=secrete | 
 | 364 |         MYSQL_PASSWORD=secrete | 
 | 365 |         RABBIT_PASSWORD=secrete | 
 | 366 |         SERVICE_PASSWORD=secrete | 
 | 367 |         SERVICE_TOKEN=secrete | 
 | 368 |  | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 369 |         ## Neutron options | 
 | 370 |         Q_USE_SECGROUP=True | 
 | 371 |         ENABLE_TENANT_VLANS=True | 
 | 372 |         TENANT_VLAN_RANGE=3001:4000 | 
 | 373 |         PHYSICAL_NETWORK=default | 
 | 374 |         OVS_PHYSICAL_BRIDGE=br-ex | 
 | 375 |  | 
 | 376 |         Q_USE_PROVIDER_NETWORKING=True | 
 | 377 |         Q_L3_ENABLED=False | 
 | 378 |  | 
 | 379 |         # Do not use Nova-Network | 
 | 380 |         disable_service n-net | 
 | 381 |  | 
 | 382 |         # Neutron | 
 | 383 |         ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt | 
 | 384 |  | 
 | 385 |         ## Neutron Networking options used to create Neutron Subnets | 
 | 386 |  | 
| Sean M. Collins | d72b839 | 2015-06-18 12:40:09 -0400 | [diff] [blame] | 387 |         FIXED_RANGE="203.0.113.0/24" | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 388 |         PROVIDER_SUBNET_NAME="provider_net" | 
 | 389 |         PROVIDER_NETWORK_TYPE="vlan" | 
 | 390 |         SEGMENTATION_ID=2010 | 
 | 391 |  | 
 | 392 | In this configuration we are defining FIXED_RANGE to be a | 
| Sean M. Collins | d72b839 | 2015-06-18 12:40:09 -0400 | [diff] [blame] | 393 | publicly routed IPv4 subnet. In this specific instance we are using | 
 | 394 | the special TEST-NET-3 subnet defined in `RFC 5737 <http://tools.ietf.org/html/rfc5737>`_, | 
 | 395 | which is used for documentation.  In your DevStack setup, FIXED_RANGE | 
 | 396 | would be a public IP address range that you or your organization has | 
 | 397 | allocated to you, so that you could access your instances from the | 
 | 398 | public internet. | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 399 |  | 
| Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 400 | The following is the DevStack configuration on  | 
 | 401 | compute node 1. | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 402 |  | 
 | 403 | :: | 
 | 404 |  | 
| Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 405 |         HOST_IP=10.0.0.3 | 
 | 406 |         SERVICE_HOST=10.0.0.2 | 
 | 407 |         MYSQL_HOST=10.0.0.2 | 
 | 408 |         SERVICE_HOST=10.0.0.2 | 
 | 409 |         MYSQL_HOST=10.0.0.2 | 
 | 410 |         RABBIT_HOST=10.0.0.2 | 
 | 411 |         GLANCE_HOSTPORT=10.0.0.2:9292 | 
 | 412 |         ADMIN_PASSWORD=secrete | 
 | 413 |         MYSQL_PASSWORD=secrete | 
 | 414 |         RABBIT_PASSWORD=secrete | 
 | 415 |         SERVICE_PASSWORD=secrete | 
 | 416 |         SERVICE_TOKEN=secrete | 
 | 417 |  | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 418 |         # Services that a compute node runs | 
 | 419 |         ENABLED_SERVICES=n-cpu,rabbit,q-agt | 
 | 420 |  | 
 | 421 |         ## Neutron options | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 422 |         PHYSICAL_NETWORK=default | 
 | 423 |         OVS_PHYSICAL_BRIDGE=br-ex | 
 | 424 |         PUBLIC_INTERFACE=eth1 | 
 | 425 |         Q_USE_PROVIDER_NETWORKING=True | 
 | 426 |         Q_L3_ENABLED=False | 
 | 427 |  | 
| Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 428 | Compute node 2's configuration will be exactly the same, except | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 429 | ``HOST_IP`` will be ``10.0.0.4`` | 
| Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 430 |  | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 431 | When DevStack is configured to use provider networking (via | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 432 | ``Q_USE_PROVIDER_NETWORKING`` is True and ``Q_L3_ENABLED`` is False) - | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 433 | DevStack will automatically add the network interface defined in | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 434 | ``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE`` | 
| Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 435 |  | 
 | 436 | For example, with the above  configuration, a bridge is | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 437 | created, named ``br-ex`` which is managed by Open vSwitch, and the | 
 | 438 | second interface on the compute node, ``eth1`` is attached to the | 
| Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 439 | bridge, to forward traffic sent by guest VMs. | 
| Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 440 |  | 
 | 441 | Miscellaneous Tips | 
 | 442 | ================== | 
 | 443 |  | 
 | 444 |  | 
 | 445 | Disabling Next Generation Firewall Tools | 
 | 446 | ---------------------------------------- | 
 | 447 |  | 
 | 448 | DevStack does not properly operate with modern firewall tools.  Specifically | 
 | 449 | it will appear as if the guest VM can access the external network via ICMP, | 
 | 450 | but UDP and TCP packets will not be delivered to the guest VM.  The root cause | 
 | 451 | of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's | 
 | 452 | firewall manager) apply firewall rules to all interfaces in the system, rather | 
 | 453 | then per-device.  One solution to this problem is to revert to iptables | 
 | 454 | functionality. | 
 | 455 |  | 
 | 456 | To get a functional firewall configuration for Fedora do the following: | 
 | 457 |  | 
 | 458 | :: | 
 | 459 |  | 
 | 460 |          sudo service iptables save | 
 | 461 |          sudo systemctl disable firewalld | 
 | 462 |          sudo systemctl enable iptables | 
 | 463 |          sudo systemctl stop firewalld | 
 | 464 |          sudo systemctl start iptables | 
 | 465 |  | 
 | 466 |  | 
 | 467 | To get a functional firewall configuration for distributions containing ufw, | 
 | 468 | disable ufw.  Note ufw is generally not enabled by default in Ubuntu.  To | 
 | 469 | disable ufw if it was enabled, do the following: | 
 | 470 |  | 
 | 471 | :: | 
 | 472 |  | 
 | 473 |         sudo service iptables save | 
 | 474 |         sudo ufw disable | 
 | 475 |  | 
| Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 476 | Configuring Extension Drivers for the ML2 Plugin | 
 | 477 | ------------------------------------------------ | 
| Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 478 |  | 
| Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 479 | Extension drivers for the ML2 plugin are set with the variable | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 480 | ``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension | 
| Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 481 | by default. If you want to remove all the extension drivers (even | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 482 | 'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank. | 
| Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 483 |  |