Ubuntu 22.04
Sponsored Link

OpenStack Caracal : Configure Neutron Network2024/04/05

 
Configure Networking for Virtual Machine Instances.
For example, configure FLAT type of networking on here.
The Node has 2 network interfaces like follows.
        eth0|10.0.0.30 
+-----------+-----------+
|   [ dlp.srv.world ]   |
|     (Control Node)    |
|                       |
|  MariaDB    RabbitMQ  |
|  Memcached  Nginx     |
|  Keystone   httpd     |
|  Glance     Nova API  |
|  Nova Compute         |
|    Neutron Server     |
|    Open vSwitch       |
|  OVN Metadata Agent   |
|    OVN-Controller     |
+-----------+-----------+
        eth1|(UP with no IP)

[1] Configure Neutron services.
# create a setting file for anonymous interface
# 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)#
ip link set eth1 up

# add bridge (any name you like for [br-eth1])

root@dlp ~(keystone)#
ovs-vsctl add-br br-eth1
# add a port to the bridge
# replace [eth1] to your own environment

root@dlp ~(keystone)#
ovs-vsctl add-port br-eth1 eth1
# map [physnet1] to the bridge (any name you like for [physnet1])

root@dlp ~(keystone)#
ovs-vsctl set open . external-ids:ovn-bridge-mappings=physnet1:br-eth1

[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                | 2024-04-05T04:11:04Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 1fdae2b1-50f1-40ae-b362-41a42a79933c |
| 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                | 6e67adf880a244b8818ec2aa1a36e747     |
| 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                      |                                      |
| tenant_id                 | 6e67adf880a244b8818ec2aa1a36e747     |
| updated_at                | 2024-04-05T04:11:04Z                 |
+---------------------------+--------------------------------------+

# 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           | 2024-04-05T04:11:31Z                 |
| description          |                                      |
| dns_nameservers      | 10.0.0.10                            |
| dns_publish_fixed_ip | None                                 |
| enable_dhcp          | True                                 |
| gateway_ip           | 10.0.0.1                             |
| host_routes          |                                      |
| id                   | 798fa9eb-e997-45b3-9701-3e13d12b301a |
| ip_version           | 4                                    |
| ipv6_address_mode    | None                                 |
| ipv6_ra_mode         | None                                 |
| name                 | subnet1                              |
| network_id           | 1fdae2b1-50f1-40ae-b362-41a42a79933c |
| project_id           | 6e67adf880a244b8818ec2aa1a36e747     |
| revision_number      | 0                                    |
| segment_id           | None                                 |
| service_types        |                                      |
| subnetpool_id        | None                                 |
| tags                 |                                      |
| updated_at           | 2024-04-05T04:11:31Z                 |
+----------------------+--------------------------------------+

# confirm settings

root@dlp ~(keystone)#
openstack network list

+--------------------------------+------------+--------------------------------+
| ID                             | Name       | Subnets                        |
+--------------------------------+------------+--------------------------------+
| 1fdae2b1-50f1-40ae-b362-       | sharednet1 | 798fa9eb-e997-45b3-9701-       |
| 41a42a79933c                   |            | 3e13d12b301a                   |
+--------------------------------+------------+--------------------------------+

root@dlp ~(keystone)#
openstack subnet list

+--------------------------+---------+---------------------------+-------------+
| ID                       | Name    | Network                   | Subnet      |
+--------------------------+---------+---------------------------+-------------+
| 798fa9eb-e997-45b3-9701- | subnet1 | 1fdae2b1-50f1-40ae-b362-  | 10.0.0.0/24 |
| 3e13d12b301a             |         | 41a42a79933c              |             |
+--------------------------+---------+---------------------------+-------------+
Matched Content