blob: b26fd1e8eecbbc79278caded630cfaece9020814 [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
79 ## Neutron options
80 Q_USE_SECGROUP=True
Christian Berendt1c394822015-09-10 12:15:16 +020081 FLOATING_RANGE="172.18.161.0/24"
Sean M. Collins02ae50d2015-03-20 09:58:55 -070082 FIXED_RANGE="10.0.0.0/24"
83 Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
84 PUBLIC_NETWORK_GATEWAY="172.18.161.1"
Sean M. Collins02ae50d2015-03-20 09:58:55 -070085 PUBLIC_INTERFACE=eth0
Sean M. Collins2977b302016-01-25 09:10:52 -050086
87 # Open vSwitch provider networking configuration
Sean M. Collins02ae50d2015-03-20 09:58:55 -070088 Q_USE_PROVIDERNET_FOR_PUBLIC=True
89 OVS_PHYSICAL_BRIDGE=br-ex
90 PUBLIC_BRIDGE=br-ex
91 OVS_BRIDGE_MAPPINGS=public:br-ex
92
93
Sean M. Collins16501662015-10-12 11:01:44 -040094Adding Additional Compute Nodes
95-------------------------------
96
97Let's suppose that after installing DevStack on the first host, you
98also want to do multinode testing and networking.
99
100Physical Network Setup
101~~~~~~~~~~~~~~~~~~~~~~
102
103.. nwdiag::
104
105 nwdiag {
106 inet [ shape = cloud ];
107 router;
108 inet -- router;
109
110 network hardware_network {
111 address = "172.18.161.0/24"
112 router [ address = "172.18.161.1" ];
113 devstack-1 [ address = "172.18.161.6" ];
114 devstack-2 [ address = "172.18.161.7" ];
115 }
116 }
117
118
119After DevStack installs and configures Neutron, traffic from guest VMs
120flows out of `devstack-2` (the compute node) and is encapsulated in a
121VXLAN tunnel back to `devstack-1` (the control node) where the L3
122agent is running.
123
124::
125
126 stack@devstack-2:~/devstack$ sudo ovs-vsctl show
127 8992d965-0ba0-42fd-90e9-20ecc528bc29
128 Bridge br-int
129 fail_mode: secure
130 Port br-int
131 Interface br-int
132 type: internal
133 Port patch-tun
134 Interface patch-tun
135 type: patch
136 options: {peer=patch-int}
137 Bridge br-tun
138 fail_mode: secure
139 Port "vxlan-c0a801f6"
140 Interface "vxlan-c0a801f6"
141 type: vxlan
142 options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"}
143 Port patch-int
144 Interface patch-int
145 type: patch
146 options: {peer=patch-tun}
147 Port br-tun
148 Interface br-tun
149 type: internal
150 ovs_version: "2.0.2"
151
152Open vSwitch on the control node, where the L3 agent runs, is
153configured to de-encapsulate traffic from compute nodes, then forward
154it over the `br-ex` bridge, where `eth0` is attached.
155
156::
157
158 stack@devstack-1:~/devstack$ sudo ovs-vsctl show
159 422adeea-48d1-4a1f-98b1-8e7239077964
160 Bridge br-tun
161 fail_mode: secure
162 Port br-tun
163 Interface br-tun
164 type: internal
165 Port patch-int
166 Interface patch-int
167 type: patch
168 options: {peer=patch-tun}
169 Port "vxlan-c0a801d8"
170 Interface "vxlan-c0a801d8"
171 type: vxlan
172 options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"}
173 Bridge br-ex
174 Port phy-br-ex
175 Interface phy-br-ex
176 type: patch
177 options: {peer=int-br-ex}
178 Port "eth0"
179 Interface "eth0"
180 Port br-ex
181 Interface br-ex
182 type: internal
183 Bridge br-int
184 fail_mode: secure
185 Port "tapce66332d-ea"
186 tag: 1
187 Interface "tapce66332d-ea"
188 type: internal
189 Port "qg-65e5a4b9-15"
190 tag: 2
191 Interface "qg-65e5a4b9-15"
192 type: internal
193 Port "qr-33e5e471-88"
194 tag: 1
195 Interface "qr-33e5e471-88"
196 type: internal
197 Port "qr-acbe9951-70"
198 tag: 1
199 Interface "qr-acbe9951-70"
200 type: internal
201 Port br-int
202 Interface br-int
203 type: internal
204 Port patch-tun
205 Interface patch-tun
206 type: patch
207 options: {peer=patch-int}
208 Port int-br-ex
209 Interface int-br-ex
210 type: patch
211 options: {peer=phy-br-ex}
212 ovs_version: "2.0.2"
213
214`br-int` is a bridge that the Open vSwitch mechanism driver creates,
215which is used as the "integration bridge" where ports are created, and
216plugged into the virtual switching fabric. `br-ex` is an OVS bridge
217that is used to connect physical ports (like `eth0`), so that floating
Sean Daguedb48db12016-04-06 08:09:31 -0400218IP traffic for project networks can be received from the physical
219network infrastructure (and the internet), and routed to self service
220project network ports. `br-tun` is a tunnel bridge that is used to
221connect OpenStack nodes (like `devstack-2`) together. This bridge is
222used so that project network traffic, using the VXLAN tunneling
223protocol, flows between each compute node where project instances run.
Sean M. Collins16501662015-10-12 11:01:44 -0400224
225
226
227DevStack Compute Configuration
228~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
229
230The host `devstack-2` has a very minimal `local.conf`.
231
232::
233
234 [[local|localrc]]
235 HOST_IP=172.18.161.7
236 SERVICE_HOST=172.18.161.6
237 MYSQL_HOST=172.18.161.6
238 RABBIT_HOST=172.18.161.6
239 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000240 ADMIN_PASSWORD=secret
241 MYSQL_PASSWORD=secret
242 RABBIT_PASSWORD=secret
243 SERVICE_PASSWORD=secret
Sean M. Collins16501662015-10-12 11:01:44 -0400244
245 ## Neutron options
246 PUBLIC_INTERFACE=eth0
247 ENABLED_SERVICES=n-cpu,rabbit,q-agt
248
249Network traffic from `eth0` on the compute nodes is then NAT'd by the
250controller node that runs Neutron's `neutron-l3-agent` and provides L3
251connectivity.
252
Sean M. Collins02ae50d2015-03-20 09:58:55 -0700253
Sean M. Collins34296012014-10-27 11:57:20 -0400254Neutron Networking with Open vSwitch and Provider Networks
255==========================================================
256
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400257In some instances, it is desirable to use neutron's provider
Sean M. Collins34296012014-10-27 11:57:20 -0400258networking extension, so that networks that are configured on an
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400259external router can be utilized by neutron, and instances created via
Sean M. Collins34296012014-10-27 11:57:20 -0400260Nova can attach to the network managed by the external router.
261
262For example, in some lab environments, a hardware router has been
263pre-configured by another party, and an OpenStack developer has been
264given a VLAN tag and IP address range, so that instances created via
265DevStack will use the external router for L3 connectivity, as opposed
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400266to the neutron L3 service.
Sean M. Collins34296012014-10-27 11:57:20 -0400267
Sean M. Collins4696db92015-10-09 12:31:57 -0400268Physical Network Setup
269----------------------
270
271.. nwdiag::
272
273 nwdiag {
274 inet [ shape = cloud ];
275 router;
276 inet -- router;
277
278 network provider_net {
279 address = "203.0.113.0/24"
280 router [ address = "203.0.113.1" ];
281 controller;
282 compute1;
283 compute2;
284 }
285
286 network control_plane {
287 router [ address = "10.0.0.1" ]
288 address = "10.0.0.0/24"
289 controller [ address = "10.0.0.2" ]
290 compute1 [ address = "10.0.0.3" ]
291 compute2 [ address = "10.0.0.4" ]
292 }
293 }
294
295
Sean M. Collins887f1822015-10-12 10:36:34 -0400296On a compute node, the first interface, eth0 is used for the OpenStack
297management (API, message bus, etc) as well as for ssh for an
298administrator to access the machine.
299
300::
301
302 stack@compute:~$ ifconfig eth0
303 eth0 Link encap:Ethernet HWaddr bc:16:65:20:af:fc
304 inet addr:10.0.0.3
305
306eth1 is manually configured at boot to not have an IP address.
307Consult your operating system documentation for the appropriate
308technique. For Ubuntu, the contents of `/etc/network/interfaces`
309contains:
310
311::
312
313 auto eth1
314 iface eth1 inet manual
315 up ifconfig $IFACE 0.0.0.0 up
316 down ifconfig $IFACE 0.0.0.0 down
317
318The second physical interface, eth1 is added to a bridge (in this case
319named br-ex), which is used to forward network traffic from guest VMs.
320
321::
322
323 stack@compute:~$ sudo ovs-vsctl add-br br-ex
324 stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1
325 stack@compute:~$ sudo ovs-vsctl show
326 9a25c837-32ab-45f6-b9f2-1dd888abcf0f
327 Bridge br-ex
328 Port br-ex
329 Interface br-ex
330 type: internal
331 Port phy-br-ex
332 Interface phy-br-ex
333 type: patch
334 options: {peer=int-br-ex}
335 Port "eth1"
336 Interface "eth1"
337
Sean M. Collins34296012014-10-27 11:57:20 -0400338
339Service Configuration
340---------------------
341
342**Control Node**
343
344In this example, the control node will run the majority of the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400345OpenStack API and management services (keystone, glance,
346nova, neutron)
Sean M. Collins34296012014-10-27 11:57:20 -0400347
348
349**Compute Nodes**
350
351In this example, the nodes that will host guest instances will run
Markus Zoellerc30657d2015-11-02 11:27:46 +0100352the ``neutron-openvswitch-agent`` for network connectivity, as well as
353the compute service ``nova-compute``.
Sean M. Collins34296012014-10-27 11:57:20 -0400354
355DevStack Configuration
356----------------------
357
Andreas Scheuring28128e22016-04-14 14:23:53 +0200358.. _ovs-provider-network-controller:
359
Sean M. Collins34296012014-10-27 11:57:20 -0400360The following is a snippet of the DevStack configuration on the
361controller node.
362
363::
364
Sean M. Collins611cab42015-10-09 12:54:32 -0400365 HOST_IP=10.0.0.2
366 SERVICE_HOST=10.0.0.2
367 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400368 RABBIT_HOST=10.0.0.2
369 GLANCE_HOSTPORT=10.0.0.2:9292
Sean M. Collins34296012014-10-27 11:57:20 -0400370 PUBLIC_INTERFACE=eth1
371
Balagopal7ed812c2016-03-01 04:43:31 +0000372 ADMIN_PASSWORD=secret
373 MYSQL_PASSWORD=secret
374 RABBIT_PASSWORD=secret
375 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400376
Sean M. Collins34296012014-10-27 11:57:20 -0400377 ## Neutron options
378 Q_USE_SECGROUP=True
Sean Daguedb48db12016-04-06 08:09:31 -0400379 ENABLE_PROJECT_VLANS=True
380 PROJECT_VLAN_RANGE=3001:4000
Sean M. Collins34296012014-10-27 11:57:20 -0400381 PHYSICAL_NETWORK=default
382 OVS_PHYSICAL_BRIDGE=br-ex
383
384 Q_USE_PROVIDER_NETWORKING=True
Sean M. Collins34296012014-10-27 11:57:20 -0400385
Jan Stodt7eb672d2016-08-24 15:29:06 +0200386 disable_service q-l3
Sean M. Collins34296012014-10-27 11:57:20 -0400387
388 ## Neutron Networking options used to create Neutron Subnets
389
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400390 FIXED_RANGE="203.0.113.0/24"
syed ahsan shamim zaidi512be7d2015-10-20 21:20:27 +0000391 NETWORK_GATEWAY=203.0.113.1
Sean M. Collins34296012014-10-27 11:57:20 -0400392 PROVIDER_SUBNET_NAME="provider_net"
393 PROVIDER_NETWORK_TYPE="vlan"
394 SEGMENTATION_ID=2010
395
396In this configuration we are defining FIXED_RANGE to be a
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400397publicly routed IPv4 subnet. In this specific instance we are using
398the special TEST-NET-3 subnet defined in `RFC 5737 <http://tools.ietf.org/html/rfc5737>`_,
399which is used for documentation. In your DevStack setup, FIXED_RANGE
400would be a public IP address range that you or your organization has
401allocated to you, so that you could access your instances from the
402public internet.
Sean M. Collins34296012014-10-27 11:57:20 -0400403
John Kasperskibdc0fa82015-11-23 11:56:33 -0600404The following is the DevStack configuration on
Sean M. Collins611cab42015-10-09 12:54:32 -0400405compute node 1.
Sean M. Collins34296012014-10-27 11:57:20 -0400406
407::
408
Sean M. Collins611cab42015-10-09 12:54:32 -0400409 HOST_IP=10.0.0.3
410 SERVICE_HOST=10.0.0.2
411 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400412 RABBIT_HOST=10.0.0.2
413 GLANCE_HOSTPORT=10.0.0.2:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000414 ADMIN_PASSWORD=secret
415 MYSQL_PASSWORD=secret
416 RABBIT_PASSWORD=secret
417 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400418
Sean M. Collins34296012014-10-27 11:57:20 -0400419 # Services that a compute node runs
420 ENABLED_SERVICES=n-cpu,rabbit,q-agt
421
Sean M. Collins2977b302016-01-25 09:10:52 -0500422 ## Open vSwitch provider networking options
Sean M. Collins34296012014-10-27 11:57:20 -0400423 PHYSICAL_NETWORK=default
424 OVS_PHYSICAL_BRIDGE=br-ex
425 PUBLIC_INTERFACE=eth1
426 Q_USE_PROVIDER_NETWORKING=True
Sean M. Collins34296012014-10-27 11:57:20 -0400427
Sean M. Collins611cab42015-10-09 12:54:32 -0400428Compute node 2's configuration will be exactly the same, except
Markus Zoellerc30657d2015-11-02 11:27:46 +0100429``HOST_IP`` will be ``10.0.0.4``
Sean M. Collins611cab42015-10-09 12:54:32 -0400430
Sean M. Collins34296012014-10-27 11:57:20 -0400431When DevStack is configured to use provider networking (via
vsaienkod8942212016-05-13 12:51:30 +0300432``Q_USE_PROVIDER_NETWORKING`` is True) -
Sean M. Collins34296012014-10-27 11:57:20 -0400433DevStack will automatically add the network interface defined in
Markus Zoellerc30657d2015-11-02 11:27:46 +0100434``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE``
Sean M. Collins34296012014-10-27 11:57:20 -0400435
436For example, with the above configuration, a bridge is
Markus Zoellerc30657d2015-11-02 11:27:46 +0100437created, named ``br-ex`` which is managed by Open vSwitch, and the
438second interface on the compute node, ``eth1`` is attached to the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400439bridge, to forward traffic sent by guest VMs.
Sean M. Collins872a2622015-10-06 12:45:06 -0400440
441Miscellaneous Tips
442==================
443
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500444Non-Standard MTU on the Physical Network
445----------------------------------------
446
Sean M. Collins087ed522016-03-16 11:53:09 -0400447Neutron by default uses a MTU of 1500 bytes, which is
448the standard MTU for Ethernet.
449
450A different MTU can be specified by adding the following to
451the Neutron section of `local.conf`. For example,
452if you have network equipment that supports jumbo frames, you could
453set the MTU to 9000 bytes by adding the following
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500454
455::
Sean M. Collinsf81ae882016-02-01 14:00:20 -0500456
Sean M. Collins087ed522016-03-16 11:53:09 -0400457 [[post-config|/$Q_PLUGIN_CONF_FILE]]
458 global_physnet_mtu = 9000
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500459
Sean M. Collins872a2622015-10-06 12:45:06 -0400460
461Disabling Next Generation Firewall Tools
462----------------------------------------
463
464DevStack does not properly operate with modern firewall tools. Specifically
465it will appear as if the guest VM can access the external network via ICMP,
466but UDP and TCP packets will not be delivered to the guest VM. The root cause
467of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's
468firewall manager) apply firewall rules to all interfaces in the system, rather
469then per-device. One solution to this problem is to revert to iptables
470functionality.
471
472To get a functional firewall configuration for Fedora do the following:
473
474::
475
476 sudo service iptables save
477 sudo systemctl disable firewalld
478 sudo systemctl enable iptables
479 sudo systemctl stop firewalld
480 sudo systemctl start iptables
481
482
483To get a functional firewall configuration for distributions containing ufw,
484disable ufw. Note ufw is generally not enabled by default in Ubuntu. To
485disable ufw if it was enabled, do the following:
486
487::
488
489 sudo service iptables save
490 sudo ufw disable
491
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400492Configuring Extension Drivers for the ML2 Plugin
493------------------------------------------------
Sean M. Collins872a2622015-10-06 12:45:06 -0400494
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400495Extension drivers for the ML2 plugin are set with the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100496``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400497by default. If you want to remove all the extension drivers (even
Markus Zoellerc30657d2015-11-02 11:27:46 +0100498'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank.
Sean M. Collins872a2622015-10-06 12:45:06 -0400499
Sean M. Collins2977b302016-01-25 09:10:52 -0500500
501Using Linux Bridge instead of Open vSwitch
502------------------------------------------
503
504The configuration for using the Linux Bridge ML2 driver is fairly
505straight forward. The Linux Bridge configuration for DevStack is similar
506to the :ref:`Open vSwitch based single interface <single-interface-ovs>`
507setup, with small modifications for the interface mappings.
508
509
510::
511
512 [[local|localrc]]
513 HOST_IP=172.18.161.6
514 SERVICE_HOST=172.18.161.6
515 MYSQL_HOST=172.18.161.6
516 RABBIT_HOST=172.18.161.6
517 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000518 ADMIN_PASSWORD=secret
519 DATABASE_PASSWORD=secret
520 RABBIT_PASSWORD=secret
521 SERVICE_PASSWORD=secret
Sean M. Collins2977b302016-01-25 09:10:52 -0500522
Sean M. Collins2977b302016-01-25 09:10:52 -0500523 ## Neutron options
524 Q_USE_SECGROUP=True
525 FLOATING_RANGE="172.18.161.0/24"
526 FIXED_RANGE="10.0.0.0/24"
527 Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
528 PUBLIC_NETWORK_GATEWAY="172.18.161.1"
Sean M. Collins2977b302016-01-25 09:10:52 -0500529 PUBLIC_INTERFACE=eth0
530
531 Q_USE_PROVIDERNET_FOR_PUBLIC=True
532
533 # Linuxbridge Settings
534 Q_AGENT=linuxbridge
535 LB_PHYSICAL_INTERFACE=eth0
536 PUBLIC_PHYSICAL_NETWORK=default
537 LB_INTERFACE_MAPPINGS=default:eth0
Andreas Scheuring28128e22016-04-14 14:23:53 +0200538
539Using MacVTap instead of Open vSwitch
540------------------------------------------
541
542Security groups are not supported by the MacVTap agent. Due to that, devstack
543configures the NoopFirewall driver on the compute node.
544
545MacVTap agent does not support l3, dhcp and metadata agent. Due to that you can
546chose between the following deployment scenarios:
547
548Single node with provider networks using config drive and external l3, dhcp
549~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
550This scenario applies, if l3 and dhcp services are provided externally, or if
551you do not require them.
552
553
554::
555
556 [[local|localrc]]
557 HOST_IP=10.0.0.2
558 SERVICE_HOST=10.0.0.2
559 MYSQL_HOST=10.0.0.2
560 RABBIT_HOST=10.0.0.2
561 ADMIN_PASSWORD=secret
562 MYSQL_PASSWORD=secret
563 RABBIT_PASSWORD=secret
564 SERVICE_PASSWORD=secret
565
566 Q_ML2_PLUGIN_MECHANISM_DRIVERS=macvtap
567 Q_USE_PROVIDER_NETWORKING=True
568
Andreas Scheuring28128e22016-04-14 14:23:53 +0200569 enable_plugin neutron git://git.openstack.org/openstack/neutron
Andreas Scheuring28128e22016-04-14 14:23:53 +0200570
571 ## MacVTap agent options
572 Q_AGENT=macvtap
573 PHYSICAL_NETWORK=default
574
575 FIXED_RANGE="203.0.113.0/24"
576 NETWORK_GATEWAY=203.0.113.1
577 PROVIDER_SUBNET_NAME="provider_net"
578 PROVIDER_NETWORK_TYPE="vlan"
579 SEGMENTATION_ID=2010
580
581 [[post-config|/$Q_PLUGIN_CONF_FILE]]
582 [macvtap]
583 physical_interface_mappings = $PHYSICAL_NETWORK:eth1
584
585 [[post-config|$NOVA_CONF]]
586 force_config_drive = True
587
588
589Multi node with MacVTap compute node
590~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
591This scenario applies, if you require OpenStack provided l3, dhcp or metadata
592services. Those are hosted on a separate controller and network node, running
593some other l2 agent technology (in this example Open vSwitch). This node needs
594to be configured for VLAN tenant networks.
595
596For OVS, a similar configuration like described in the
597:ref:`OVS Provider Network <ovs-provider-network-controller>` section can be
598used. Just add the the following line to this local.conf, which also loads
599the MacVTap mechanism driver:
600
601::
602
603 [[local|localrc]]
604 ...
605 Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,linuxbridge,macvtap
606 ...
607
608For the MacVTap compute node, use this local.conf:
609
610::
611
612 HOST_IP=10.0.0.3
613 SERVICE_HOST=10.0.0.2
614 MYSQL_HOST=10.0.0.2
615 RABBIT_HOST=10.0.0.2
616 ADMIN_PASSWORD=secret
617 MYSQL_PASSWORD=secret
618 RABBIT_PASSWORD=secret
619 SERVICE_PASSWORD=secret
620
621 # Services that a compute node runs
622 disable_all_services
623 enable_plugin neutron git://git.openstack.org/openstack/neutron
624 ENABLED_SERVICES+=n-cpu,q-agt
625
626 ## MacVTap agent options
627 Q_AGENT=macvtap
628 PHYSICAL_NETWORK=default
629
630 [[post-config|/$Q_PLUGIN_CONF_FILE]]
631 [macvtap]
632 physical_interface_mappings = $PHYSICAL_NETWORK:eth1