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 |
Mike Spreitzer | 4baa4ce | 2016-01-26 14:06:17 -0500 | [diff] [blame^] | 26 | network and is on a shared subnet with other machines. The |
| 27 | `local.conf` exhibited here assumes that 1500 is a reasonable MTU to |
| 28 | use on that network. |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 29 | |
| 30 | .. nwdiag:: |
| 31 | |
| 32 | nwdiag { |
| 33 | inet [ shape = cloud ]; |
| 34 | router; |
| 35 | inet -- router; |
| 36 | |
| 37 | network hardware_network { |
| 38 | address = "172.18.161.0/24" |
| 39 | router [ address = "172.18.161.1" ]; |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 40 | devstack-1 [ address = "172.18.161.6" ]; |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 41 | } |
| 42 | } |
| 43 | |
| 44 | |
| 45 | DevStack Configuration |
| 46 | ---------------------- |
| 47 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 48 | The following is a complete `local.conf` for the host named |
| 49 | `devstack-1`. It will run all the API and services, as well as |
| 50 | serving as a hypervisor for guest instances. |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 51 | |
| 52 | :: |
| 53 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 54 | [[local|localrc]] |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 55 | HOST_IP=172.18.161.6 |
| 56 | SERVICE_HOST=172.18.161.6 |
| 57 | MYSQL_HOST=172.18.161.6 |
| 58 | RABBIT_HOST=172.18.161.6 |
| 59 | GLANCE_HOSTPORT=172.18.161.6:9292 |
| 60 | ADMIN_PASSWORD=secrete |
Swapnil (coolsvap) Kulkarni | c988bf6 | 2015-10-08 13:10:43 +0530 | [diff] [blame] | 61 | DATABASE_PASSWORD=secrete |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 62 | RABBIT_PASSWORD=secrete |
| 63 | SERVICE_PASSWORD=secrete |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 64 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 65 | # Do not use Nova-Network |
| 66 | disable_service n-net |
| 67 | # Enable Neutron |
| 68 | ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3 |
| 69 | |
| 70 | |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 71 | ## Neutron options |
| 72 | Q_USE_SECGROUP=True |
Christian Berendt | 1c39482 | 2015-09-10 12:15:16 +0200 | [diff] [blame] | 73 | FLOATING_RANGE="172.18.161.0/24" |
Sean M. Collins | 02ae50d | 2015-03-20 09:58:55 -0700 | [diff] [blame] | 74 | FIXED_RANGE="10.0.0.0/24" |
| 75 | Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254 |
| 76 | PUBLIC_NETWORK_GATEWAY="172.18.161.1" |
| 77 | Q_L3_ENABLED=True |
| 78 | PUBLIC_INTERFACE=eth0 |
| 79 | Q_USE_PROVIDERNET_FOR_PUBLIC=True |
| 80 | OVS_PHYSICAL_BRIDGE=br-ex |
| 81 | PUBLIC_BRIDGE=br-ex |
| 82 | OVS_BRIDGE_MAPPINGS=public:br-ex |
| 83 | |
| 84 | |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 85 | Adding Additional Compute Nodes |
| 86 | ------------------------------- |
| 87 | |
| 88 | Let's suppose that after installing DevStack on the first host, you |
| 89 | also want to do multinode testing and networking. |
| 90 | |
| 91 | Physical Network Setup |
| 92 | ~~~~~~~~~~~~~~~~~~~~~~ |
| 93 | |
| 94 | .. nwdiag:: |
| 95 | |
| 96 | nwdiag { |
| 97 | inet [ shape = cloud ]; |
| 98 | router; |
| 99 | inet -- router; |
| 100 | |
| 101 | network hardware_network { |
| 102 | address = "172.18.161.0/24" |
| 103 | router [ address = "172.18.161.1" ]; |
| 104 | devstack-1 [ address = "172.18.161.6" ]; |
| 105 | devstack-2 [ address = "172.18.161.7" ]; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | |
| 110 | After DevStack installs and configures Neutron, traffic from guest VMs |
| 111 | flows out of `devstack-2` (the compute node) and is encapsulated in a |
| 112 | VXLAN tunnel back to `devstack-1` (the control node) where the L3 |
| 113 | agent is running. |
| 114 | |
| 115 | :: |
| 116 | |
| 117 | stack@devstack-2:~/devstack$ sudo ovs-vsctl show |
| 118 | 8992d965-0ba0-42fd-90e9-20ecc528bc29 |
| 119 | Bridge br-int |
| 120 | fail_mode: secure |
| 121 | Port br-int |
| 122 | Interface br-int |
| 123 | type: internal |
| 124 | Port patch-tun |
| 125 | Interface patch-tun |
| 126 | type: patch |
| 127 | options: {peer=patch-int} |
| 128 | Bridge br-tun |
| 129 | fail_mode: secure |
| 130 | Port "vxlan-c0a801f6" |
| 131 | Interface "vxlan-c0a801f6" |
| 132 | type: vxlan |
| 133 | options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"} |
| 134 | Port patch-int |
| 135 | Interface patch-int |
| 136 | type: patch |
| 137 | options: {peer=patch-tun} |
| 138 | Port br-tun |
| 139 | Interface br-tun |
| 140 | type: internal |
| 141 | ovs_version: "2.0.2" |
| 142 | |
| 143 | Open vSwitch on the control node, where the L3 agent runs, is |
| 144 | configured to de-encapsulate traffic from compute nodes, then forward |
| 145 | it over the `br-ex` bridge, where `eth0` is attached. |
| 146 | |
| 147 | :: |
| 148 | |
| 149 | stack@devstack-1:~/devstack$ sudo ovs-vsctl show |
| 150 | 422adeea-48d1-4a1f-98b1-8e7239077964 |
| 151 | Bridge br-tun |
| 152 | fail_mode: secure |
| 153 | Port br-tun |
| 154 | Interface br-tun |
| 155 | type: internal |
| 156 | Port patch-int |
| 157 | Interface patch-int |
| 158 | type: patch |
| 159 | options: {peer=patch-tun} |
| 160 | Port "vxlan-c0a801d8" |
| 161 | Interface "vxlan-c0a801d8" |
| 162 | type: vxlan |
| 163 | options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"} |
| 164 | Bridge br-ex |
| 165 | Port phy-br-ex |
| 166 | Interface phy-br-ex |
| 167 | type: patch |
| 168 | options: {peer=int-br-ex} |
| 169 | Port "eth0" |
| 170 | Interface "eth0" |
| 171 | Port br-ex |
| 172 | Interface br-ex |
| 173 | type: internal |
| 174 | Bridge br-int |
| 175 | fail_mode: secure |
| 176 | Port "tapce66332d-ea" |
| 177 | tag: 1 |
| 178 | Interface "tapce66332d-ea" |
| 179 | type: internal |
| 180 | Port "qg-65e5a4b9-15" |
| 181 | tag: 2 |
| 182 | Interface "qg-65e5a4b9-15" |
| 183 | type: internal |
| 184 | Port "qr-33e5e471-88" |
| 185 | tag: 1 |
| 186 | Interface "qr-33e5e471-88" |
| 187 | type: internal |
| 188 | Port "qr-acbe9951-70" |
| 189 | tag: 1 |
| 190 | Interface "qr-acbe9951-70" |
| 191 | type: internal |
| 192 | Port br-int |
| 193 | Interface br-int |
| 194 | type: internal |
| 195 | Port patch-tun |
| 196 | Interface patch-tun |
| 197 | type: patch |
| 198 | options: {peer=patch-int} |
| 199 | Port int-br-ex |
| 200 | Interface int-br-ex |
| 201 | type: patch |
| 202 | options: {peer=phy-br-ex} |
| 203 | ovs_version: "2.0.2" |
| 204 | |
| 205 | `br-int` is a bridge that the Open vSwitch mechanism driver creates, |
| 206 | which is used as the "integration bridge" where ports are created, and |
| 207 | plugged into the virtual switching fabric. `br-ex` is an OVS bridge |
| 208 | that is used to connect physical ports (like `eth0`), so that floating |
| 209 | IP traffic for tenants can be received from the physical network |
| 210 | infrastructure (and the internet), and routed to tenant network ports. |
| 211 | `br-tun` is a tunnel bridge that is used to connect OpenStack nodes |
| 212 | (like `devstack-2`) together. This bridge is used so that tenant |
| 213 | network traffic, using the VXLAN tunneling protocol, flows between |
| 214 | each compute node where tenant instances run. |
| 215 | |
| 216 | |
| 217 | |
| 218 | DevStack Compute Configuration |
| 219 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 220 | |
| 221 | The host `devstack-2` has a very minimal `local.conf`. |
| 222 | |
| 223 | :: |
| 224 | |
| 225 | [[local|localrc]] |
| 226 | HOST_IP=172.18.161.7 |
| 227 | SERVICE_HOST=172.18.161.6 |
| 228 | MYSQL_HOST=172.18.161.6 |
| 229 | RABBIT_HOST=172.18.161.6 |
| 230 | GLANCE_HOSTPORT=172.18.161.6:9292 |
| 231 | ADMIN_PASSWORD=secrete |
| 232 | MYSQL_PASSWORD=secrete |
| 233 | RABBIT_PASSWORD=secrete |
| 234 | SERVICE_PASSWORD=secrete |
Sean M. Collins | 1650166 | 2015-10-12 11:01:44 -0400 | [diff] [blame] | 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 |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 357 | RABBIT_HOST=10.0.0.2 |
| 358 | GLANCE_HOSTPORT=10.0.0.2:9292 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 359 | PUBLIC_INTERFACE=eth1 |
| 360 | |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 361 | ADMIN_PASSWORD=secrete |
| 362 | MYSQL_PASSWORD=secrete |
| 363 | RABBIT_PASSWORD=secrete |
| 364 | SERVICE_PASSWORD=secrete |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 365 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 366 | ## Neutron options |
| 367 | Q_USE_SECGROUP=True |
| 368 | ENABLE_TENANT_VLANS=True |
| 369 | TENANT_VLAN_RANGE=3001:4000 |
| 370 | PHYSICAL_NETWORK=default |
| 371 | OVS_PHYSICAL_BRIDGE=br-ex |
| 372 | |
| 373 | Q_USE_PROVIDER_NETWORKING=True |
| 374 | Q_L3_ENABLED=False |
| 375 | |
| 376 | # Do not use Nova-Network |
| 377 | disable_service n-net |
| 378 | |
| 379 | # Neutron |
| 380 | ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt |
| 381 | |
| 382 | ## Neutron Networking options used to create Neutron Subnets |
| 383 | |
Sean M. Collins | d72b839 | 2015-06-18 12:40:09 -0400 | [diff] [blame] | 384 | FIXED_RANGE="203.0.113.0/24" |
syed ahsan shamim zaidi | 512be7d | 2015-10-20 21:20:27 +0000 | [diff] [blame] | 385 | NETWORK_GATEWAY=203.0.113.1 |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 386 | PROVIDER_SUBNET_NAME="provider_net" |
| 387 | PROVIDER_NETWORK_TYPE="vlan" |
| 388 | SEGMENTATION_ID=2010 |
| 389 | |
| 390 | In this configuration we are defining FIXED_RANGE to be a |
Sean M. Collins | d72b839 | 2015-06-18 12:40:09 -0400 | [diff] [blame] | 391 | publicly routed IPv4 subnet. In this specific instance we are using |
| 392 | the special TEST-NET-3 subnet defined in `RFC 5737 <http://tools.ietf.org/html/rfc5737>`_, |
| 393 | which is used for documentation. In your DevStack setup, FIXED_RANGE |
| 394 | would be a public IP address range that you or your organization has |
| 395 | allocated to you, so that you could access your instances from the |
| 396 | public internet. |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 397 | |
John Kasperski | bdc0fa8 | 2015-11-23 11:56:33 -0600 | [diff] [blame] | 398 | The following is the DevStack configuration on |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 399 | compute node 1. |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 400 | |
| 401 | :: |
| 402 | |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 403 | HOST_IP=10.0.0.3 |
| 404 | SERVICE_HOST=10.0.0.2 |
| 405 | MYSQL_HOST=10.0.0.2 |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 406 | RABBIT_HOST=10.0.0.2 |
| 407 | GLANCE_HOSTPORT=10.0.0.2:9292 |
| 408 | ADMIN_PASSWORD=secrete |
| 409 | MYSQL_PASSWORD=secrete |
| 410 | RABBIT_PASSWORD=secrete |
| 411 | SERVICE_PASSWORD=secrete |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 412 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 413 | # Services that a compute node runs |
| 414 | ENABLED_SERVICES=n-cpu,rabbit,q-agt |
| 415 | |
| 416 | ## Neutron options |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 417 | PHYSICAL_NETWORK=default |
| 418 | OVS_PHYSICAL_BRIDGE=br-ex |
| 419 | PUBLIC_INTERFACE=eth1 |
| 420 | Q_USE_PROVIDER_NETWORKING=True |
| 421 | Q_L3_ENABLED=False |
| 422 | |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 423 | Compute node 2's configuration will be exactly the same, except |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 424 | ``HOST_IP`` will be ``10.0.0.4`` |
Sean M. Collins | 611cab4 | 2015-10-09 12:54:32 -0400 | [diff] [blame] | 425 | |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 426 | When DevStack is configured to use provider networking (via |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 427 | ``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] | 428 | DevStack will automatically add the network interface defined in |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 429 | ``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE`` |
Sean M. Collins | 3429601 | 2014-10-27 11:57:20 -0400 | [diff] [blame] | 430 | |
| 431 | For example, with the above configuration, a bridge is |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 432 | created, named ``br-ex`` which is managed by Open vSwitch, and the |
| 433 | second interface on the compute node, ``eth1`` is attached to the |
Shilla Saebi | 2ed09d8 | 2015-04-21 15:02:13 -0400 | [diff] [blame] | 434 | bridge, to forward traffic sent by guest VMs. |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 435 | |
| 436 | Miscellaneous Tips |
| 437 | ================== |
| 438 | |
Mike Spreitzer | 4baa4ce | 2016-01-26 14:06:17 -0500 | [diff] [blame^] | 439 | Non-Standard MTU on the Physical Network |
| 440 | ---------------------------------------- |
| 441 | |
| 442 | DevStack defaults to assume that the MTU on the physical network |
| 443 | is 1500. A different MTU can be specified by adding the following to |
| 444 | the `localrc` part of `local.conf` on each machine. |
| 445 | |
| 446 | :: |
| 447 | Q_ML2_PLUGIN_PATH_MTU=1500 |
| 448 | |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 449 | |
| 450 | Disabling Next Generation Firewall Tools |
| 451 | ---------------------------------------- |
| 452 | |
| 453 | DevStack does not properly operate with modern firewall tools. Specifically |
| 454 | it will appear as if the guest VM can access the external network via ICMP, |
| 455 | but UDP and TCP packets will not be delivered to the guest VM. The root cause |
| 456 | of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's |
| 457 | firewall manager) apply firewall rules to all interfaces in the system, rather |
| 458 | then per-device. One solution to this problem is to revert to iptables |
| 459 | functionality. |
| 460 | |
| 461 | To get a functional firewall configuration for Fedora do the following: |
| 462 | |
| 463 | :: |
| 464 | |
| 465 | sudo service iptables save |
| 466 | sudo systemctl disable firewalld |
| 467 | sudo systemctl enable iptables |
| 468 | sudo systemctl stop firewalld |
| 469 | sudo systemctl start iptables |
| 470 | |
| 471 | |
| 472 | To get a functional firewall configuration for distributions containing ufw, |
| 473 | disable ufw. Note ufw is generally not enabled by default in Ubuntu. To |
| 474 | disable ufw if it was enabled, do the following: |
| 475 | |
| 476 | :: |
| 477 | |
| 478 | sudo service iptables save |
| 479 | sudo ufw disable |
| 480 | |
Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 481 | Configuring Extension Drivers for the ML2 Plugin |
| 482 | ------------------------------------------------ |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 483 | |
Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 484 | Extension drivers for the ML2 plugin are set with the variable |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 485 | ``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension |
Sean M. Collins | d8aa10e | 2015-10-09 12:21:30 -0400 | [diff] [blame] | 486 | by default. If you want to remove all the extension drivers (even |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 487 | 'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank. |
Sean M. Collins | 872a262 | 2015-10-06 12:45:06 -0400 | [diff] [blame] | 488 | |