码迷,mamicode.com
首页 > 其他好文 > 详细

openvswitch+vxlan网络

时间:2018-04-12 20:55:45      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:openstack

规划网络

部署节点为一个controller节点,一个compute节点。controller节点有3个网卡,分别为eth0(管理和API网络,192.168.10.0/24)、eth1(租户网络,10.10.10.0/24)、eth2(外部网络,192.168.100.0/24,不设置IP);compute节点有2个网卡,分别为eth0(管理和API网络,192.168.10.0/24)、eth1(租户网络,10.10.10.0/24)。

创建虚拟网络

修改配置文件

controller节点

/etc/neutron/plugins/ml2/ml2conf.ini

[ml2]
type_drivers = flat,vxlan
tenant_network_types = vxlan
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security

[ml2_type_vxlan]
vni_ranges = 1001:2000

[securitygroup]
enable_ipset = true

/etc/neutron/l3agent.ini

[DEFAULT]
external_network_bridge = br-ex
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
/etc/neutron/dhcp_agent.ini

[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True

/etc/neutron/plugins/ml2/openvswitchagent.ini

[agent]
tunnel_types = vxlan
l2_population = True

[ovs]
bridge_mappings =
tunnel_bridge = br-tun
local_ip = 10.10.10.10

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = true

compute节点

/etc/neutron/plugins/ml2/openvswitchagent.ini

[agent]
tunnel_types = vxlan
l2_population = True

[ovs]
bridge_mappings =
tunnel_bridge = br-tun
local_ip = 10.10.10.11

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = true

提前准备ovs网桥

root@controller:~# ovs-vsctl add-br br-ex
root@controller:~# ovs-vsctl add-port br-ex eth2

配置文件修改后,需要重启网络相关服务。

controller节点启动了 neturon-metadata-agent、neutron-l3-agent、neutron-openvswitch-agent、neutron-dhcp-agent
compute节点启动了 neutron-openvswitch-agent

openvswitch+vxlan网络

标签:openstack

原文地址:http://blog.51cto.com/2168836/2097575

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!