neutron gateway #13

Supports: xenial bionic cosmic disco trusty


Neutron is a virtual network service for Openstack, and a part of Netstack. Just like OpenStack Nova provides an API to dynamically request and configure virtual servers, Neutron provides an API to dynamically request and configure virtual networks. These networks connect "interfaces" from other OpenStack services (e.g., virtual NICs from Nova VMs). The Neutron API supports extensions to provide advanced network capabilities (e.g., QoS, ACLs, network monitoring, etc.) . This charm provides central Neutron networking services as part of a Neutron based OpenStack deployment


Neutron provides flexible software defined networking (SDN) for OpenStack.

This charm is designed to be used in conjunction with the rest of the OpenStack related charms in the charm store to virtualize the network that Nova Compute instances plug into.

Neutron supports a rich plugin/extension framework for propriety networking solutions and supports (in core) Nicira NVP, NEC, Cisco and others...

See the upstream Neutron documentation for more details.


In order to use Neutron with OpenStack, you will need to deploy the nova-compute and nova-cloud-controller charms with the network-manager configuration set to 'Neutron':

    network-manager: Neutron

This decision must be made prior to deploying OpenStack with Juju as Neutron is deployed baked into these charms from install onwards:

juju deploy nova-compute
juju deploy --config config.yaml nova-cloud-controller
juju deploy neutron-api
juju add-relation nova-compute nova-cloud-controller
juju add-relation neutron-api nova-cloud-controller

The Neutron Gateway can then be added to the deploying:

juju deploy neutron-gateway
juju add-relation neutron-gateway mysql
juju add-relation neutron-gateway rabbitmq-server
juju add-relation neutron-gateway nova-cloud-controller
juju add-relation neutron-gateway neutron-api

The gateway provides two key services; L3 network routing and DHCP services.

These are both required in a fully functional Neutron OpenStack deployment.

See upstream Neutron multi extnet

Configuration Options

Port Configuration

All network types (internal, external) are configured with bridge-mappings and data-port and the flat-network-providers configuration option of the neutron-api charm. Once deployed, you can configure the network specifics using neutron net-create.

If the device name is not consistent between hosts, you can specify the same bridge multiple times with MAC addresses instead of interface names. The charm will loop through the list and configure the first matching interface.

Basic configuration of a single external network, typically used as floating IP addresses combined with a GRE private network:

    bridge-mappings:         physnet1:br-ex
    data-port:               br-ex:eth1
    flat-network-providers:  physnet1

neutron net-create --provider:network_type flat \
    --provider:physical_network physnet1 --router:external=true \
neutron router-gateway-set provider external

Alternative configuration with two networks, where the internal private network is directly connected to the gateway with public IP addresses but a floating IP address range is also offered.

    bridge-mappings:         physnet1:br-data external:br-ex
    data-port:               br-data:eth1 br-ex:eth2
    flat-network-providers:  physnet1 external

Alternative configuration with two external networks, one for public instance addresses and one for floating IP addresses. Both networks are on the same physical network connection (but they might be on different VLANs, that is configured later using neutron net-create).

    bridge-mappings:         physnet1:br-data
    data-port:               br-data:eth1
    flat-network-providers:  physnet1

neutron net-create --provider:network_type vlan \
    --provider:segmentation_id 400 \
    --provider:physical_network physnet1 --shared external
neutron net-create --provider:network_type vlan \
    --provider:segmentation_id 401 \
    --provider:physical_network physnet1 --shared --router:external=true \
neutron router-gateway-set provider floating

This replaces the previous system of using ext-port, which always created a bridge called br-ex for external networks which was used implicitly by external router interfaces.

Instance MTU

When using Open vSwitch plugin with GRE tunnels default MTU of 1500 can cause packet fragmentation due to GRE overhead. One solution is to increase the MTU on physical hosts and network equipment. When this is not possible or practical the charm's instance-mtu option can be used to reduce instance MTU via DHCP.

juju set neutron-gateway instance-mtu=1400

OpenStack upstream documentation recommends a MTU value of 1400: OpenStack documentation

Note that this option was added in Havana and will be ignored in older releases.


