Ubuntu 22.04
Sponsored Link

OpenStack Antelope : Neutron नेटवर्क कॉन्फ़िगर करें2023/09/08

 
वर्चुअल मशीन इंस्टेंस के लिए नेटवर्किंग कॉन्फ़िगर करें।
उदाहरण के लिए, यहां FLAT प्रकार की नेटवर्किंग कॉन्फ़िगर करें।
नोड में निम्नानुसार 2 नेटवर्क इंटरफ़ेस हैं।
        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] Neutron सेवाएँ कॉन्फ़िगर करें।
# अनाम इंटरफ़ेस के लिए एक सेटिंग फ़ाइल बनाएँ
# अपने परिवेश में नाम [eth1] बदलें

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

# ब्रिज जोड़ें ([br-eth1] के लिए कोई भी नाम जो आपको पसंद हो)

root@dlp ~(keystone)#
ovs-vsctl add-br br-eth1
# पुल पर एक बंदरगाह जोड़ें
# replace [eth1] to your own environment

root@dlp ~(keystone)#
ovs-vsctl add-port br-eth1 eth1
# पुल के लिए [physnet1] का नक्शा बनाएं ([physnet1] के लिए कोई भी नाम जो आपको पसंद हो)

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

[2] वर्चुअल नेटवर्क बनाएं।
root@dlp ~(keystone)#
projectID=$(openstack project list | grep service | awk '{print $2}')
# [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                | 2023-03-23T04:37:53Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 94911606-a533-43d4-b8c9-8ce984fa51a8 |
| 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                | d3dd87fb1a034f7883539a6a4f83781f     |
| 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                 | d3dd87fb1a034f7883539a6a4f83781f     |
| updated_at                | 2023-03-23T04:37:53Z                 |
+---------------------------+--------------------------------------+

# [sharednet1] में सबनेट [10.0.0.0/24] बनाएं

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           | 2023-03-23T04:39:11Z                 |
| description          |                                      |
| dns_nameservers      | 10.0.0.10                            |
| dns_publish_fixed_ip | None                                 |
| enable_dhcp          | True                                 |
| gateway_ip           | 10.0.0.1                             |
| host_routes          |                                      |
| id                   | 5f4b2faa-b3e9-44f8-a13f-61de26724123 |
| ip_version           | 4                                    |
| ipv6_address_mode    | None                                 |
| ipv6_ra_mode         | None                                 |
| name                 | subnet1                              |
| network_id           | 94911606-a533-43d4-b8c9-8ce984fa51a8 |
| project_id           | d3dd87fb1a034f7883539a6a4f83781f     |
| revision_number      | 0                                    |
| segment_id           | None                                 |
| service_types        |                                      |
| subnetpool_id        | None                                 |
| tags                 |                                      |
| updated_at           | 2023-03-23T04:39:11Z                 |
+----------------------+--------------------------------------+

# सेटिंग्स की पुष्टि करें

root@dlp ~(keystone)#
openstack network list

+--------------------------------------+------------+--------------------------------------+
| ID                                   | Name       | Subnets                              |
+--------------------------------------+------------+--------------------------------------+
| 94911606-a533-43d4-b8c9-8ce984fa51a8 | sharednet1 | 5f4b2faa-b3e9-44f8-a13f-61de26724123 |
+--------------------------------------+------------+--------------------------------------+

root@dlp ~(keystone)#
openstack subnet list

+--------------------------------------+---------+--------------------------------------+-------------+
| ID                                   | Name    | Network                              | Subnet      |
+--------------------------------------+---------+--------------------------------------+-------------+
| 5f4b2faa-b3e9-44f8-a13f-61de26724123 | subnet1 | 94911606-a533-43d4-b8c9-8ce984fa51a8 | 10.0.0.0/24 |
+--------------------------------------+---------+--------------------------------------+-------------+
मिलान सामग्री