blob: 1e207970ae0b49b7b097c29826172e6bb42ec1de [file] [log] [blame]
Sean M. Collins34296012014-10-27 11:57:20 -04001======================================
Shilla Saebi2ed09d82015-04-21 15:02:13 -04002Using DevStack with neutron Networking
Sean M. Collins34296012014-10-27 11:57:20 -04003======================================
4
Shilla Saebi2ed09d82015-04-21 15:02:13 -04005This guide will walk you through using OpenStack neutron with the ML2
Sean M. Collins34296012014-10-27 11:57:20 -04006plugin and the Open vSwitch mechanism driver.
7
Sean M. Collins34296012014-10-27 11:57:20 -04008
Sean M. Collins2977b302016-01-25 09:10:52 -05009.. _single-interface-ovs:
10
Sean M. Collins02ae50d2015-03-20 09:58:55 -070011Using Neutron with a Single Interface
12=====================================
13
14In some instances, like on a developer laptop, there is only one
15network interface that is available. In this scenario, the physical
16interface is added to the Open vSwitch bridge, and the IP address of
17the laptop is migrated onto the bridge interface. That way, the
Sean Daguedb48db12016-04-06 08:09:31 -040018physical interface can be used to transmit self service project
19network traffic, the OpenStack API traffic, and management traffic.
Sean M. Collins02ae50d2015-03-20 09:58:55 -070020
21
Sean M. Collins6b1f4992016-03-10 12:23:09 -050022.. 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. Collins02ae50d2015-03-20 09:58:55 -070034Physical Network Setup
35----------------------
36
37In most cases where DevStack is being deployed with a single
38interface, there is a hardware router that is being used for external
39connectivity and DHCP. The developer machine is connected to this
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -050040network and is on a shared subnet with other machines. The
41`local.conf` exhibited here assumes that 1500 is a reasonable MTU to
42use on that network.
Sean M. Collins02ae50d2015-03-20 09:58:55 -070043
44.. nwdiag::
45
46 nwdiag {
47 inet [ shape = cloud ];
48 router;
49 inet -- router;
50
51 network hardware_network {
52 address = "172.18.161.0/24"
53 router [ address = "172.18.161.1" ];
Sean M. Collins16501662015-10-12 11:01:44 -040054 devstack-1 [ address = "172.18.161.6" ];
Sean M. Collins02ae50d2015-03-20 09:58:55 -070055 }
56 }
57
58
59DevStack Configuration
60----------------------
61
Sean M. Collins16501662015-10-12 11:01:44 -040062The following is a complete `local.conf` for the host named
63`devstack-1`. It will run all the API and services, as well as
64serving as a hypervisor for guest instances.
Sean M. Collins02ae50d2015-03-20 09:58:55 -070065
66::
67
Sean M. Collins16501662015-10-12 11:01:44 -040068 [[local|localrc]]
Sean M. Collins02ae50d2015-03-20 09:58:55 -070069 HOST_IP=172.18.161.6
70 SERVICE_HOST=172.18.161.6
71 MYSQL_HOST=172.18.161.6
72 RABBIT_HOST=172.18.161.6
73 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +000074 ADMIN_PASSWORD=secret
75 DATABASE_PASSWORD=secret
76 RABBIT_PASSWORD=secret
77 SERVICE_PASSWORD=secret
Sean M. Collins02ae50d2015-03-20 09:58:55 -070078
Sean M. Collins16501662015-10-12 11:01:44 -040079 # Do not use Nova-Network
80 disable_service n-net
81 # Enable Neutron
82 ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3
83
84
Sean M. Collins02ae50d2015-03-20 09:58:55 -070085 ## Neutron options
86 Q_USE_SECGROUP=True
Christian Berendt1c394822015-09-10 12:15:16 +020087 FLOATING_RANGE="172.18.161.0/24"
Sean M. Collins02ae50d2015-03-20 09:58:55 -070088 FIXED_RANGE="10.0.0.0/24"
89 Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
90 PUBLIC_NETWORK_GATEWAY="172.18.161.1"
91 Q_L3_ENABLED=True
92 PUBLIC_INTERFACE=eth0
Sean M. Collins2977b302016-01-25 09:10:52 -050093
94 # Open vSwitch provider networking configuration
Sean M. Collins02ae50d2015-03-20 09:58:55 -070095 Q_USE_PROVIDERNET_FOR_PUBLIC=True
96 OVS_PHYSICAL_BRIDGE=br-ex
97 PUBLIC_BRIDGE=br-ex
98 OVS_BRIDGE_MAPPINGS=public:br-ex
99
100
Sean M. Collins16501662015-10-12 11:01:44 -0400101Adding Additional Compute Nodes
102-------------------------------
103
104Let's suppose that after installing DevStack on the first host, you
105also want to do multinode testing and networking.
106
107Physical Network Setup
108~~~~~~~~~~~~~~~~~~~~~~
109
110.. nwdiag::
111
112 nwdiag {
113 inet [ shape = cloud ];
114 router;
115 inet -- router;
116
117 network hardware_network {
118 address = "172.18.161.0/24"
119 router [ address = "172.18.161.1" ];
120 devstack-1 [ address = "172.18.161.6" ];
121 devstack-2 [ address = "172.18.161.7" ];
122 }
123 }
124
125
126After DevStack installs and configures Neutron, traffic from guest VMs
127flows out of `devstack-2` (the compute node) and is encapsulated in a
128VXLAN tunnel back to `devstack-1` (the control node) where the L3
129agent is running.
130
131::
132
133 stack@devstack-2:~/devstack$ sudo ovs-vsctl show
134 8992d965-0ba0-42fd-90e9-20ecc528bc29
135 Bridge br-int
136 fail_mode: secure
137 Port br-int
138 Interface br-int
139 type: internal
140 Port patch-tun
141 Interface patch-tun
142 type: patch
143 options: {peer=patch-int}
144 Bridge br-tun
145 fail_mode: secure
146 Port "vxlan-c0a801f6"
147 Interface "vxlan-c0a801f6"
148 type: vxlan
149 options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"}
150 Port patch-int
151 Interface patch-int
152 type: patch
153 options: {peer=patch-tun}
154 Port br-tun
155 Interface br-tun
156 type: internal
157 ovs_version: "2.0.2"
158
159Open vSwitch on the control node, where the L3 agent runs, is
160configured to de-encapsulate traffic from compute nodes, then forward
161it over the `br-ex` bridge, where `eth0` is attached.
162
163::
164
165 stack@devstack-1:~/devstack$ sudo ovs-vsctl show
166 422adeea-48d1-4a1f-98b1-8e7239077964
167 Bridge br-tun
168 fail_mode: secure
169 Port br-tun
170 Interface br-tun
171 type: internal
172 Port patch-int
173 Interface patch-int
174 type: patch
175 options: {peer=patch-tun}
176 Port "vxlan-c0a801d8"
177 Interface "vxlan-c0a801d8"
178 type: vxlan
179 options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"}
180 Bridge br-ex
181 Port phy-br-ex
182 Interface phy-br-ex
183 type: patch
184 options: {peer=int-br-ex}
185 Port "eth0"
186 Interface "eth0"
187 Port br-ex
188 Interface br-ex
189 type: internal
190 Bridge br-int
191 fail_mode: secure
192 Port "tapce66332d-ea"
193 tag: 1
194 Interface "tapce66332d-ea"
195 type: internal
196 Port "qg-65e5a4b9-15"
197 tag: 2
198 Interface "qg-65e5a4b9-15"
199 type: internal
200 Port "qr-33e5e471-88"
201 tag: 1
202 Interface "qr-33e5e471-88"
203 type: internal
204 Port "qr-acbe9951-70"
205 tag: 1
206 Interface "qr-acbe9951-70"
207 type: internal
208 Port br-int
209 Interface br-int
210 type: internal
211 Port patch-tun
212 Interface patch-tun
213 type: patch
214 options: {peer=patch-int}
215 Port int-br-ex
216 Interface int-br-ex
217 type: patch
218 options: {peer=phy-br-ex}
219 ovs_version: "2.0.2"
220
221`br-int` is a bridge that the Open vSwitch mechanism driver creates,
222which is used as the "integration bridge" where ports are created, and
223plugged into the virtual switching fabric. `br-ex` is an OVS bridge
224that is used to connect physical ports (like `eth0`), so that floating
Sean Daguedb48db12016-04-06 08:09:31 -0400225IP traffic for project networks can be received from the physical
226network infrastructure (and the internet), and routed to self service
227project network ports. `br-tun` is a tunnel bridge that is used to
228connect OpenStack nodes (like `devstack-2`) together. This bridge is
229used so that project network traffic, using the VXLAN tunneling
230protocol, flows between each compute node where project instances run.
Sean M. Collins16501662015-10-12 11:01:44 -0400231
232
233
234DevStack Compute Configuration
235~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236
237The host `devstack-2` has a very minimal `local.conf`.
238
239::
240
241 [[local|localrc]]
242 HOST_IP=172.18.161.7
243 SERVICE_HOST=172.18.161.6
244 MYSQL_HOST=172.18.161.6
245 RABBIT_HOST=172.18.161.6
246 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000247 ADMIN_PASSWORD=secret
248 MYSQL_PASSWORD=secret
249 RABBIT_PASSWORD=secret
250 SERVICE_PASSWORD=secret
Sean M. Collins16501662015-10-12 11:01:44 -0400251
252 ## Neutron options
253 PUBLIC_INTERFACE=eth0
254 ENABLED_SERVICES=n-cpu,rabbit,q-agt
255
256Network traffic from `eth0` on the compute nodes is then NAT'd by the
257controller node that runs Neutron's `neutron-l3-agent` and provides L3
258connectivity.
259
Sean M. Collins02ae50d2015-03-20 09:58:55 -0700260
Sean M. Collins34296012014-10-27 11:57:20 -0400261Neutron Networking with Open vSwitch and Provider Networks
262==========================================================
263
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400264In some instances, it is desirable to use neutron's provider
Sean M. Collins34296012014-10-27 11:57:20 -0400265networking extension, so that networks that are configured on an
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400266external router can be utilized by neutron, and instances created via
Sean M. Collins34296012014-10-27 11:57:20 -0400267Nova can attach to the network managed by the external router.
268
269For example, in some lab environments, a hardware router has been
270pre-configured by another party, and an OpenStack developer has been
271given a VLAN tag and IP address range, so that instances created via
272DevStack will use the external router for L3 connectivity, as opposed
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400273to the neutron L3 service.
Sean M. Collins34296012014-10-27 11:57:20 -0400274
Sean M. Collins4696db92015-10-09 12:31:57 -0400275Physical Network Setup
276----------------------
277
278.. nwdiag::
279
280 nwdiag {
281 inet [ shape = cloud ];
282 router;
283 inet -- router;
284
285 network provider_net {
286 address = "203.0.113.0/24"
287 router [ address = "203.0.113.1" ];
288 controller;
289 compute1;
290 compute2;
291 }
292
293 network control_plane {
294 router [ address = "10.0.0.1" ]
295 address = "10.0.0.0/24"
296 controller [ address = "10.0.0.2" ]
297 compute1 [ address = "10.0.0.3" ]
298 compute2 [ address = "10.0.0.4" ]
299 }
300 }
301
302
Sean M. Collins887f1822015-10-12 10:36:34 -0400303On a compute node, the first interface, eth0 is used for the OpenStack
304management (API, message bus, etc) as well as for ssh for an
305administrator to access the machine.
306
307::
308
309 stack@compute:~$ ifconfig eth0
310 eth0 Link encap:Ethernet HWaddr bc:16:65:20:af:fc
311 inet addr:10.0.0.3
312
313eth1 is manually configured at boot to not have an IP address.
314Consult your operating system documentation for the appropriate
315technique. For Ubuntu, the contents of `/etc/network/interfaces`
316contains:
317
318::
319
320 auto eth1
321 iface eth1 inet manual
322 up ifconfig $IFACE 0.0.0.0 up
323 down ifconfig $IFACE 0.0.0.0 down
324
325The second physical interface, eth1 is added to a bridge (in this case
326named br-ex), which is used to forward network traffic from guest VMs.
327
328::
329
330 stack@compute:~$ sudo ovs-vsctl add-br br-ex
331 stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1
332 stack@compute:~$ sudo ovs-vsctl show
333 9a25c837-32ab-45f6-b9f2-1dd888abcf0f
334 Bridge br-ex
335 Port br-ex
336 Interface br-ex
337 type: internal
338 Port phy-br-ex
339 Interface phy-br-ex
340 type: patch
341 options: {peer=int-br-ex}
342 Port "eth1"
343 Interface "eth1"
344
Sean M. Collins34296012014-10-27 11:57:20 -0400345
346Service Configuration
347---------------------
348
349**Control Node**
350
351In this example, the control node will run the majority of the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400352OpenStack API and management services (keystone, glance,
353nova, neutron)
Sean M. Collins34296012014-10-27 11:57:20 -0400354
355
356**Compute Nodes**
357
358In this example, the nodes that will host guest instances will run
Markus Zoellerc30657d2015-11-02 11:27:46 +0100359the ``neutron-openvswitch-agent`` for network connectivity, as well as
360the compute service ``nova-compute``.
Sean M. Collins34296012014-10-27 11:57:20 -0400361
362DevStack Configuration
363----------------------
364
Andreas Scheuring28128e22016-04-14 14:23:53 +0200365.. _ovs-provider-network-controller:
366
Sean M. Collins34296012014-10-27 11:57:20 -0400367The following is a snippet of the DevStack configuration on the
368controller node.
369
370::
371
Sean M. Collins611cab42015-10-09 12:54:32 -0400372 HOST_IP=10.0.0.2
373 SERVICE_HOST=10.0.0.2
374 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400375 RABBIT_HOST=10.0.0.2
376 GLANCE_HOSTPORT=10.0.0.2:9292
Sean M. Collins34296012014-10-27 11:57:20 -0400377 PUBLIC_INTERFACE=eth1
378
Balagopal7ed812c2016-03-01 04:43:31 +0000379 ADMIN_PASSWORD=secret
380 MYSQL_PASSWORD=secret
381 RABBIT_PASSWORD=secret
382 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400383
Sean M. Collins34296012014-10-27 11:57:20 -0400384 ## Neutron options
385 Q_USE_SECGROUP=True
Sean Daguedb48db12016-04-06 08:09:31 -0400386 ENABLE_PROJECT_VLANS=True
387 PROJECT_VLAN_RANGE=3001:4000
Sean M. Collins34296012014-10-27 11:57:20 -0400388 PHYSICAL_NETWORK=default
389 OVS_PHYSICAL_BRIDGE=br-ex
390
391 Q_USE_PROVIDER_NETWORKING=True
392 Q_L3_ENABLED=False
393
394 # Do not use Nova-Network
395 disable_service n-net
396
397 # Neutron
398 ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt
399
400 ## Neutron Networking options used to create Neutron Subnets
401
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400402 FIXED_RANGE="203.0.113.0/24"
syed ahsan shamim zaidi512be7d2015-10-20 21:20:27 +0000403 NETWORK_GATEWAY=203.0.113.1
Sean M. Collins34296012014-10-27 11:57:20 -0400404 PROVIDER_SUBNET_NAME="provider_net"
405 PROVIDER_NETWORK_TYPE="vlan"
406 SEGMENTATION_ID=2010
407
408In this configuration we are defining FIXED_RANGE to be a
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400409publicly routed IPv4 subnet. In this specific instance we are using
410the special TEST-NET-3 subnet defined in `RFC 5737 <http://tools.ietf.org/html/rfc5737>`_,
411which is used for documentation. In your DevStack setup, FIXED_RANGE
412would be a public IP address range that you or your organization has
413allocated to you, so that you could access your instances from the
414public internet.
Sean M. Collins34296012014-10-27 11:57:20 -0400415
John Kasperskibdc0fa82015-11-23 11:56:33 -0600416The following is the DevStack configuration on
Sean M. Collins611cab42015-10-09 12:54:32 -0400417compute node 1.
Sean M. Collins34296012014-10-27 11:57:20 -0400418
419::
420
Sean M. Collins611cab42015-10-09 12:54:32 -0400421 HOST_IP=10.0.0.3
422 SERVICE_HOST=10.0.0.2
423 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400424 RABBIT_HOST=10.0.0.2
425 GLANCE_HOSTPORT=10.0.0.2:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000426 ADMIN_PASSWORD=secret
427 MYSQL_PASSWORD=secret
428 RABBIT_PASSWORD=secret
429 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400430
Sean M. Collins34296012014-10-27 11:57:20 -0400431 # Services that a compute node runs
432 ENABLED_SERVICES=n-cpu,rabbit,q-agt
433
Sean M. Collins2977b302016-01-25 09:10:52 -0500434 ## Open vSwitch provider networking options
Sean M. Collins34296012014-10-27 11:57:20 -0400435 PHYSICAL_NETWORK=default
436 OVS_PHYSICAL_BRIDGE=br-ex
437 PUBLIC_INTERFACE=eth1
438 Q_USE_PROVIDER_NETWORKING=True
439 Q_L3_ENABLED=False
440
Sean M. Collins611cab42015-10-09 12:54:32 -0400441Compute node 2's configuration will be exactly the same, except
Markus Zoellerc30657d2015-11-02 11:27:46 +0100442``HOST_IP`` will be ``10.0.0.4``
Sean M. Collins611cab42015-10-09 12:54:32 -0400443
Sean M. Collins34296012014-10-27 11:57:20 -0400444When DevStack is configured to use provider networking (via
Markus Zoellerc30657d2015-11-02 11:27:46 +0100445``Q_USE_PROVIDER_NETWORKING`` is True and ``Q_L3_ENABLED`` is False) -
Sean M. Collins34296012014-10-27 11:57:20 -0400446DevStack will automatically add the network interface defined in
Markus Zoellerc30657d2015-11-02 11:27:46 +0100447``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE``
Sean M. Collins34296012014-10-27 11:57:20 -0400448
449For example, with the above configuration, a bridge is
Markus Zoellerc30657d2015-11-02 11:27:46 +0100450created, named ``br-ex`` which is managed by Open vSwitch, and the
451second interface on the compute node, ``eth1`` is attached to the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400452bridge, to forward traffic sent by guest VMs.
Sean M. Collins872a2622015-10-06 12:45:06 -0400453
454Miscellaneous Tips
455==================
456
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500457Non-Standard MTU on the Physical Network
458----------------------------------------
459
Sean M. Collins087ed522016-03-16 11:53:09 -0400460Neutron by default uses a MTU of 1500 bytes, which is
461the standard MTU for Ethernet.
462
463A different MTU can be specified by adding the following to
464the Neutron section of `local.conf`. For example,
465if you have network equipment that supports jumbo frames, you could
466set the MTU to 9000 bytes by adding the following
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500467
468::
Sean M. Collinsf81ae882016-02-01 14:00:20 -0500469
Sean M. Collins087ed522016-03-16 11:53:09 -0400470 [[post-config|/$Q_PLUGIN_CONF_FILE]]
471 global_physnet_mtu = 9000
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500472
Sean M. Collins872a2622015-10-06 12:45:06 -0400473
474Disabling Next Generation Firewall Tools
475----------------------------------------
476
477DevStack does not properly operate with modern firewall tools. Specifically
478it will appear as if the guest VM can access the external network via ICMP,
479but UDP and TCP packets will not be delivered to the guest VM. The root cause
480of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's
481firewall manager) apply firewall rules to all interfaces in the system, rather
482then per-device. One solution to this problem is to revert to iptables
483functionality.
484
485To get a functional firewall configuration for Fedora do the following:
486
487::
488
489 sudo service iptables save
490 sudo systemctl disable firewalld
491 sudo systemctl enable iptables
492 sudo systemctl stop firewalld
493 sudo systemctl start iptables
494
495
496To get a functional firewall configuration for distributions containing ufw,
497disable ufw. Note ufw is generally not enabled by default in Ubuntu. To
498disable ufw if it was enabled, do the following:
499
500::
501
502 sudo service iptables save
503 sudo ufw disable
504
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400505Configuring Extension Drivers for the ML2 Plugin
506------------------------------------------------
Sean M. Collins872a2622015-10-06 12:45:06 -0400507
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400508Extension drivers for the ML2 plugin are set with the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100509``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400510by default. If you want to remove all the extension drivers (even
Markus Zoellerc30657d2015-11-02 11:27:46 +0100511'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank.
Sean M. Collins872a2622015-10-06 12:45:06 -0400512
Sean M. Collins2977b302016-01-25 09:10:52 -0500513
514Using Linux Bridge instead of Open vSwitch
515------------------------------------------
516
517The configuration for using the Linux Bridge ML2 driver is fairly
518straight forward. The Linux Bridge configuration for DevStack is similar
519to the :ref:`Open vSwitch based single interface <single-interface-ovs>`
520setup, with small modifications for the interface mappings.
521
522
523::
524
525 [[local|localrc]]
526 HOST_IP=172.18.161.6
527 SERVICE_HOST=172.18.161.6
528 MYSQL_HOST=172.18.161.6
529 RABBIT_HOST=172.18.161.6
530 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000531 ADMIN_PASSWORD=secret
532 DATABASE_PASSWORD=secret
533 RABBIT_PASSWORD=secret
534 SERVICE_PASSWORD=secret
Sean M. Collins2977b302016-01-25 09:10:52 -0500535
536 # Do not use Nova-Network
537 disable_service n-net
538 # Enable Neutron
539 ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3
540
541
542 ## Neutron options
543 Q_USE_SECGROUP=True
544 FLOATING_RANGE="172.18.161.0/24"
545 FIXED_RANGE="10.0.0.0/24"
546 Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
547 PUBLIC_NETWORK_GATEWAY="172.18.161.1"
548 Q_L3_ENABLED=True
549 PUBLIC_INTERFACE=eth0
550
551 Q_USE_PROVIDERNET_FOR_PUBLIC=True
552
553 # Linuxbridge Settings
554 Q_AGENT=linuxbridge
555 LB_PHYSICAL_INTERFACE=eth0
556 PUBLIC_PHYSICAL_NETWORK=default
557 LB_INTERFACE_MAPPINGS=default:eth0
Andreas Scheuring28128e22016-04-14 14:23:53 +0200558
559Using MacVTap instead of Open vSwitch
560------------------------------------------
561
562Security groups are not supported by the MacVTap agent. Due to that, devstack
563configures the NoopFirewall driver on the compute node.
564
565MacVTap agent does not support l3, dhcp and metadata agent. Due to that you can
566chose between the following deployment scenarios:
567
568Single node with provider networks using config drive and external l3, dhcp
569~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
570This scenario applies, if l3 and dhcp services are provided externally, or if
571you do not require them.
572
573
574::
575
576 [[local|localrc]]
577 HOST_IP=10.0.0.2
578 SERVICE_HOST=10.0.0.2
579 MYSQL_HOST=10.0.0.2
580 RABBIT_HOST=10.0.0.2
581 ADMIN_PASSWORD=secret
582 MYSQL_PASSWORD=secret
583 RABBIT_PASSWORD=secret
584 SERVICE_PASSWORD=secret
585
586 Q_ML2_PLUGIN_MECHANISM_DRIVERS=macvtap
587 Q_USE_PROVIDER_NETWORKING=True
588
589 #Enable Neutron services
590 disable_service n-net
591 enable_plugin neutron git://git.openstack.org/openstack/neutron
592 ENABLED_SERVICES+=,q-agt,q-svc
593
594 ## MacVTap agent options
595 Q_AGENT=macvtap
596 PHYSICAL_NETWORK=default
597
598 FIXED_RANGE="203.0.113.0/24"
599 NETWORK_GATEWAY=203.0.113.1
600 PROVIDER_SUBNET_NAME="provider_net"
601 PROVIDER_NETWORK_TYPE="vlan"
602 SEGMENTATION_ID=2010
603
604 [[post-config|/$Q_PLUGIN_CONF_FILE]]
605 [macvtap]
606 physical_interface_mappings = $PHYSICAL_NETWORK:eth1
607
608 [[post-config|$NOVA_CONF]]
609 force_config_drive = True
610
611
612Multi node with MacVTap compute node
613~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
614This scenario applies, if you require OpenStack provided l3, dhcp or metadata
615services. Those are hosted on a separate controller and network node, running
616some other l2 agent technology (in this example Open vSwitch). This node needs
617to be configured for VLAN tenant networks.
618
619For OVS, a similar configuration like described in the
620:ref:`OVS Provider Network <ovs-provider-network-controller>` section can be
621used. Just add the the following line to this local.conf, which also loads
622the MacVTap mechanism driver:
623
624::
625
626 [[local|localrc]]
627 ...
628 Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,linuxbridge,macvtap
629 ...
630
631For the MacVTap compute node, use this local.conf:
632
633::
634
635 HOST_IP=10.0.0.3
636 SERVICE_HOST=10.0.0.2
637 MYSQL_HOST=10.0.0.2
638 RABBIT_HOST=10.0.0.2
639 ADMIN_PASSWORD=secret
640 MYSQL_PASSWORD=secret
641 RABBIT_PASSWORD=secret
642 SERVICE_PASSWORD=secret
643
644 # Services that a compute node runs
645 disable_all_services
646 enable_plugin neutron git://git.openstack.org/openstack/neutron
647 ENABLED_SERVICES+=n-cpu,q-agt
648
649 ## MacVTap agent options
650 Q_AGENT=macvtap
651 PHYSICAL_NETWORK=default
652
653 [[post-config|/$Q_PLUGIN_CONF_FILE]]
654 [macvtap]
655 physical_interface_mappings = $PHYSICAL_NETWORK:eth1