1、创建数据库并授权
2、创建neutron用户
3、创建neutron服务实体
4、创建网路服务API端点
5、选择第二个自提供服务网络
5.1、yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables安装组件
5.2、vim /etc/neutron/neutron.conf修改配置文件
[database]
connection = mysql+pymysql://neutron:123456@控制端点IP地址/neutron
[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
[DEFAULT]
transport_url = rabbit://openstack:123456@控制端点IP地址
[DEFAULT]
auth_strategy = keystone
[keystone_authtoken]
auth_uri=http://控制端点IP地址:5000
auth_url=http://控制端点IP地址:35357
memcached_servers=控制端点IP地址:11211
auth_type=password
project_domain_name=default
user_domain_name=default
project_name=admin
username=neutron
password=123456
[DEFAULT]
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
[nova]
auth_url=http://控制端点IP地址:35357
auth_type=password
project_domain_name=default
user_domain_name=default
region_name=RegionOne
project_name=admin
username=nova
password=123456
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
查看后缀35357的网址是否能够进去
5.3、Vim /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
vni_ranges = 1:1000
[securitygroup]
enable_ipset = true
5.4、vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:ens33
[vxlan]
enable_vxlan = true
local_ip = 控制端点IP地址
l2_population = true
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
5.5、vim /etc/sysctl.conf添加如下配置信息
5.6、Vim /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = linuxbridge
5.7、vim /etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
6、Vim /etc/neutron/metadata_agent.ini
7、Vim /etc/nova/nova.conf
[neutron](需要删除下面配置信息的空格)
url = http://控制端点IP地址:9696
auth_url = http://控制端点IP地址:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = admin
username = neutron
password = 123456
service_metadata_proxy = true
metadata_proxy_shared_secret = 123456(这个123456需要和前面一布的密码一样)
8、完成安装
8.1、网络服务初始化脚本需要一个/etc/neutron/plugin.ini指向 ML2 插件配置文件的符号链接 /etc/neutron/plugins/ml2/ml2_conf.ini。
8.2、填充数据库
8.3、重启计算API服务
8.4、启动网络服务并将它们配置为在系统启动时启动。
9、计算节点配置
9.1、下载yum install openstack-neutron-linuxbridge ebtables ipset
查看database配置节下有没有开启的服务,有就关闭
9.2、vim /etc/neutron/neutron.conf修改
[DEFAULT]
transport_url = rabbit://openstack:123456@192.168.241.134
[DEFAULT]
auth_strategy = keystone
[keystone_authtoken]
auth_uri=http://计算节点IP地址:5000
auth_url=http://计算节点IP地址:35357
memcached_servers=计算节点IP地址:11211
auth_type=password
project_domain_name=default
user_domain_name=default
project_name=admin
username=neutron
password=123456
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
9.3、进入第二个网址修改内容,Networking Option 2: Self-service networks
9.3.1、vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:ens33
[vxlan]
enable_vxlan = true
local_ip = 计算节点IP地址
l2_population = true
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
启用网络桥接过滤器,表示已激活
9.4vim /etc/nova/nova.conf
[neutron]
url=http://计算节点IP地址:9696
auth_url=http://计算节点IP地址:35357
auth_type=password
project_domain_name=default
user_domain_name=default
region_name=RegionOne
project_name=admin
username=neutron
password=123456
10、重启计算服务
11、启动linux网桥代理并将其配置为系统启动时启动: