CentOS7 minimal openstack pike neutron openvswitch(ovs) Self-service networks 租户网络搭建教程

注:controller 节点ip192.168.0.200
compute1 节点 ip192.168.0.203

  • 下载和配置(controller 节点)
  1. 下载
    yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch ebtables
  2. 配置
    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
  1. 配置
    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
  1. 配置
    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
  1. 配置
    vi /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
  1. 配置
    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
  1. 启动

systemctl enable neutron-openvswitch-agent.service neutron-l3-agent.service
systemctl start neutron-openvswitch-agent.service neutron-l3-agent.service

  • 下载和配置(compute1节点)
  1. 下载
    yum install -y openstack-neutron-openvswitch
  2. 配置
    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
  1. 启动

systemctl enable neutron-openvswitch-agent.service
systemctl start neutron-openvswitch-agent.service

  • 验证
  1. 登录 . admin-openrc
  2. 查看列表:openstack network agent list
    image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容