Jump to: navigation, search


< Neutron
Revision as of 17:28, 3 May 2016 by Carl (talk | contribs) (Associating Subnets to Segments)

Routed Provider Network

This page is a HUGE work in progress!

As I've been working on routed networks patches, I decided that I should share how I am setting up my environment and using them.

To avoid dependence on the neutron client work that is in progress, I'm using Postman 4, a Chrome extension, to generate my API requests. I make use of its "Environments" feature to capture certain things that can change from time to time so that my requests are generally reusable. At the time of this writing, I have the following values defined in an environment:


Segment CRUD

There first thing is to enable segment CRUD. This patch is what you need. It is a service plugin that isn't enabled by default. First, edit you have the patch, edit /etc/neutron/neutron.conf and append segments to the list of service_plugins. Here's mine:

service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin, segments

Since segments is defined in setup.cfg, you actually need to reinstall neutron for this to work. In devstack, I just do this:

$ cd /opt/stack/neutron
$ sudo pip install -e file://$PWD

There is one more change you need to do assuming you're going to use vlans and ML2. You need to edit /etc/neutron/plugins/ml2/ml2_conf.ini to add your physnets and vlan ranges. I just use the same vlan segment id for each segment. But, the physnet has to be different for each segment.

network_vlan_ranges = segment-1:2000:2000, segment-2:2000:2000

At this point, restart the neutron service and then you should be able to create a multi-segmented network. This paste shows a details request / response. Note that it is not possible to create a multi-segmented network using the python-neutronclient at this time.

It is also not yet possible to create, delete, or update segments on an existing network. But it is possible to list segments by network. Future patch sets will build on this capability.

Associating Subnets to Segments

This patch is what you need for this to work. This patch has a database migration. After applying the patch, you'll need to run the migration:

Stop the neutron server
neutron-db-manage upgrade heads
Start the neutron server

Once you've done this, you should be able create some subnets which are associated to segments. See this paste and this paste for request / response examples.