Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

OpenStack stein installation (7) neutron on controller

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The    OpenStack Network (neutron) allows you to create and attach interface devices managed by other OpenStack services to the network. Plug-ins can be implemented to accommodate different network devices and software, providing flexibility for OpenStack architecture and deployment.

   includes the following components:

Neutron-server

Accept the API request and route it to the appropriate OpenStack network plug-in to perform the operation. OpenStack Networking plug-ins and agents

Plug-in network port, create a network or subnet, and provide an IP address. The differences between these plug-ins and agents depend on the vendors and technologies used in a particular cloud. The OpenStack network comes with plug-ins and agents for Cisco virtual and physical switches, NEC OpenFlow products, Open vSwitch, Linux bridging, and VMware NSX products.

Common agents include L3 (layer 3), DHCP (dynamic host IP addressing), and plug-in agents.

Messaging queue

It is used by most OpenStack network installations to route information between neutron-server and various agents. It also acts as a database to store the network state of a specific plug-in.

Prerequisites

Before you configure the OpenStack Networking (neutron) service, you must create a database, service credentials, and API endpoints.

To create the database, complete these steps: ○ Use the database access client to connect to the database server as the root user:$ mysql-u root-p root123 ○ Create the neutron database:MariaDB [keystone] > CREATE DATABASE neutron; ○ Grant proper access to the neutron database, replacing NEUTRON_DBPASS with a suitable password:MariaDB [keystone] > GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY' neutron123';Source the admin credentials to gain access to admin-only CLI commands:$. Admin-openrc

To create the service credentials, complete these steps:

○ Create the neutron user:$ openstack user create-- domain default-- password-prompt neutronUser Password:neutron123Repeat User Password:neutron123+-+--+ | Field | Value | +- -+-+ | domain_id | default | | enabled | True | | id | fdb0f541e28141719b6a43c8944bf1fb | | name | neutron | | options | {} | | password_expires_at | None | +-+-- + ○ Add the admin role to the neutron | User:$ openstack role add-project service-user neutron admin Note: This command provides no output. ○ Create the neutron service entity:$ openstack service create-name neutron-description "OpenStack Networking" network+-+--+ | Field | Value | +- -+-+ | description | OpenStack Networking | | enabled | True | | id | f71529314dab4a4d8eca427e701d209e | | name | neutron | | type | network | | +-+-+ Create the Networking service API endpoints:#openstack endpoint create-- region RegionOne network public http://stack.flex.net:9696+--------------+---------------------------- | -+ | Field | Value | +-+-+ | enabled | True | | id | 85d80a6d02fc4b7683f611d7fc1493a3 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | f71529314dab4a4d8eca427e701d209e | | service_name | neutron | | service_type | network | | url | http://stack.flex.net:9696 | +-| +-+

# openstack endpoint create-- region RegionOne network internal http://stack.flex.net:9696

+-- +

| | Field | Value |

+-- +

| | enabled | True |

| | id | 09753b537ac74422a68d2d791cf3714f |

| | interface | internal |

| | region | RegionOne |

| | region_id | RegionOne |

| | service_id | f71529314dab4a4d8eca427e701d209e |

| | service_name | neutron |

| | service_type | network |

| | url | http://stack.flex.net:9696 |

+-- +

# openstack endpoint create-- region RegionOne network admin http://stack.flex.net:9696

+-- +

| | Field | Value |

+-- +

| | enabled | True |

| | id | 1ee14289c9374dffb5db92a5c112fc4e |

| | interface | admin |

| | region | RegionOne |

| | region_id | RegionOne |

| | service_id | f71529314dab4a4d8eca427e701d209e |

| | service_name | neutron |

| | service_type | network |

| | url | http://stack.flex.net:9696 |

+-- +

# Configure networking options

You can deploy network services using one of the two architectures represented by options 1 and 2.

Option 1 deploys the simplest architecture, which only supports attaching instances to the provider (external) network. There is no self-service (private) network, router, or floating IP address. Only administrators or other privileged users can manage the provider network.

Option 2 supports attaching instances to layer 3 services of the self-service network to enhance option 1. Demo or other unprivileged users can manage the self-service network, including routers that provide connectivity between the self-service network and the provider network. In addition, floating IP addresses provide a connection to the instance using a self-service network from an external network, such as Internet.

Self-service networks usually use overlay networks. Overlay network protocols such as vxlan include additional header information that increases overhead and reduces payload or space available for user data. Without knowing the virtual network infrastructure, the instance attempts to send a packet using the default 1500-byte Ethernet maximum transmission unit (MTU). The network service automatically provides the correct MTU value to the instance through DHCP. However, some cloud images do not use DHCP or ignore the DHCP MTU option and need to be configured using metadata or scripts.

Select one or both of the following networking options, see the following two chapters. And return here to continue the configuration.

○ Networking Option 1: Provider networks

○ Networking Option 2: Self-service networks

Configure the metadata agent

The metadata agent provides configuration information such as credentials to instances.

Edit the / etc/neutron/metadata_agent.ini file and complete the following actions:

○ In the [DEFAULT] section, configure the metadata host and shared secret: [DEFAULT] #... Nova_metadata_host = stack.flex.net metadata_proxy_shared_secret = 1234 Replace METADATA_SECRET with a suitable secret for the metadata proxy.Configure the Compute service to use the Networking service

Note: The Nova compute service must be installed to complete this step.

Edit the / etc/nova/nova.conf file and perform the following actions:

○ In the [neutron] section, configure access parameters, enable the metadata proxy, and configure the secret: [neutron] #... Url = http://stack.flex.net:9696 auth_url = http://stack.flex.net:5000 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = neutron123 service_metadata_proxy = true metadata_proxy_shared_secret = 1234Finalize installationThe Networking service initialization scripts expect a symbolic link / etc / neutron/plugin.ini pointing to the ML2 plug-in configuration file / etc/neutron/plugins/ml2/ml2_conf.ini. If this symbolic link does not exist, create it using the following command:# ln-s / etc/neutron/plugins/ml2/ml2_conf.ini / etc/neutron/plugin.iniPopulate the database:# su-s / bin/sh-c "neutron-db-manage-- config-file / etc/neutron/neutron.conf\-- config-file / etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron Note: because the script requires a complete server and plug-in configuration file The database population will be used for the network later. Restart the Compute API service:# systemctl restart openstack-nova-api.serviceStart the Networking services and configure them to start when the system boots.For both networking options: # systemctl enable neutron-server.service\ neutron-linuxbridge-agent.service neutron-dhcp-agent.service\ neutron-metadata-agent.service # systemctl start neutron-server.service\ neutron-linuxbridge-agent.service neutron-dhcp-agent.service\ neutron-metadata-agent.serviceFor networking option 2 Also enable and start the layer-3 service: # systemctl enable neutron-l3-agent.service # systemctl start neutron-l3-agent.service

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report