CentOS 7
Sponsored Link

OpenStack Train : Configure Networking2019/10/25

 
Configure Networking for Virtual Machine Instances.
Configure basic settings first for Neutron Services like All in One Settings like here.
For example, configure FLAT type of networking on here.
The Node has 2 network interfaces like follows.
        eth0|10.0.0.30 
+-----------+-----------+
|    [ Control Node ]   |
|                       |
|  MariaDB    RabbitMQ  |
|  Memcached  httpd     |
|  Keystone   Glance    |
|   Nova API,Compute    |
|    Neutron Server     |
|  L2,L3,Metadata Agent |
+-----------+-----------+
        eth1|(UP with no IP)

[1] Configure Neutron services.
# add bridge

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

# add eth1 to the port of the bridge above

[root@dlp ~(keystone)]#
ovs-vsctl add-port br-eth1 eth1

[root@dlp ~(keystone)]#
vi /etc/neutron/plugins/ml2/ml2_conf.ini
# add to the end

[ml2_type_flat]
flat_networks = physnet1
[root@dlp ~(keystone)]#
vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
# add to the end

[ovs]
bridge_mappings = physnet1:br-eth1
[root@dlp ~(keystone)]#
systemctl restart neutron-openvswitch-agent

[2] Create virtual network.
[root@dlp ~(keystone)]#
projectID=$(openstack project list | grep service | awk '{print $2}')
# create network named [sharednet1]

[root@dlp ~(keystone)]#
openstack network create --project $projectID \
--share --provider-network-type flat --provider-physical-network physnet1 sharednet1

+---------------------------+---------------------------------------------------------------------+
| Field                     | Value                                                               |
+---------------------------+---------------------------------------------------------------------+
| admin_state_up            | UP                                                                  |
| availability_zone_hints   |                                                                     |
| availability_zones        |                                                                     |
| created_at                | 2019-10-25T05:16:03Z                                                |
| description               |                                                                     |
| dns_domain                | None                                                                |
| id                        | 7ee2f2bc-b93c-4c09-8d7e-ea8b3f0a1d9d                                |
| ipv4_address_scope        | None                                                                |
| ipv6_address_scope        | None                                                                |
| is_default                | False                                                               |
| is_vlan_transparent       | None                                                                |
| location                  | cloud='', project.domain_id=, project.domain_name=, project.id='2...|
| mtu                       | 1500                                                                |
| name                      | sharednet1                                                          |
| port_security_enabled     | True                                                                |
| project_id                | 2b9c4eda462e40a4a3d03b0a38f12bf1                                    |
| provider:network_type     | flat                                                                |
| provider:physical_network | physnet1                                                            |
| provider:segmentation_id  | None                                                                |
| qos_policy_id             | None                                                                |
| revision_number           | 1                                                                   |
| router:external           | Internal                                                            |
| segments                  | None                                                                |
| shared                    | True                                                                |
| status                    | ACTIVE                                                              |
| subnets                   |                                                                     |
| tags                      |                                                                     |
| updated_at                | 2019-10-25T05:16:03Z                                                |
+---------------------------+---------------------------------------------------------------------+

# create subnet [10.0.0.0/24] in [sharednet1]

[root@dlp ~(keystone)]#
openstack subnet create subnet1 --network sharednet1 \
--project $projectID --subnet-range 10.0.0.0/24 \
--allocation-pool start=10.0.0.200,end=10.0.0.254 \
--gateway 10.0.0.1 --dns-nameserver 10.0.0.10

+-------------------+-----------------------------------------------------------------------------+
| Field             | Value                                                                       |
+-------------------+-----------------------------------------------------------------------------+
| allocation_pools  | 10.0.0.200-10.0.0.254                                                       |
| cidr              | 10.0.0.0/24                                                                 |
| created_at        | 2019-10-25T05:16:56Z                                                        |
| description       |                                                                             |
| dns_nameservers   | 10.0.0.10                                                                   |
| enable_dhcp       | True                                                                        |
| gateway_ip        | 10.0.0.1                                                                    |
| host_routes       |                                                                             |
| id                | dc8ecae8-5536-4fe4-a4ed-52af28bbae34                                        |
| ip_version        | 4                                                                           |
| ipv6_address_mode | None                                                                        |
| ipv6_ra_mode      | None                                                                        |
| location          | cloud='', project.domain_id=, project.domain_name=, project.id='2b9c4eda4...|
| name              | subnet1                                                                     |
| network_id        | 7ee2f2bc-b93c-4c09-8d7e-ea8b3f0a1d9d                                        |
| prefix_length     | None                                                                        |
| project_id        | 2b9c4eda462e40a4a3d03b0a38f12bf1                                            |
| revision_number   | 0                                                                           |
| segment_id        | None                                                                        |
| service_types     |                                                                             |
| subnetpool_id     | None                                                                        |
| tags              |                                                                             |
| updated_at        | 2019-10-25T05:16:56Z                                                        |
+-------------------+-----------------------------------------------------------------------------+

# confirm settings

[root@dlp ~(keystone)]#
openstack network list

+--------------------------------------+------------+--------------------------------------+
| ID                                   | Name       | Subnets                              |
+--------------------------------------+------------+--------------------------------------+
| 7ee2f2bc-b93c-4c09-8d7e-ea8b3f0a1d9d | sharednet1 | dc8ecae8-5536-4fe4-a4ed-52af28bbae34 |
+--------------------------------------+------------+--------------------------------------+

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

+--------------------------------------+---------+--------------------------------------+-------------+
| ID                                   | Name    | Network                              | Subnet      |
+--------------------------------------+---------+--------------------------------------+-------------+
| dc8ecae8-5536-4fe4-a4ed-52af28bbae34 | subnet1 | 7ee2f2bc-b93c-4c09-8d7e-ea8b3f0a1d9d | 10.0.0.0/24 |
+--------------------------------------+---------+--------------------------------------+-------------+
Matched Content