blob: c5b1634f62ca842f308b40470e13310f8bf41696 [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"
Sean M. Collins02ae50d2015-03-20 09:58:55 -070091 PUBLIC_INTERFACE=eth0
Sean M. Collins2977b302016-01-25 09:10:52 -050092
93 # Open vSwitch provider networking configuration
Sean M. Collins02ae50d2015-03-20 09:58:55 -070094 Q_USE_PROVIDERNET_FOR_PUBLIC=True
95 OVS_PHYSICAL_BRIDGE=br-ex
96 PUBLIC_BRIDGE=br-ex
97 OVS_BRIDGE_MAPPINGS=public:br-ex
98
99
Sean M. Collins16501662015-10-12 11:01:44 -0400100Adding Additional Compute Nodes
101-------------------------------
102
103Let's suppose that after installing DevStack on the first host, you
104also want to do multinode testing and networking.
105
106Physical Network Setup
107~~~~~~~~~~~~~~~~~~~~~~
108
109.. nwdiag::
110
111 nwdiag {
112 inet [ shape = cloud ];
113 router;
114 inet -- router;
115
116 network hardware_network {
117 address = "172.18.161.0/24"
118 router [ address = "172.18.161.1" ];
119 devstack-1 [ address = "172.18.161.6" ];
120 devstack-2 [ address = "172.18.161.7" ];
121 }
122 }
123
124
125After DevStack installs and configures Neutron, traffic from guest VMs
126flows out of `devstack-2` (the compute node) and is encapsulated in a
127VXLAN tunnel back to `devstack-1` (the control node) where the L3
128agent is running.
129
130::
131
132 stack@devstack-2:~/devstack$ sudo ovs-vsctl show
133 8992d965-0ba0-42fd-90e9-20ecc528bc29
134 Bridge br-int
135 fail_mode: secure
136 Port br-int
137 Interface br-int
138 type: internal
139 Port patch-tun
140 Interface patch-tun
141 type: patch
142 options: {peer=patch-int}
143 Bridge br-tun
144 fail_mode: secure
145 Port "vxlan-c0a801f6"
146 Interface "vxlan-c0a801f6"
147 type: vxlan
148 options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"}
149 Port patch-int
150 Interface patch-int
151 type: patch
152 options: {peer=patch-tun}
153 Port br-tun
154 Interface br-tun
155 type: internal
156 ovs_version: "2.0.2"
157
158Open vSwitch on the control node, where the L3 agent runs, is
159configured to de-encapsulate traffic from compute nodes, then forward
160it over the `br-ex` bridge, where `eth0` is attached.
161
162::
163
164 stack@devstack-1:~/devstack$ sudo ovs-vsctl show
165 422adeea-48d1-4a1f-98b1-8e7239077964
166 Bridge br-tun
167 fail_mode: secure
168 Port br-tun
169 Interface br-tun
170 type: internal
171 Port patch-int
172 Interface patch-int
173 type: patch
174 options: {peer=patch-tun}
175 Port "vxlan-c0a801d8"
176 Interface "vxlan-c0a801d8"
177 type: vxlan
178 options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"}
179 Bridge br-ex
180 Port phy-br-ex
181 Interface phy-br-ex
182 type: patch
183 options: {peer=int-br-ex}
184 Port "eth0"
185 Interface "eth0"
186 Port br-ex
187 Interface br-ex
188 type: internal
189 Bridge br-int
190 fail_mode: secure
191 Port "tapce66332d-ea"
192 tag: 1
193 Interface "tapce66332d-ea"
194 type: internal
195 Port "qg-65e5a4b9-15"
196 tag: 2
197 Interface "qg-65e5a4b9-15"
198 type: internal
199 Port "qr-33e5e471-88"
200 tag: 1
201 Interface "qr-33e5e471-88"
202 type: internal
203 Port "qr-acbe9951-70"
204 tag: 1
205 Interface "qr-acbe9951-70"
206 type: internal
207 Port br-int
208 Interface br-int
209 type: internal
210 Port patch-tun
211 Interface patch-tun
212 type: patch
213 options: {peer=patch-int}
214 Port int-br-ex
215 Interface int-br-ex
216 type: patch
217 options: {peer=phy-br-ex}
218 ovs_version: "2.0.2"
219
220`br-int` is a bridge that the Open vSwitch mechanism driver creates,
221which is used as the "integration bridge" where ports are created, and
222plugged into the virtual switching fabric. `br-ex` is an OVS bridge
223that is used to connect physical ports (like `eth0`), so that floating
Sean Daguedb48db12016-04-06 08:09:31 -0400224IP traffic for project networks can be received from the physical
225network infrastructure (and the internet), and routed to self service
226project network ports. `br-tun` is a tunnel bridge that is used to
227connect OpenStack nodes (like `devstack-2`) together. This bridge is
228used so that project network traffic, using the VXLAN tunneling
229protocol, flows between each compute node where project instances run.
Sean M. Collins16501662015-10-12 11:01:44 -0400230
231
232
233DevStack Compute Configuration
234~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235
236The host `devstack-2` has a very minimal `local.conf`.
237
238::
239
240 [[local|localrc]]
241 HOST_IP=172.18.161.7
242 SERVICE_HOST=172.18.161.6
243 MYSQL_HOST=172.18.161.6
244 RABBIT_HOST=172.18.161.6
245 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000246 ADMIN_PASSWORD=secret
247 MYSQL_PASSWORD=secret
248 RABBIT_PASSWORD=secret
249 SERVICE_PASSWORD=secret
Sean M. Collins16501662015-10-12 11:01:44 -0400250
251 ## Neutron options
252 PUBLIC_INTERFACE=eth0
253 ENABLED_SERVICES=n-cpu,rabbit,q-agt
254
255Network traffic from `eth0` on the compute nodes is then NAT'd by the
256controller node that runs Neutron's `neutron-l3-agent` and provides L3
257connectivity.
258
Sean M. Collins02ae50d2015-03-20 09:58:55 -0700259
Sean M. Collins34296012014-10-27 11:57:20 -0400260Neutron Networking with Open vSwitch and Provider Networks
261==========================================================
262
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400263In some instances, it is desirable to use neutron's provider
Sean M. Collins34296012014-10-27 11:57:20 -0400264networking extension, so that networks that are configured on an
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400265external router can be utilized by neutron, and instances created via
Sean M. Collins34296012014-10-27 11:57:20 -0400266Nova can attach to the network managed by the external router.
267
268For example, in some lab environments, a hardware router has been
269pre-configured by another party, and an OpenStack developer has been
270given a VLAN tag and IP address range, so that instances created via
271DevStack will use the external router for L3 connectivity, as opposed
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400272to the neutron L3 service.
Sean M. Collins34296012014-10-27 11:57:20 -0400273
Sean M. Collins4696db92015-10-09 12:31:57 -0400274Physical Network Setup
275----------------------
276
277.. nwdiag::
278
279 nwdiag {
280 inet [ shape = cloud ];
281 router;
282 inet -- router;
283
284 network provider_net {
285 address = "203.0.113.0/24"
286 router [ address = "203.0.113.1" ];
287 controller;
288 compute1;
289 compute2;
290 }
291
292 network control_plane {
293 router [ address = "10.0.0.1" ]
294 address = "10.0.0.0/24"
295 controller [ address = "10.0.0.2" ]
296 compute1 [ address = "10.0.0.3" ]
297 compute2 [ address = "10.0.0.4" ]
298 }
299 }
300
301
Sean M. Collins887f1822015-10-12 10:36:34 -0400302On a compute node, the first interface, eth0 is used for the OpenStack
303management (API, message bus, etc) as well as for ssh for an
304administrator to access the machine.
305
306::
307
308 stack@compute:~$ ifconfig eth0
309 eth0 Link encap:Ethernet HWaddr bc:16:65:20:af:fc
310 inet addr:10.0.0.3
311
312eth1 is manually configured at boot to not have an IP address.
313Consult your operating system documentation for the appropriate
314technique. For Ubuntu, the contents of `/etc/network/interfaces`
315contains:
316
317::
318
319 auto eth1
320 iface eth1 inet manual
321 up ifconfig $IFACE 0.0.0.0 up
322 down ifconfig $IFACE 0.0.0.0 down
323
324The second physical interface, eth1 is added to a bridge (in this case
325named br-ex), which is used to forward network traffic from guest VMs.
326
327::
328
329 stack@compute:~$ sudo ovs-vsctl add-br br-ex
330 stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1
331 stack@compute:~$ sudo ovs-vsctl show
332 9a25c837-32ab-45f6-b9f2-1dd888abcf0f
333 Bridge br-ex
334 Port br-ex
335 Interface br-ex
336 type: internal
337 Port phy-br-ex
338 Interface phy-br-ex
339 type: patch
340 options: {peer=int-br-ex}
341 Port "eth1"
342 Interface "eth1"
343
Sean M. Collins34296012014-10-27 11:57:20 -0400344
345Service Configuration
346---------------------
347
348**Control Node**
349
350In this example, the control node will run the majority of the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400351OpenStack API and management services (keystone, glance,
352nova, neutron)
Sean M. Collins34296012014-10-27 11:57:20 -0400353
354
355**Compute Nodes**
356
357In this example, the nodes that will host guest instances will run
Markus Zoellerc30657d2015-11-02 11:27:46 +0100358the ``neutron-openvswitch-agent`` for network connectivity, as well as
359the compute service ``nova-compute``.
Sean M. Collins34296012014-10-27 11:57:20 -0400360
361DevStack Configuration
362----------------------
363
Andreas Scheuring28128e22016-04-14 14:23:53 +0200364.. _ovs-provider-network-controller:
365
Sean M. Collins34296012014-10-27 11:57:20 -0400366The following is a snippet of the DevStack configuration on the
367controller node.
368
369::
370
Sean M. Collins611cab42015-10-09 12:54:32 -0400371 HOST_IP=10.0.0.2
372 SERVICE_HOST=10.0.0.2
373 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400374 RABBIT_HOST=10.0.0.2
375 GLANCE_HOSTPORT=10.0.0.2:9292
Sean M. Collins34296012014-10-27 11:57:20 -0400376 PUBLIC_INTERFACE=eth1
377
Balagopal7ed812c2016-03-01 04:43:31 +0000378 ADMIN_PASSWORD=secret
379 MYSQL_PASSWORD=secret
380 RABBIT_PASSWORD=secret
381 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400382
Sean M. Collins34296012014-10-27 11:57:20 -0400383 ## Neutron options
384 Q_USE_SECGROUP=True
Sean Daguedb48db12016-04-06 08:09:31 -0400385 ENABLE_PROJECT_VLANS=True
386 PROJECT_VLAN_RANGE=3001:4000
Sean M. Collins34296012014-10-27 11:57:20 -0400387 PHYSICAL_NETWORK=default
388 OVS_PHYSICAL_BRIDGE=br-ex
389
390 Q_USE_PROVIDER_NETWORKING=True
Sean M. Collins34296012014-10-27 11:57:20 -0400391
392 # Do not use Nova-Network
393 disable_service n-net
394
395 # Neutron
396 ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt
397
398 ## Neutron Networking options used to create Neutron Subnets
399
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400400 FIXED_RANGE="203.0.113.0/24"
syed ahsan shamim zaidi512be7d2015-10-20 21:20:27 +0000401 NETWORK_GATEWAY=203.0.113.1
Sean M. Collins34296012014-10-27 11:57:20 -0400402 PROVIDER_SUBNET_NAME="provider_net"
403 PROVIDER_NETWORK_TYPE="vlan"
404 SEGMENTATION_ID=2010
405
406In this configuration we are defining FIXED_RANGE to be a
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400407publicly routed IPv4 subnet. In this specific instance we are using
408the special TEST-NET-3 subnet defined in `RFC 5737 <http://tools.ietf.org/html/rfc5737>`_,
409which is used for documentation. In your DevStack setup, FIXED_RANGE
410would be a public IP address range that you or your organization has
411allocated to you, so that you could access your instances from the
412public internet.
Sean M. Collins34296012014-10-27 11:57:20 -0400413
John Kasperskibdc0fa82015-11-23 11:56:33 -0600414The following is the DevStack configuration on
Sean M. Collins611cab42015-10-09 12:54:32 -0400415compute node 1.
Sean M. Collins34296012014-10-27 11:57:20 -0400416
417::
418
Sean M. Collins611cab42015-10-09 12:54:32 -0400419 HOST_IP=10.0.0.3
420 SERVICE_HOST=10.0.0.2
421 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400422 RABBIT_HOST=10.0.0.2
423 GLANCE_HOSTPORT=10.0.0.2:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000424 ADMIN_PASSWORD=secret
425 MYSQL_PASSWORD=secret
426 RABBIT_PASSWORD=secret
427 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400428
Sean M. Collins34296012014-10-27 11:57:20 -0400429 # Services that a compute node runs
430 ENABLED_SERVICES=n-cpu,rabbit,q-agt
431
Sean M. Collins2977b302016-01-25 09:10:52 -0500432 ## Open vSwitch provider networking options
Sean M. Collins34296012014-10-27 11:57:20 -0400433 PHYSICAL_NETWORK=default
434 OVS_PHYSICAL_BRIDGE=br-ex
435 PUBLIC_INTERFACE=eth1
436 Q_USE_PROVIDER_NETWORKING=True
Sean M. Collins34296012014-10-27 11:57:20 -0400437
Sean M. Collins611cab42015-10-09 12:54:32 -0400438Compute node 2's configuration will be exactly the same, except
Markus Zoellerc30657d2015-11-02 11:27:46 +0100439``HOST_IP`` will be ``10.0.0.4``
Sean M. Collins611cab42015-10-09 12:54:32 -0400440
Sean M. Collins34296012014-10-27 11:57:20 -0400441When DevStack is configured to use provider networking (via
vsaienkod8942212016-05-13 12:51:30 +0300442``Q_USE_PROVIDER_NETWORKING`` is True) -
Sean M. Collins34296012014-10-27 11:57:20 -0400443DevStack will automatically add the network interface defined in
Markus Zoellerc30657d2015-11-02 11:27:46 +0100444``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE``
Sean M. Collins34296012014-10-27 11:57:20 -0400445
446For example, with the above configuration, a bridge is
Markus Zoellerc30657d2015-11-02 11:27:46 +0100447created, named ``br-ex`` which is managed by Open vSwitch, and the
448second interface on the compute node, ``eth1`` is attached to the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400449bridge, to forward traffic sent by guest VMs.
Sean M. Collins872a2622015-10-06 12:45:06 -0400450
451Miscellaneous Tips
452==================
453
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500454Non-Standard MTU on the Physical Network
455----------------------------------------
456
Sean M. Collins087ed522016-03-16 11:53:09 -0400457Neutron by default uses a MTU of 1500 bytes, which is
458the standard MTU for Ethernet.
459
460A different MTU can be specified by adding the following to
461the Neutron section of `local.conf`. For example,
462if you have network equipment that supports jumbo frames, you could
463set the MTU to 9000 bytes by adding the following
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500464
465::
Sean M. Collinsf81ae882016-02-01 14:00:20 -0500466
Sean M. Collins087ed522016-03-16 11:53:09 -0400467 [[post-config|/$Q_PLUGIN_CONF_FILE]]
468 global_physnet_mtu = 9000
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500469
Sean M. Collins872a2622015-10-06 12:45:06 -0400470
471Disabling Next Generation Firewall Tools
472----------------------------------------
473
474DevStack does not properly operate with modern firewall tools. Specifically
475it will appear as if the guest VM can access the external network via ICMP,
476but UDP and TCP packets will not be delivered to the guest VM. The root cause
477of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's
478firewall manager) apply firewall rules to all interfaces in the system, rather
479then per-device. One solution to this problem is to revert to iptables
480functionality.
481
482To get a functional firewall configuration for Fedora do the following:
483
484::
485
486 sudo service iptables save
487 sudo systemctl disable firewalld
488 sudo systemctl enable iptables
489 sudo systemctl stop firewalld
490 sudo systemctl start iptables
491
492
493To get a functional firewall configuration for distributions containing ufw,
494disable ufw. Note ufw is generally not enabled by default in Ubuntu. To
495disable ufw if it was enabled, do the following:
496
497::
498
499 sudo service iptables save
500 sudo ufw disable
501
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400502Configuring Extension Drivers for the ML2 Plugin
503------------------------------------------------
Sean M. Collins872a2622015-10-06 12:45:06 -0400504
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400505Extension drivers for the ML2 plugin are set with the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100506``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400507by default. If you want to remove all the extension drivers (even
Markus Zoellerc30657d2015-11-02 11:27:46 +0100508'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank.
Sean M. Collins872a2622015-10-06 12:45:06 -0400509
Sean M. Collins2977b302016-01-25 09:10:52 -0500510
511Using Linux Bridge instead of Open vSwitch
512------------------------------------------
513
514The configuration for using the Linux Bridge ML2 driver is fairly
515straight forward. The Linux Bridge configuration for DevStack is similar
516to the :ref:`Open vSwitch based single interface <single-interface-ovs>`
517setup, with small modifications for the interface mappings.
518
519
520::
521
522 [[local|localrc]]
523 HOST_IP=172.18.161.6
524 SERVICE_HOST=172.18.161.6
525 MYSQL_HOST=172.18.161.6
526 RABBIT_HOST=172.18.161.6
527 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000528 ADMIN_PASSWORD=secret
529 DATABASE_PASSWORD=secret
530 RABBIT_PASSWORD=secret
531 SERVICE_PASSWORD=secret
Sean M. Collins2977b302016-01-25 09:10:52 -0500532
533 # Do not use Nova-Network
534 disable_service n-net
535 # Enable Neutron
536 ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3
537
538
539 ## Neutron options
540 Q_USE_SECGROUP=True
541 FLOATING_RANGE="172.18.161.0/24"
542 FIXED_RANGE="10.0.0.0/24"
543 Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
544 PUBLIC_NETWORK_GATEWAY="172.18.161.1"
Sean M. Collins2977b302016-01-25 09:10:52 -0500545 PUBLIC_INTERFACE=eth0
546
547 Q_USE_PROVIDERNET_FOR_PUBLIC=True
548
549 # Linuxbridge Settings
550 Q_AGENT=linuxbridge
551 LB_PHYSICAL_INTERFACE=eth0
552 PUBLIC_PHYSICAL_NETWORK=default
553 LB_INTERFACE_MAPPINGS=default:eth0
Andreas Scheuring28128e22016-04-14 14:23:53 +0200554
555Using MacVTap instead of Open vSwitch
556------------------------------------------
557
558Security groups are not supported by the MacVTap agent. Due to that, devstack
559configures the NoopFirewall driver on the compute node.
560
561MacVTap agent does not support l3, dhcp and metadata agent. Due to that you can
562chose between the following deployment scenarios:
563
564Single node with provider networks using config drive and external l3, dhcp
565~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
566This scenario applies, if l3 and dhcp services are provided externally, or if
567you do not require them.
568
569
570::
571
572 [[local|localrc]]
573 HOST_IP=10.0.0.2
574 SERVICE_HOST=10.0.0.2
575 MYSQL_HOST=10.0.0.2
576 RABBIT_HOST=10.0.0.2
577 ADMIN_PASSWORD=secret
578 MYSQL_PASSWORD=secret
579 RABBIT_PASSWORD=secret
580 SERVICE_PASSWORD=secret
581
582 Q_ML2_PLUGIN_MECHANISM_DRIVERS=macvtap
583 Q_USE_PROVIDER_NETWORKING=True
584
585 #Enable Neutron services
586 disable_service n-net
587 enable_plugin neutron git://git.openstack.org/openstack/neutron
588 ENABLED_SERVICES+=,q-agt,q-svc
589
590 ## MacVTap agent options
591 Q_AGENT=macvtap
592 PHYSICAL_NETWORK=default
593
594 FIXED_RANGE="203.0.113.0/24"
595 NETWORK_GATEWAY=203.0.113.1
596 PROVIDER_SUBNET_NAME="provider_net"
597 PROVIDER_NETWORK_TYPE="vlan"
598 SEGMENTATION_ID=2010
599
600 [[post-config|/$Q_PLUGIN_CONF_FILE]]
601 [macvtap]
602 physical_interface_mappings = $PHYSICAL_NETWORK:eth1
603
604 [[post-config|$NOVA_CONF]]
605 force_config_drive = True
606
607
608Multi node with MacVTap compute node
609~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610This scenario applies, if you require OpenStack provided l3, dhcp or metadata
611services. Those are hosted on a separate controller and network node, running
612some other l2 agent technology (in this example Open vSwitch). This node needs
613to be configured for VLAN tenant networks.
614
615For OVS, a similar configuration like described in the
616:ref:`OVS Provider Network <ovs-provider-network-controller>` section can be
617used. Just add the the following line to this local.conf, which also loads
618the MacVTap mechanism driver:
619
620::
621
622 [[local|localrc]]
623 ...
624 Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,linuxbridge,macvtap
625 ...
626
627For the MacVTap compute node, use this local.conf:
628
629::
630
631 HOST_IP=10.0.0.3
632 SERVICE_HOST=10.0.0.2
633 MYSQL_HOST=10.0.0.2
634 RABBIT_HOST=10.0.0.2
635 ADMIN_PASSWORD=secret
636 MYSQL_PASSWORD=secret
637 RABBIT_PASSWORD=secret
638 SERVICE_PASSWORD=secret
639
640 # Services that a compute node runs
641 disable_all_services
642 enable_plugin neutron git://git.openstack.org/openstack/neutron
643 ENABLED_SERVICES+=n-cpu,q-agt
644
645 ## MacVTap agent options
646 Q_AGENT=macvtap
647 PHYSICAL_NETWORK=default
648
649 [[post-config|/$Q_PLUGIN_CONF_FILE]]
650 [macvtap]
651 physical_interface_mappings = $PHYSICAL_NETWORK:eth1