How to configure OpenStack Networking

In this tutorial, How to configure OpenStack Networking. In previous, My post has How to install OpenStack all in one Centos 7.  This example configures the FLAT type of provider networking. First, you have to configure basic settings Openstack Neutron Services refer here.

For example, Configure FLAT type for Node 2 network interfaces

  • eth0:
  • eth1: UP with no IP

Configure OpenStack Networking

Configure Neutron services

# add bridge
[root@DevopsRoles ~(keystone)]# ovs-vsctl add-br br-eth1 

# add eth1 to the port of the bridge above
[root@DevopsRoles ~(keystone)]# ovs-vsctl add-port br-eth1 eth1 

[root@DevopsRoles ~(keystone)]# vi /etc/neutron/plugins/ml2/ml2_conf.ini

# The content as below
# line 181: add
flat_networks = physnet1

[root@DevopsRoles ~(keystone)]# vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
# The content as below
# line 194: add
bridge_mappings = physnet1:br-eth1

[root@DevopsRoles ~(keystone)]# systemctl restart neutron-openvswitch-agent

Creating a Virtual network.

[root@DevopsRoles ~(keystone)]# projectID=$(openstack project list | grep service | awk '{print $2}')
# create network named [sharednet1]
[root@DevopsRoles ~(keystone)]# openstack network create --project $projectID \
--share --provider-network-type flat --provider-physical-network physnet1 sharednet1 

# create subnet [] in [sharednet1]
[root@DevopsRoles ~(keystone)]# openstack subnet create subnet1 --network sharednet1 \
--project $projectID --subnet-range \
--allocation-pool start=,end= \
--gateway --dns-nameserver 

# confirm settings
[root@DevopsRoles ~(keystone)]# openstack network list 

[root@DevopsRoles ~(keystone)]# openstack subnet list 

You have configured OpenStack Networking. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.