Setting Up a Flat Network with Neutron

Data Network

This setup will allow the VMs to use an existing network. In this example, eth2 is connected to this pre-existing network ( that we want to use for the OpenStack VMs.

All the configuration is done in the node dedicated to Nova Networking.

1. Set up the Open vSwitch bridge:

# ovs-vsctl add-br br-eth2
# ovs-vsctl add-port br-eth2 eth2

2. Set up /etc/network/interfaces (node’s IP is

auto eth2
iface eth2 inet manual
up ifconfig $IFACE up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down

auto br-eth2
iface br-eth2 inet static

3. Tell Open vSwitch to use the bridge connected to eth2 (br-eth2) and map physnet1 to it /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini:

network_vlan_ranges = physnet1
bridge_mappings = physnet1:br-eth2

4. Tell Neutron to not to use the metadata proxy in /etc/nova/nova.conf (otherwise you get a HTTP 400 when querying the metadata service):


Note that the metadata service is managed by Neutron as usual via the neutron-metadata-agent service anyway.

5. Create the network telling to use the physnet1 mapped above to br-eth2:

# neutron net-create flat-provider-network --shared  --provider:network_type flat --provider:physical_network physnet1

6. Create the subnet:

# neutron subnet-create --name flat-provider-subnet --gateway --dns-nameserver  --allocation-pool start=,end=  flat-provider-network

That’s it. Now VMs will get an IP of the specified range and will be directly connected to our network via Open vSwitch.


6 thoughts on “Setting Up a Flat Network with Neutron

  1. When I try to create the network in step 5, I get the following error:

    400-{u’NeutronError’: {u’message’: u’Invalid input for operation: Unknown provider:physical_network physnet1.’, u’type’: u’InvalidInput’, u’detail’: u”}}

    I did modify nova.conf as indicated in step 4, and restarted services… any ideas on what’s going wrong?

    • Make sure you defined physnet1 in step 3 with network_vlan_ranges and bridge_mappings in ovs_neutron_plugin.ini and restart the neutron services before proceeding to step 5.

      • I was having similar issues (despite running: service neutron restart ; service neutron-dhcp-agent restart ; service neutron-l3-agent restart ; service neutron-metadata-agent restart ; service neutron-openvswitch-agent restart
        ), but restarting the node fixed it immediately.

  2. I noticed that you set ‘–dns-nameserver’ when you set up your subnet. This is not an address on your network.
    I assume this has something to do with resolving the meta-data agent, but I’m not 100% on this. Could you elaborate a little?


    • Sure, as I also specified a gateway ( the DNS server on can be reached via the defined gateway.

  3. Pingback: Neutron – A Flat Network in a Single-Node, Single-NIC OpenStack environment (Kilo on Ubuntu 14.0.4) – Desert Island IT

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s