注:controller
节点ip
是192.168.0.200
compute1
节点 ip
是192.168.0.203
- 下载和配置(
controller
节点)
- 下载
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch ebtables
- 配置
vi /etc/neutron/neutron.conf
[database] ... connection = mysql+pymysql://neutron:123456@controller/neutron [DEFAULT] ... core_plugin = ml2 service_plugins = router allow_overlapping_ips = true transport_url = rabbit://openstack:123456@controller auth_strategy = keystone 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 = neutron password = 123456 [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 = 123456 [oslo_concurrency] ... lock_path = /var/lib/neutron/tmp
- 配置
vi /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2] type_drivers = flat,vlan,vxlan mechanism_drivers = openvswitch,l2population extension_drivers = port_security tenant_network_types = vxlan [ml2_type_flat] flat_networks = provider [ml2_type_vxlan] vni_ranges = 1:1000 [securitygroup] enable_ipset = True
- 配置
vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs] tunnel_bridge = br-tun local_ip = 192.168.0.200 integration_bridge = br-int enable_tunneling = True [agent] tunnel_types = vxlan l2_population = True [securitygroup] firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver enable_security_group = True
- 配置
vi /etc/neutron/l3_agent.ini
[DEFAULT] interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
- 配置
vi /etc/neutron/dhcp_agent.ini
[DEFAULT] interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = True
- 启动
systemctl enable neutron-openvswitch-agent.service neutron-l3-agent.service
systemctl start neutron-openvswitch-agent.service neutron-l3-agent.service
- 下载和配置(
compute1
节点)
- 下载
yum install -y openstack-neutron-openvswitch
- 配置
vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs] tunnel_bridge = br-tun local_ip = 192.168.0.203 integration_bridge = br-int enable_tunneling = True [agent] tunnel_types = vxlan l2_population = True [securitygroup] firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver enable_security_group = True
- 启动
systemctl enable neutron-openvswitch-agent.service
systemctl start neutron-openvswitch-agent.service
- 验证
- 登录
. admin-openrc
- 查看列表:
openstack network agent list