(string) Experimental enable apparmor profile. Valid settings: 'complain', 'enforce' or 'disable'. AA disabled by default.
(boolean) If True enables openstack upgrades for this charm via juju actions. You will still need to set openstack-origin to the new repository but instead of an upgrade running automatically across all units, it will wait for you to execute the openstack-upgrade action for this charm on each unit. If False it will revert to existing behavior of upgrading all units on config change.
(string) Space-separated list of ML2 data bridge mappings with format <provider>:<bridge>.
(boolean) Juju propagates availability zone information to charms from the underlying machine provider such as MAAS and this option allows the charm to use JUJU_AVAILABILITY_ZONE to set default_availability_zone for Neutron agents (DHCP and L3 agents). This option overrides the default-availability-zone charm config setting only when the Juju provider sets JUJU_AVAILABILITY_ZONE.
(string) Space-delimited list of bridge:port mappings. Ports will be added to their corresponding bridge. The bridges will allow usage of flat or VLAN network types with Neutron and should match this defined in bridge-mappings. . Ports provided can be the name or MAC address of the interface to be added to the bridge. If MAC addresses are used, you may provide multiple bridge:mac for the same bridge so as to be able to configure multiple units. In this case the charm will run through the provided MAC addresses for each bridge until it finds one it can resolve to an interface name.
(boolean) Enable debug logging.
(string) Default availability zone to use for agents (l3, dhcp) on this machine. If this option is not set, the default availability zone 'nova' is used. If customize-failure-domain is set to True, it will override this option only if an AZ is set by the Juju provider. If JUJU_AVAILABILITY_ZONE is not set, the value specified by this option will be used regardless of customize-failure-domain's setting. . NOTE: Router and Network objects have a property called availability_zone_hints which can be used to restrict dnsmasq and router namespace placement by DHCP and L3 agents to specific neutron availability zones. Neutron AZs are not tied to Nova AZs but their names can match. .
(string) A comma-separated list of DNS servers which will be used by dnsmasq as forwarders.
(string) Comma-separated list of key=value config flags with the additional dhcp options for neutron dnsmasq.
(boolean) Enable metadata on an isolated network (no router ports).
(boolean) Optional configuration to support use of linux router Note that this is used only for Cisco n1kv plugin.
(boolean) The metadata network is used by solutions which do not leverage the l3 agent for providing access to the metadata service.
(string) [DEPRECATED] Use bridge-mappings and data-port to create a network which can be used for external connectivity. You can call the network external and the bridge br-ex by convention, but neither is required. . Space-delimited list of external ports to use for routing of instance traffic to the external public network. Valid values are either MAC addresses (in which case only MAC addresses for interfaces without an IP address already assigned will be used), or interfaces (eth0)
(string) Optional configuration to set the external-network-id. Only needed when configuring multiple external networks and should be used in conjunction with run-internal-router.
(string) Space-delimited list of Neutron flat network providers.
(string) Default network interface on which HA cluster will bind to communicate with the other members of the HA Cluster.
(boolean) If True will enable Pacemaker to monitor the neutron-ha-monitor daemon on every neutron-gateway unit, which detects neutron agents status and reschedule resources hosting on failed agents, detects local errors and release resources when network is unreachable or do necessary recover tasks. This feature targets to < Juno which doesn't natively support HA in Neutron itself.
(int) Default multicast port number that will be used to communicate between HA Cluster nodes.
(string) Apply system hardening. Supports a space-delimited list of modules to run. Supported modules currently include os, ssh, apache and mysql.
(int) Configure DHCP services to provide MTU configuration to instances within the cloud. This is useful in deployments where its not possible to increase MTU on switches and physical servers to accommodate the packet overhead of using GRE tunnels.
(string) IPFIX target wit the format "IP_Address:Port". This will enable IPFIX exporting on all OVS bridges to the target, including br-int and br-ext.
(string) Used by the nrpe-external-master subordinate charm. A string that will be prepended to instance name to set the host name in Nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
(string) A comma-separated list of Nagios service groups. If left empty, the nagios_context will be used as the servicegroup
(string) RabbitMQ Nova user
(string) RabbitMQ Nova Virtual Host
(string) Repository from which to install. May be one of the following: distro (default), ppa:somecustom/ppa, a deb url sources entry, or a supported Ubuntu Cloud Archive, e.g. . cloud:<series>-<openstack-release> cloud:<series>-<openstack-release>/updates cloud:<series>-<openstack-release>/staging cloud:<series>-<openstack-release>/proposed . See for info on which cloud archives are available and supported. . NOTE: updating this setting to a source that is known to provide a later version of OpenStack will trigger a software upgrade unless action-managed-upgrade is set to True.
(string) The IP address and netmask of the OpenStack Data network (e.g. . This network will be used for tenant network traffic in overlay networks.
(string) Network configuration plugin to use for quantum. Supported values include: . ovs - ML2 + Open vSwitch nsx - VMware NSX n1kv - Cisco N1kv ovs-odl - ML2 + Open vSwitch with OpenDayLight Controller
(string) RabbitMQ user
(string) RabbitMQ Virtual Host
(string) Optional configuration to support how the L3 agent option handle_internal_only_routers is configured. all => Set to be true everywhere none => Set to be false everywhere leader => Set to be true on one node (the leader) and false everywhere else. Use leader and none when configuring multiple floating pools
(string) YAML-formatted associative array of sysctl key/value pairs to be set persistently e.g. '{ kernel.pid_max : 4194303 }'.
{ net.ipv4.neigh.default.gc_thresh1 : 128, net.ipv4.neigh.default.gc_thresh2 : 28672, net.ipv4.neigh.default.gc_thresh3 : 32768, net.ipv6.neigh.default.gc_thresh1 : 128, net.ipv6.neigh.default.gc_thresh2 : 28672, net.ipv6.neigh.default.gc_thresh3 : 32768, net.nf_conntrack_max : 1000000, net.netfilter.nf_conntrack_buckets : 204800, net.netfilter.nf_conntrack_max : 1000000 }
(boolean) Setting this to True will allow supporting services to log to syslog.
(string) A JSON-formatted string that will serve as vendor metadata (via "StaticJSON" provider) to all VM's within an OpenStack deployment, regardless of project or domain. For deployments of Rocky or later this value is ignored. Please set the corresponding value in the nova-cloud-controller charm.
(string) A URL serving JSON-formatted data that will serve as vendor metadata (via "DynamicJSON" provider) to all VM's within an OpenStack deployment, regardless of project or domain. . Only supported in OpenStack Newton and higher. For deployments of Rocky or later this value is ignored. Please set the corresponding value in the nova-cloud-controller charm.
(boolean) Enable verbose logging.
(string) Space-delimited list of <physical_network>:<vlan_min>:<vlan_max> or <physical_network> specifying physical_network names usable for VLAN provider and tenant networks, as well as ranges of VLAN tags on each available for allocation to tenant networks.
(float) The CPU core multiplier to use when configuring worker processes for this service. By default, the number of workers for each daemon is set to twice the number of CPU cores a service unit has. When deployed in a LXD container, this default value will be capped to 4 workers unless this configuration option is set.