安装及配置计算节点的Neutron服务
将NAT网卡设置成混杂模式
ifconfig ens36 promisc
添加外网网卡为混杂模式开机自启
echo "ifconfig ens36 promisc" >> /etc/profile
加载桥接防火墙模块
echo "net.bridge.bridge-nf-call-iptables = 1" >> /etc/sysctl.conf
echo "net.bridge.bridge-nf-call-ip6tables = 1" >> /etc/sysctl.conf
modprobe br_netfilter
sysctl -p
安装Nova软件包
yum -y install openstack-neutron-linuxbridge
修改Neutron配置文件
基本操作
cp /etc/neutron/neutron.conf /etc/neutron/neutron.bak
grep -Ev '^$|#' /etc/neutron/neutron.bak > /etc/neutron/neutron.conf
编辑
vi /etc/neutron/neutron.conf
修改[DEFAULT]
[DEFAULT]
transport_url = rabbit://rabbitmq:000000@controller:5672
auth_strategy = keystone
修改[keystone_authtoken]
[keystone_authtoken]
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = project
username = neutron
password = 000000
修改[oslo_concurrency]
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
修改网桥代理
基本操作
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.bak
grep -Ev '^$|#' /etc/neutron/plugins/ml2/linuxbridge_agent.bak > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
编辑
vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
修改[DEFAULT]
[DEFAULT]
[linux_bridge]
physical_interface_mappings = provider:ens36
修改[vxlan]
[vxlan]
enable_vxlan = false
修改[securitygroup]
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
修改nova配置文件
vi /etc/nova/nova.conf
[DEFAULT]
vif_plugging_is_fatal = false
vif_plugging_timeout = 0
[neutron]
auth_url = http://controller:5000
auth_type = password
username = neutron
password = 000000
project_name = project
user_domain_name = default
project_domain_name = default
region_name = RegionOne
启动计算节点的Neutron服务
systemctl restart openstack-nova-compute.service
systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service