Jump to: navigation, search

Difference between revisions of "Neutron/RoutedProviderNetworks"

(Associating Subnets to Segments)
(Replaced content with "== Routed Provider Network == Let's take this discussion to the [https://etherpad.openstack.org/p/routed-provider-networks-notes etherpad].")
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Routed Provider Network ==
 
== Routed Provider Network ==
  
'''This page is a HUGE work in progress!'''
+
Let's take this discussion to the [https://etherpad.openstack.org/p/routed-provider-networks-notes etherpad].
 
 
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:
 
 
 
: admin_token:REDACTED
 
: devstack_ip:10.224.24.223
 
: segmented_network:a2d4c3b3-9a45-426b-a2d4-76b74198550e
 
: segment_1:491854b4-4715-48ef-8e29-ca1fb3b48fdb
 
: segment_2:608a33b7-c03b-4595-acc2-8ac8a927250b
 
 
 
=== Segment CRUD ===
 
 
 
There first thing is to enable segment CRUD.  [https://review.openstack.org/#/c/296603 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.
 
 
 
: [ml2_type_vlan]
 
: 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.  [http://paste.openstack.org/show/495985/ 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 [http://paste.openstack.org/show/495986/ list segments by network].  Future patch sets will build on this capability.
 
 
 
=== Associating Subnets to Segments ===
 
 
 
[https://review.openstack.org/#/c/288774 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 [http://paste.openstack.org/show/495989/ this paste] and [http://paste.openstack.org/show/495991/ this paste] for request / response examples.
 

Latest revision as of 18:09, 3 May 2016

Routed Provider Network

Let's take this discussion to the etherpad.