Ubuntu 16.04
Sponsored Link

OpenStack Pike : Configure Networking
2017/09/01
 
Configure Networking for Virtual Machine Instances.
Configure basic settings first for Neutron Services like All in One Settings or Neutron Nodes like here.
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     |eth1
          |  Keystone   Glance    +------
          |   Nova API,Compute    |
          |    Neutron Server     |
          |  L2,L3,Metadata Agent |
          +-----------------------+

[1] Configure Neutron services.
root@dlp ~(keystone)#
vi /etc/neutron/plugins/ml2/ml2_conf.ini
# line 166: add

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

[linux_bridge]
physical_interface_mappings = physnet1:eth1
# line 176: 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                | 2017-09-01T05:12:36Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 8da7f4bc-0bd2-4e9f-bf65-c667c587eff4 |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | False                                |
| mtu                       | 1500                                 |
| name                      | sharednet1                           |
| port_security_enabled     | True                                 |
| project_id                | 721d4a288cde4d3cb80e43d4b016d5bc     |
| provider:network_type     | flat                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  | None                                 |
| qos_policy_id             | None                                 |
| revision_number           | 3                                    |
| router:external           | Internal                             |
| segments                  | None                                 |
| shared                    | True                                 |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| updated_at                | 2017-09-01T05:12:36Z                 |
+---------------------------+--------------------------------------+

# 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        | 2017-09-01T05:13:03Z                 |
| description       |                                      |
| dns_nameservers   | 10.0.0.10                            |
| enable_dhcp       | True                                 |
| gateway_ip        | 10.0.0.1                             |
| host_routes       |                                      |
| id                | ed6be86e-2fec-498d-a250-b7243bd5ab69 |
| ip_version        | 4                                    |
| ipv6_address_mode | None                                 |
| ipv6_ra_mode      | None                                 |
| name              | subnet1                              |
| network_id        | 8da7f4bc-0bd2-4e9f-bf65-c667c587eff4 |
| project_id        | 721d4a288cde4d3cb80e43d4b016d5bc     |
| revision_number   | 2                                    |
| segment_id        | None                                 |
| service_types     |                                      |
| subnetpool_id     | None                                 |
| updated_at        | 2017-09-01T05:13:03Z                 |
+-------------------+--------------------------------------+

# confirm settings

root@dlp ~(keystone)#
openstack network list

+--------------------------------+------------+--------------------------------+
| ID                             | Name       | Subnets                        |
+--------------------------------+------------+--------------------------------+
| 8da7f4bc-0bd2-4e9f-            | sharednet1 | ed6be86e-2fec-                 |
| bf65-c667c587eff4              |            | 498d-a250-b7243bd5ab69         |
+--------------------------------+------------+--------------------------------+

root@dlp ~(keystone)#
openstack subnet list

+--------------------------+---------+---------------------------+-------------+
| ID                       | Name    | Network                   | Subnet      |
+--------------------------+---------+---------------------------+-------------+
| ed6be86e-2fec-           | subnet1 | 8da7f4bc-0bd2-4e9f-       | 10.0.0.0/24 |
| 498d-a250-b7243bd5ab69   |         | bf65-c667c587eff4         |             |
+--------------------------+---------+---------------------------+-------------+
Matched Content
 
Tweet