Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
LEARNING OPENSTACK NETWORKING (NEUTRON)

You're reading from   LEARNING OPENSTACK NETWORKING (NEUTRON) Architect and build a network infrastructure for your cloud using OpenStack Neutron networking

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher
ISBN-13 9781783983308
Length 300 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
James Denton James Denton
Author Profile Icon James Denton
James Denton
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Learning OpenStack Networking (Neutron)
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Preparing the Network for OpenStack 2. Installing OpenStack FREE CHAPTER 3. Installing Neutron 4. Building a Virtual Switching Infrastructure 5. Creating Networks with Neutron 6. Creating Routers with Neutron 7. Load Balancing Traffic in Neutron 8. Protecting Instances on the Network Additional Neutron Commands ML2 Configuration Index

Installing the ML2 plugin


RHEL-based distributions, such as CentOS, require the installation of the openstack-neutron-ml2 package on all nodes as follows:

# yum install openstack-neutron-ml2

Creating a database for ML2

The ML2 plugin attempts to use a common database and schema that can be shared amongst multiple layer 2 agents. On the controller node, create a new database specifically for use with the ML2 plugin using the MySQL client:

# mysql -u root -p

Use the password set earlier in the OpenStack installation. In this guide, the password was set to openstack.

At the mysql> prompt, execute the following commands to create a database named neutron_ml2 and to grant permissions to the existing neutron user:

CREATE DATABASE neutron_ml2;
GRANT ALL PRIVILEGES ON neutron_ml2.* TO 'neutron'@'localhost' 
IDENTIFIED BY 'neutron';
GRANT ALL PRIVILEGES ON neutron_ml2.* TO 'neutron'@'%'; 
QUIT;

Use crudini to overwrite the existing database connection string in the Neutron configuration file with the new string on all hosts as follows:

# crudini --set /etc/neutron/neutron.conf database connection mysql://neutron:neutron@controller/neutron_ml2

Configuring Neutron to use ML2

Before the ML2 plugin can be used, changes, which include specifying the core plugin and database options, must be made to the Neutron configuration on all hosts.

The core_plugin configuration must be set to use the ML2 plugin. Use the following crudini command to make this change on all hosts:

# crudini --set /etc/neutron/neutron.conf DEFAULT core_plugin neutron.plugins.ml2.plugin.Ml2Plugin

In addition to configuration file changes, a symbolic link named plugin.ini must be created in the /etc/neutron/ directory that points to the appropriate plugin configuration file before neutron-server will start. For ML2, the link can be created with the following command:

# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

If you previously used the LinuxBridge or Open vSwitch plugin and are switching to ML2, be sure to remove the corresponding symbolic link prior to creating a new one for ML2.

The Neutron database must be stamped as the havana release before neutron-server starts. Use the neutron-db-manage command to accomplish this task only on the controller:

# neutron-db-manage --config-file /etc/neutron/plugin.ini --config-file /etc/neutron/neutron.conf stamp havana

Configuring service plugins

When the ML2 plugin is used, the L3 router plugin must be defined as a service plugin in the neutron.conf configuration file in addition to the FWaaS and LBaaS service plugins. The following are the service plugins for each of the services:

  • Routing: neutron.services.l3_router.l3_router_plugin.L3RouterPlugin

  • Load balancing: neutron.services.loadbalancer.plugin.LoadBalancerPlugin

  • Firewalling: neutron.services.firewall.fwaas_plugin.FirewallPlugin

To add support for the aforementioned services, add them to the service_plugins configuration option in /etc/neutron/neutron.conf using a text editor as follows:

service_plugins= neutron.services.l3_router.l3_router_plugin.L3RouterPlugin, neutron.services.loadbalancer.plugin.LoadBalancerPlugin, neutron.services.firewall.fwaas_plugin.FirewallPlugin
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images