# 安装程序包
yum -y install openstack-neutron-linuxbridge ebtables ipset
# 变更配置文件
mv /etc/neutron/neutron.confneutron /etc/neutron/neutron.conf.org
cat > /etc/neutron/neutron.conf << EOF
[DEFAULT]
transport_url = rabbit://openstack:Abc@123@controller
auth_strategy = keystone
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project _name = service
username = neutron
password = Abc@123
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
EOF
chmod 640 /etc/neutron/neutron.conf
chown root:neutron /etc/neutron/neutron.conf
mv /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.org
cat > /etc/neutron/plugins/ml2/linuxbridge_agent.ini <<EOF
[DEFAULT]
[linux_bridge]
physical_interface_mappings = provider:eth1
[vxlan]
enable_vxlan = false
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
EOF
chmod 640 /etc/neutron/plugins/ml2/linuxbridge_agent.ini
chown root:neutron /etc/neutron/plugins/ml2/linuxbridge_agent.ini
/etc/nova/nova.conf
未尾部分增加
[neutron]
url = http://controller:9696
auth_url = http://controller:5000/v3
auth_type = password
project_domain_name = default
user_domain_name = default
project _name = service
region_name = RegionOne
username = neutron
password = Abc@123
service_metadata_proxy = True
metadata_proxy_shared_secret = Abc@123
# 开启服务
systemctl restart openstack-nova-compute && systemctl enable openstack-nova-compute
systemctl restart neutron-linuxbridge-agent && systemctl enable neutron-linuxbridge-agent
```bash # 验证 在controller上执行 source ~/.openstack_admin openstack network agent list ```