Ubuntu 18.04
Sponsored Link

OpenStack Rocky : Configure Neutron Network2018/09/17

 
Configure Networking for Virtual Machine Instances.
For example, configure FLAT type of provider 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.
# create a setting file for anonymous interface

# because on Netplan yaml file, anonymous interface never up

# replace the name [eth1] to your environment

root@dlp ~(keystone)#
vi /etc/systemd/network/eth1.network
[Match]
Name=eth1

[Network]
LinkLocalAddressing=no
IPv6AcceptRA=no

root@dlp ~(keystone)#
systemctl restart systemd-networkd

root@dlp ~(keystone)#
vi /etc/neutron/plugins/ml2/ml2_conf.ini
# line 181: add

[ml2_type_flat]
flat_networks = physnet1
root@dlp ~(keystone)#
vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
# line 147: add

[linux_bridge]
physical_interface_mappings = physnet1:eth1
# line 208: uncomment and change

enable_vxlan =
false
root@dlp ~(keystone)#
systemctl restart neutron-linuxbridge-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                | 2018-09-12T01:31:12Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 7c3d229f-7cfb-4451-af6b-b77f9b2ad1e1 |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | False                                |
| is_vlan_transparent       | None                                 |
| mtu                       | 1500                                 |
| name                      | sharednet1                           |
| port_security_enabled     | True                                 |
| project_id                | aaeee626080841a491235fb06e77f10c     |
| provider:network_type     | flat                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  | None                                 |
| qos_policy_id             | None                                 |
| revision_number           | 0                                    |
| router:external           | Internal                             |
| segments                  | None                                 |
| shared                    | True                                 |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| updated_at                | 2018-09-12T01:31:12Z                 |
+---------------------------+--------------------------------------+

# 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        | 2018-09-12T01:31:38Z                 |
| description       |                                      |
| dns_nameservers   | 10.0.0.10                            |
| enable_dhcp       | True                                 |
| gateway_ip        | 10.0.0.1                             |
| host_routes       |                                      |
| id                | c3f4a8f5-b8fa-4b6e-8286-fcf4428ec477 |
| ip_version        | 4                                    |
| ipv6_address_mode | None                                 |
| ipv6_ra_mode      | None                                 |
| name              | subnet1                              |
| network_id        | 7c3d229f-7cfb-4451-af6b-b77f9b2ad1e1 |
| project_id        | aaeee626080841a491235fb06e77f10c     |
| revision_number   | 0                                    |
| segment_id        | None                                 |
| service_types     |                                      |
| subnetpool_id     | None                                 |
| tags              |                                      |
| updated_at        | 2018-09-12T01:31:38Z                 |
+-------------------+--------------------------------------+

# confirm settings

root@dlp ~(keystone)#
openstack network list

+--------------------------------------+------------+--------------------------------------+
| ID                                   | Name       | Subnets                              |
+--------------------------------------+------------+--------------------------------------+
| 7c3d229f-7cfb-4451-af6b-b77f9b2ad1e1 | sharednet1 | c3f4a8f5-b8fa-4b6e-8286-fcf4428ec477 |
+--------------------------------------+------------+--------------------------------------+

root@dlp ~(keystone)#
openstack subnet list

+--------------------------------------+---------+--------------------------------------+-------------+
| ID                                   | Name    | Network                              | Subnet      |
+--------------------------------------+---------+--------------------------------------+-------------+
| c3f4a8f5-b8fa-4b6e-8286-fcf4428ec477 | subnet1 | 7c3d229f-7cfb-4451-af6b-b77f9b2ad1e1 | 10.0.0.0/24 |
+--------------------------------------+---------+--------------------------------------+-------------+
Matched Content