Openstack O version Neutron Network Service
1. Create a neutron database
[root@localhost] # mysql-uroot-pdevops
Welcome to the MariaDB monitor. Commands end with; or\ g.
Your MariaDB connection id is 94
Server version: 10.1.20-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
MariaDB [(none)] > CREATE DATABASE neutron
MariaDB [(none)] > GRANT ALL PRIVILEGES ON neutron. To 'neutron'@'localhost' IDENTIFIED BY' devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON neutron. To 'neutron'@'%' IDENTIFIED BY' devops'
two。 Create neutron users and projects
[root@localhost ~] # source / root/admin-openrc
[root@localhost] # openstack user create-- domain default neutron-- password devops
[root@localhost] # openstack role add-- project service-- user neutron admin
[root@localhost] # openstack service create-- name neutron-- description "OpenStack Networking" network
[root@localhost ~] # openstack endpoint create-- region RegionOne network public http://controller:9696
[root@localhost ~] # openstack endpoint create-- region RegionOne network internal http://controller:9696
[root@localhost ~] # openstack endpoint create-- region RegionOne network admin http://controller:9696
3. Install neuton services and modify configuration files
[root@localhost ~] # yum-y install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
[root@controller ~] # cp / etc/neutron/neutron.conf / etc/neutron/neutron.conf.bak
[root@controller ~] # > / etc/neutron/neutron.conf
[root@controller ~] # cat / etc/neutron/neutron.conf
[DEFAULT]
Core_plugin = ml2
Service_plugins = router
Allow_overlapping_ips = True
Auth_strategy = keystone
Transport_url = rabbit://openstack:devops@controller
Notify_nova_on_port_status_changes = True
Notify_nova_on_port_data_changes = True
[keystone_authtoken]
Auth_uri = http://controller:5000
Auth_url = http://controller:35357
Memcached_servers = controller:11211
Auth_type = password
Project_domain_name = default
User_domain_name = default
Project_name = service
Username = nova
Password = devops
[database]
Connection = mysql+pymysql://neutron:devops@controller/neutron
[nova]
Auth_url = http://controller:35357
Auth_type = password
Project_domain_name = default
User_domain_name = default
Region_name = RegionOne
Project_name = service
Username = nova
Password = devops
[oslo_concurrency]
Lock_path = / var/lib/neutron/tmp
[root@controller ~] # cat / etc/neutron/plugins/ml2/ml2_conf.ini | grep-v "^ #" | grep-v "^ $"
[DEFAULT]
[ml2]
Type_drivers = flat,vlan,vxlan
Mechanism_drivers = linuxbridge,l2population
Extension_drivers = port_security
Tenant_network_types = vxlan
Path_mtu = 1500
[ml2_type_flat]
Flat_networks = provider
[ml2_type_geneve]
[ml2_type_gre]
[ml2_type_vlan]
[ml2_type_vxlan]
Vni_ranges = 1PUR 1000
[securitygroup]
Enable_ipset = True
[root@controller ~] # cat / etc/neutron/plugins/ml2/linuxbridge_agent.ini | grep-v "^ #" | grep-v "^ $"
[DEFAULT]
Debug = false
[agent]
Prevent_arp_spoofing = True
[linux_bridge]
Physical_interface_mappings = provider:ens33
[securitygroup]
Enable_security_group = True
Firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
[vxlan]
Enable_vxlan = True
Local_ip = 192.168.0.111
L2_population = True
[root@controller ~] # cat / etc/neutron/l3_agent.ini | grep-v "^ #" | grep-v "^ $"
[DEFAULT]
Interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
External_network_bridge =
Debug = false
[agent]
[ovs]
[root@controller ~] # cat / etc/neutron/dhcp_agent.ini | grep-v "^ #" | grep-v "^ $"
[DEFAULT]
Interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
Dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
Enable_isolated_metadata = True
Verbose = True
Debug = false
[agent]
[ovs]
Reconfigure / etc/nova/nova.conf, the purpose of this step is to enable compute nodes to use the neutron network
[neutron]
Url = http://controller:9696
Auth_url = http://controller:35357
Auth_type = password
Project_domain_name = default
User_domain_name = default
Region_name = RegionOne
Project_name = service
Username = neutron
Password = devops
Service_metadata_proxy = True
Metadata_proxy_shared_secret = devops
Write dhcp-option-force=26,1450 to / etc/neutron/dnsmasq-neutron.conf
# echo "dhcp-option-force=26,1450" > / etc/neutron/dnsmasq-neutron.conf
[root@controller ~] # cat / etc/neutron/metadata_agent.ini | grep-v "^ #" | grep-v "^ $"
[DEFAULT]
Nova_metadata_ip = controller
Metadata_proxy_shared_secret = devops
Metadata_workers = 4
Verbose = True
Debug = false
Nova_metadata_protocol = http
[agent]
[cache]
4. Create a connection and create a keystone user
[root@localhost] # ln-s / etc/neutron/plugins/ml2/ml2_conf.ini / etc/neutron/plugin.ini
5. Update the database
[root@localhost] # 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
[root@localhost ~] # systemctl restart openstack-nova-api.service
[root@controller ~] # systemctl status openstack-nova-api.service
6. Start the service
[root@localhost ~] # systemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
[root@localhost ~] # systemctl start neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
Start neutron-l3-agent.service and set boot up
# systemctl enable neutron-l3-agent.service
* * # systemctl restart neutron-l3-agent.service
# systemctl status neutron-l3-agent.service
[root@controller ~] # neutron ext-list
[root@localhost ~] # neutron agent-list
7. View registration information
[root@localhost ~] # openstack endpoint list
All the configuration files are in Baidu Cloud disk:
Link: https://pan.baidu.com/s/1CnmKkFMTemv199ctgb5Oig
Extraction code: 27om
After copying this content, open the Baidu network disk mobile phone App, which is more convenient to operate.