blob: a7adeeff7307696f878f4c6518954ea20904fd3f [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
Stephen Finucane6512f012024-08-26 12:19:06 +010044.. image:: /assets/images/neutron-network-1.png
45 :alt: Network configuration for a single DevStack node
Sean M. Collins02ae50d2015-03-20 09:58:55 -070046
47
48DevStack Configuration
49----------------------
50
Sean M. Collins16501662015-10-12 11:01:44 -040051The following is a complete `local.conf` for the host named
52`devstack-1`. It will run all the API and services, as well as
53serving as a hypervisor for guest instances.
Sean M. Collins02ae50d2015-03-20 09:58:55 -070054
55::
56
Sean M. Collins16501662015-10-12 11:01:44 -040057 [[local|localrc]]
Sean M. Collins02ae50d2015-03-20 09:58:55 -070058 HOST_IP=172.18.161.6
59 SERVICE_HOST=172.18.161.6
60 MYSQL_HOST=172.18.161.6
61 RABBIT_HOST=172.18.161.6
62 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +000063 ADMIN_PASSWORD=secret
64 DATABASE_PASSWORD=secret
65 RABBIT_PASSWORD=secret
66 SERVICE_PASSWORD=secret
Sean M. Collins02ae50d2015-03-20 09:58:55 -070067
68 ## Neutron options
69 Q_USE_SECGROUP=True
Christian Berendt1c394822015-09-10 12:15:16 +020070 FLOATING_RANGE="172.18.161.0/24"
Kevin Benton4bfbc292016-11-15 17:26:05 -080071 IPV4_ADDRS_SAFE_TO_USE="10.0.0.0/22"
Sean M. Collins02ae50d2015-03-20 09:58:55 -070072 Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
73 PUBLIC_NETWORK_GATEWAY="172.18.161.1"
Sean M. Collins02ae50d2015-03-20 09:58:55 -070074 PUBLIC_INTERFACE=eth0
Sean M. Collins2977b302016-01-25 09:10:52 -050075
76 # Open vSwitch provider networking configuration
Sean M. Collins02ae50d2015-03-20 09:58:55 -070077 Q_USE_PROVIDERNET_FOR_PUBLIC=True
78 OVS_PHYSICAL_BRIDGE=br-ex
79 PUBLIC_BRIDGE=br-ex
80 OVS_BRIDGE_MAPPINGS=public:br-ex
81
82
Sean M. Collins16501662015-10-12 11:01:44 -040083Adding Additional Compute Nodes
84-------------------------------
85
86Let's suppose that after installing DevStack on the first host, you
87also want to do multinode testing and networking.
88
89Physical Network Setup
90~~~~~~~~~~~~~~~~~~~~~~
91
Stephen Finucane6512f012024-08-26 12:19:06 +010092.. image:: /assets/images/neutron-network-2.png
93 :alt: Network configuration for multiple DevStack nodes
Sean M. Collins16501662015-10-12 11:01:44 -040094
95After DevStack installs and configures Neutron, traffic from guest VMs
96flows out of `devstack-2` (the compute node) and is encapsulated in a
97VXLAN tunnel back to `devstack-1` (the control node) where the L3
98agent is running.
99
100::
101
102 stack@devstack-2:~/devstack$ sudo ovs-vsctl show
103 8992d965-0ba0-42fd-90e9-20ecc528bc29
104 Bridge br-int
105 fail_mode: secure
106 Port br-int
107 Interface br-int
108 type: internal
109 Port patch-tun
110 Interface patch-tun
111 type: patch
112 options: {peer=patch-int}
113 Bridge br-tun
114 fail_mode: secure
115 Port "vxlan-c0a801f6"
116 Interface "vxlan-c0a801f6"
117 type: vxlan
118 options: {df_default="true", in_key=flow, local_ip="172.18.161.7", out_key=flow, remote_ip="172.18.161.6"}
119 Port patch-int
120 Interface patch-int
121 type: patch
122 options: {peer=patch-tun}
123 Port br-tun
124 Interface br-tun
125 type: internal
126 ovs_version: "2.0.2"
127
128Open vSwitch on the control node, where the L3 agent runs, is
129configured to de-encapsulate traffic from compute nodes, then forward
130it over the `br-ex` bridge, where `eth0` is attached.
131
132::
133
134 stack@devstack-1:~/devstack$ sudo ovs-vsctl show
135 422adeea-48d1-4a1f-98b1-8e7239077964
136 Bridge br-tun
137 fail_mode: secure
138 Port br-tun
139 Interface br-tun
140 type: internal
141 Port patch-int
142 Interface patch-int
143 type: patch
144 options: {peer=patch-tun}
145 Port "vxlan-c0a801d8"
146 Interface "vxlan-c0a801d8"
147 type: vxlan
148 options: {df_default="true", in_key=flow, local_ip="172.18.161.6", out_key=flow, remote_ip="172.18.161.7"}
149 Bridge br-ex
150 Port phy-br-ex
151 Interface phy-br-ex
152 type: patch
153 options: {peer=int-br-ex}
154 Port "eth0"
155 Interface "eth0"
156 Port br-ex
157 Interface br-ex
158 type: internal
159 Bridge br-int
160 fail_mode: secure
161 Port "tapce66332d-ea"
162 tag: 1
163 Interface "tapce66332d-ea"
164 type: internal
165 Port "qg-65e5a4b9-15"
166 tag: 2
167 Interface "qg-65e5a4b9-15"
168 type: internal
169 Port "qr-33e5e471-88"
170 tag: 1
171 Interface "qr-33e5e471-88"
172 type: internal
173 Port "qr-acbe9951-70"
174 tag: 1
175 Interface "qr-acbe9951-70"
176 type: internal
177 Port br-int
178 Interface br-int
179 type: internal
180 Port patch-tun
181 Interface patch-tun
182 type: patch
183 options: {peer=patch-int}
184 Port int-br-ex
185 Interface int-br-ex
186 type: patch
187 options: {peer=phy-br-ex}
188 ovs_version: "2.0.2"
189
190`br-int` is a bridge that the Open vSwitch mechanism driver creates,
191which is used as the "integration bridge" where ports are created, and
192plugged into the virtual switching fabric. `br-ex` is an OVS bridge
193that is used to connect physical ports (like `eth0`), so that floating
Sean Daguedb48db12016-04-06 08:09:31 -0400194IP traffic for project networks can be received from the physical
195network infrastructure (and the internet), and routed to self service
196project network ports. `br-tun` is a tunnel bridge that is used to
197connect OpenStack nodes (like `devstack-2`) together. This bridge is
198used so that project network traffic, using the VXLAN tunneling
199protocol, flows between each compute node where project instances run.
Sean M. Collins16501662015-10-12 11:01:44 -0400200
Sean M. Collins16501662015-10-12 11:01:44 -0400201DevStack Compute Configuration
202~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
203
204The host `devstack-2` has a very minimal `local.conf`.
205
206::
207
208 [[local|localrc]]
209 HOST_IP=172.18.161.7
210 SERVICE_HOST=172.18.161.6
211 MYSQL_HOST=172.18.161.6
212 RABBIT_HOST=172.18.161.6
213 GLANCE_HOSTPORT=172.18.161.6:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000214 ADMIN_PASSWORD=secret
215 MYSQL_PASSWORD=secret
216 RABBIT_PASSWORD=secret
217 SERVICE_PASSWORD=secret
Sean M. Collins16501662015-10-12 11:01:44 -0400218
219 ## Neutron options
220 PUBLIC_INTERFACE=eth0
Artom Lifshitz7e36ded2018-05-02 10:38:57 -0400221 ENABLED_SERVICES=n-cpu,rabbit,q-agt,placement-client
Sean M. Collins16501662015-10-12 11:01:44 -0400222
223Network traffic from `eth0` on the compute nodes is then NAT'd by the
224controller node that runs Neutron's `neutron-l3-agent` and provides L3
225connectivity.
226
Sean M. Collins02ae50d2015-03-20 09:58:55 -0700227
Sean M. Collins34296012014-10-27 11:57:20 -0400228Neutron Networking with Open vSwitch and Provider Networks
229==========================================================
230
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400231In some instances, it is desirable to use neutron's provider
Sean M. Collins34296012014-10-27 11:57:20 -0400232networking extension, so that networks that are configured on an
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400233external router can be utilized by neutron, and instances created via
Sean M. Collins34296012014-10-27 11:57:20 -0400234Nova can attach to the network managed by the external router.
235
236For example, in some lab environments, a hardware router has been
237pre-configured by another party, and an OpenStack developer has been
238given a VLAN tag and IP address range, so that instances created via
239DevStack will use the external router for L3 connectivity, as opposed
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400240to the neutron L3 service.
Sean M. Collins34296012014-10-27 11:57:20 -0400241
Sean M. Collins4696db92015-10-09 12:31:57 -0400242Physical Network Setup
243----------------------
244
Stephen Finucane6512f012024-08-26 12:19:06 +0100245.. image:: /assets/images/neutron-network-3.png
246 :alt: Network configuration for provider networks
Sean M. Collins4696db92015-10-09 12:31:57 -0400247
Sean M. Collins887f1822015-10-12 10:36:34 -0400248On a compute node, the first interface, eth0 is used for the OpenStack
249management (API, message bus, etc) as well as for ssh for an
250administrator to access the machine.
251
252::
253
254 stack@compute:~$ ifconfig eth0
255 eth0 Link encap:Ethernet HWaddr bc:16:65:20:af:fc
256 inet addr:10.0.0.3
257
258eth1 is manually configured at boot to not have an IP address.
259Consult your operating system documentation for the appropriate
260technique. For Ubuntu, the contents of `/etc/network/interfaces`
261contains:
262
263::
264
265 auto eth1
266 iface eth1 inet manual
267 up ifconfig $IFACE 0.0.0.0 up
268 down ifconfig $IFACE 0.0.0.0 down
269
270The second physical interface, eth1 is added to a bridge (in this case
271named br-ex), which is used to forward network traffic from guest VMs.
272
273::
274
275 stack@compute:~$ sudo ovs-vsctl add-br br-ex
276 stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1
277 stack@compute:~$ sudo ovs-vsctl show
278 9a25c837-32ab-45f6-b9f2-1dd888abcf0f
279 Bridge br-ex
280 Port br-ex
281 Interface br-ex
282 type: internal
283 Port phy-br-ex
284 Interface phy-br-ex
285 type: patch
286 options: {peer=int-br-ex}
287 Port "eth1"
288 Interface "eth1"
289
Sean M. Collins34296012014-10-27 11:57:20 -0400290
291Service Configuration
292---------------------
293
294**Control Node**
295
296In this example, the control node will run the majority of the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400297OpenStack API and management services (keystone, glance,
298nova, neutron)
Sean M. Collins34296012014-10-27 11:57:20 -0400299
300
301**Compute Nodes**
302
303In this example, the nodes that will host guest instances will run
Markus Zoellerc30657d2015-11-02 11:27:46 +0100304the ``neutron-openvswitch-agent`` for network connectivity, as well as
305the compute service ``nova-compute``.
Sean M. Collins34296012014-10-27 11:57:20 -0400306
307DevStack Configuration
308----------------------
309
Andreas Scheuring28128e22016-04-14 14:23:53 +0200310.. _ovs-provider-network-controller:
311
Sean M. Collins34296012014-10-27 11:57:20 -0400312The following is a snippet of the DevStack configuration on the
313controller node.
314
315::
316
Sean M. Collins611cab42015-10-09 12:54:32 -0400317 HOST_IP=10.0.0.2
318 SERVICE_HOST=10.0.0.2
319 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400320 RABBIT_HOST=10.0.0.2
321 GLANCE_HOSTPORT=10.0.0.2:9292
Sean M. Collins34296012014-10-27 11:57:20 -0400322 PUBLIC_INTERFACE=eth1
323
Balagopal7ed812c2016-03-01 04:43:31 +0000324 ADMIN_PASSWORD=secret
325 MYSQL_PASSWORD=secret
326 RABBIT_PASSWORD=secret
327 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400328
Sean M. Collins34296012014-10-27 11:57:20 -0400329 ## Neutron options
330 Q_USE_SECGROUP=True
Matthew Edmonds14813222018-07-27 15:48:38 -0400331 ENABLE_TENANT_VLANS=True
332 TENANT_VLAN_RANGE=3001:4000
Sean M. Collins34296012014-10-27 11:57:20 -0400333 PHYSICAL_NETWORK=default
334 OVS_PHYSICAL_BRIDGE=br-ex
335
336 Q_USE_PROVIDER_NETWORKING=True
Sean M. Collins34296012014-10-27 11:57:20 -0400337
Jan Stodt7eb672d2016-08-24 15:29:06 +0200338 disable_service q-l3
Sean M. Collins34296012014-10-27 11:57:20 -0400339
340 ## Neutron Networking options used to create Neutron Subnets
341
Kevin Benton4bfbc292016-11-15 17:26:05 -0800342 IPV4_ADDRS_SAFE_TO_USE="203.0.113.0/24"
syed ahsan shamim zaidi512be7d2015-10-20 21:20:27 +0000343 NETWORK_GATEWAY=203.0.113.1
Sean M. Collins34296012014-10-27 11:57:20 -0400344 PROVIDER_SUBNET_NAME="provider_net"
345 PROVIDER_NETWORK_TYPE="vlan"
346 SEGMENTATION_ID=2010
rajinirc58a1552016-09-27 17:14:59 -0500347 USE_SUBNETPOOL=False
Sean M. Collins34296012014-10-27 11:57:20 -0400348
Kevin Benton4bfbc292016-11-15 17:26:05 -0800349In this configuration we are defining IPV4_ADDRS_SAFE_TO_USE to be a
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400350publicly routed IPv4 subnet. In this specific instance we are using
chengebj523878930122018-01-18 15:53:27 +0800351the special TEST-NET-3 subnet defined in `RFC 5737 <https://tools.ietf.org/html/rfc5737>`_,
Kevin Benton4bfbc292016-11-15 17:26:05 -0800352which is used for documentation. In your DevStack setup, IPV4_ADDRS_SAFE_TO_USE
Sean M. Collinsd72b8392015-06-18 12:40:09 -0400353would be a public IP address range that you or your organization has
354allocated to you, so that you could access your instances from the
355public internet.
Sean M. Collins34296012014-10-27 11:57:20 -0400356
John Kasperskibdc0fa82015-11-23 11:56:33 -0600357The following is the DevStack configuration on
Sean M. Collins611cab42015-10-09 12:54:32 -0400358compute node 1.
Sean M. Collins34296012014-10-27 11:57:20 -0400359
360::
361
Sean M. Collins611cab42015-10-09 12:54:32 -0400362 HOST_IP=10.0.0.3
363 SERVICE_HOST=10.0.0.2
364 MYSQL_HOST=10.0.0.2
Sean M. Collins611cab42015-10-09 12:54:32 -0400365 RABBIT_HOST=10.0.0.2
366 GLANCE_HOSTPORT=10.0.0.2:9292
Balagopal7ed812c2016-03-01 04:43:31 +0000367 ADMIN_PASSWORD=secret
368 MYSQL_PASSWORD=secret
369 RABBIT_PASSWORD=secret
370 SERVICE_PASSWORD=secret
Sean M. Collins611cab42015-10-09 12:54:32 -0400371
Sean M. Collins34296012014-10-27 11:57:20 -0400372 # Services that a compute node runs
373 ENABLED_SERVICES=n-cpu,rabbit,q-agt
374
Sean M. Collins2977b302016-01-25 09:10:52 -0500375 ## Open vSwitch provider networking options
Sean M. Collins34296012014-10-27 11:57:20 -0400376 PHYSICAL_NETWORK=default
377 OVS_PHYSICAL_BRIDGE=br-ex
378 PUBLIC_INTERFACE=eth1
379 Q_USE_PROVIDER_NETWORKING=True
Sean M. Collins34296012014-10-27 11:57:20 -0400380
Sean M. Collins611cab42015-10-09 12:54:32 -0400381Compute node 2's configuration will be exactly the same, except
Markus Zoellerc30657d2015-11-02 11:27:46 +0100382``HOST_IP`` will be ``10.0.0.4``
Sean M. Collins611cab42015-10-09 12:54:32 -0400383
Sean M. Collins34296012014-10-27 11:57:20 -0400384When DevStack is configured to use provider networking (via
vsaienkod8942212016-05-13 12:51:30 +0300385``Q_USE_PROVIDER_NETWORKING`` is True) -
Sean M. Collins34296012014-10-27 11:57:20 -0400386DevStack will automatically add the network interface defined in
Markus Zoellerc30657d2015-11-02 11:27:46 +0100387``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE``
Sean M. Collins34296012014-10-27 11:57:20 -0400388
389For example, with the above configuration, a bridge is
Markus Zoellerc30657d2015-11-02 11:27:46 +0100390created, named ``br-ex`` which is managed by Open vSwitch, and the
391second interface on the compute node, ``eth1`` is attached to the
Shilla Saebi2ed09d82015-04-21 15:02:13 -0400392bridge, to forward traffic sent by guest VMs.
Sean M. Collins872a2622015-10-06 12:45:06 -0400393
394Miscellaneous Tips
395==================
396
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500397Non-Standard MTU on the Physical Network
398----------------------------------------
399
Sean M. Collins087ed522016-03-16 11:53:09 -0400400Neutron by default uses a MTU of 1500 bytes, which is
401the standard MTU for Ethernet.
402
403A different MTU can be specified by adding the following to
404the Neutron section of `local.conf`. For example,
405if you have network equipment that supports jumbo frames, you could
406set the MTU to 9000 bytes by adding the following
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500407
408::
Sean M. Collinsf81ae882016-02-01 14:00:20 -0500409
Sean M. Collins087ed522016-03-16 11:53:09 -0400410 [[post-config|/$Q_PLUGIN_CONF_FILE]]
411 global_physnet_mtu = 9000
Mike Spreitzer4baa4ce2016-01-26 14:06:17 -0500412
Sean M. Collins872a2622015-10-06 12:45:06 -0400413
414Disabling Next Generation Firewall Tools
415----------------------------------------
416
417DevStack does not properly operate with modern firewall tools. Specifically
418it will appear as if the guest VM can access the external network via ICMP,
419but UDP and TCP packets will not be delivered to the guest VM. The root cause
420of the issue is that both ufw (Uncomplicated Firewall) and firewalld (Fedora's
421firewall manager) apply firewall rules to all interfaces in the system, rather
422then per-device. One solution to this problem is to revert to iptables
423functionality.
424
425To get a functional firewall configuration for Fedora do the following:
426
427::
428
429 sudo service iptables save
430 sudo systemctl disable firewalld
431 sudo systemctl enable iptables
432 sudo systemctl stop firewalld
433 sudo systemctl start iptables
434
435
436To get a functional firewall configuration for distributions containing ufw,
437disable ufw. Note ufw is generally not enabled by default in Ubuntu. To
438disable ufw if it was enabled, do the following:
439
440::
441
442 sudo service iptables save
443 sudo ufw disable
444
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400445Configuring Extension Drivers for the ML2 Plugin
446------------------------------------------------
Sean M. Collins872a2622015-10-06 12:45:06 -0400447
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400448Extension drivers for the ML2 plugin are set with the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100449``Q_ML2_PLUGIN_EXT_DRIVERS``, and includes the 'port_security' extension
Sean M. Collinsd8aa10e2015-10-09 12:21:30 -0400450by default. If you want to remove all the extension drivers (even
Markus Zoellerc30657d2015-11-02 11:27:46 +0100451'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank.
Sean M. Collins872a2622015-10-06 12:45:06 -0400452
Sean M. Collins2977b302016-01-25 09:10:52 -0500453
Andreas Scheuring28128e22016-04-14 14:23:53 +0200454Using MacVTap instead of Open vSwitch
455------------------------------------------
456
457Security groups are not supported by the MacVTap agent. Due to that, devstack
458configures the NoopFirewall driver on the compute node.
459
460MacVTap agent does not support l3, dhcp and metadata agent. Due to that you can
461chose between the following deployment scenarios:
462
463Single node with provider networks using config drive and external l3, dhcp
464~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
465This scenario applies, if l3 and dhcp services are provided externally, or if
466you do not require them.
467
468
469::
470
471 [[local|localrc]]
472 HOST_IP=10.0.0.2
473 SERVICE_HOST=10.0.0.2
474 MYSQL_HOST=10.0.0.2
475 RABBIT_HOST=10.0.0.2
476 ADMIN_PASSWORD=secret
477 MYSQL_PASSWORD=secret
478 RABBIT_PASSWORD=secret
479 SERVICE_PASSWORD=secret
480
481 Q_ML2_PLUGIN_MECHANISM_DRIVERS=macvtap
482 Q_USE_PROVIDER_NETWORKING=True
483
Matt Riedemann9b6d2f22019-06-18 10:43:16 -0400484 enable_plugin neutron https://opendev.org/openstack/neutron
Andreas Scheuring28128e22016-04-14 14:23:53 +0200485
486 ## MacVTap agent options
487 Q_AGENT=macvtap
488 PHYSICAL_NETWORK=default
489
Kevin Benton4bfbc292016-11-15 17:26:05 -0800490 IPV4_ADDRS_SAFE_TO_USE="203.0.113.0/24"
Andreas Scheuring28128e22016-04-14 14:23:53 +0200491 NETWORK_GATEWAY=203.0.113.1
492 PROVIDER_SUBNET_NAME="provider_net"
493 PROVIDER_NETWORK_TYPE="vlan"
494 SEGMENTATION_ID=2010
rajinirc58a1552016-09-27 17:14:59 -0500495 USE_SUBNETPOOL=False
Andreas Scheuring28128e22016-04-14 14:23:53 +0200496
497 [[post-config|/$Q_PLUGIN_CONF_FILE]]
498 [macvtap]
499 physical_interface_mappings = $PHYSICAL_NETWORK:eth1
500
501 [[post-config|$NOVA_CONF]]
502 force_config_drive = True
503
504
505Multi node with MacVTap compute node
506~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
507This scenario applies, if you require OpenStack provided l3, dhcp or metadata
508services. Those are hosted on a separate controller and network node, running
509some other l2 agent technology (in this example Open vSwitch). This node needs
510to be configured for VLAN tenant networks.
511
512For OVS, a similar configuration like described in the
513:ref:`OVS Provider Network <ovs-provider-network-controller>` section can be
Hironori Shiinaaa7ec812016-09-28 20:21:57 +0900514used. Just add the following line to this local.conf, which also loads
Andreas Scheuring28128e22016-04-14 14:23:53 +0200515the MacVTap mechanism driver:
516
517::
518
519 [[local|localrc]]
520 ...
Brian Haley12abc722025-02-10 13:48:37 -0500521 Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,macvtap
Andreas Scheuring28128e22016-04-14 14:23:53 +0200522 ...
523
524For the MacVTap compute node, use this local.conf:
525
526::
527
528 HOST_IP=10.0.0.3
529 SERVICE_HOST=10.0.0.2
530 MYSQL_HOST=10.0.0.2
531 RABBIT_HOST=10.0.0.2
532 ADMIN_PASSWORD=secret
533 MYSQL_PASSWORD=secret
534 RABBIT_PASSWORD=secret
535 SERVICE_PASSWORD=secret
536
537 # Services that a compute node runs
538 disable_all_services
Matt Riedemann9b6d2f22019-06-18 10:43:16 -0400539 enable_plugin neutron https://opendev.org/openstack/neutron
Andreas Scheuring28128e22016-04-14 14:23:53 +0200540 ENABLED_SERVICES+=n-cpu,q-agt
541
542 ## MacVTap agent options
543 Q_AGENT=macvtap
544 PHYSICAL_NETWORK=default
545
546 [[post-config|/$Q_PLUGIN_CONF_FILE]]
547 [macvtap]
548 physical_interface_mappings = $PHYSICAL_NETWORK:eth1