openstack ovs实现vlan组网

本文是配置文档,非说明文档,只讲配置,不讲原理。

controller节点:

网卡信息:ens160 外网网卡 ; ens192 数据网卡

openstack ovs实现vlan组网_第1张图片

/etc/neutron/plugins/ml2/ml2_conf.ini配置

openstack ovs实现vlan组网_第2张图片

 

/etc/neutron/plugins/ml2/ml2_conf.ini的所有配置项

[DEFAULT]
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vlan
mechanism_drivers = openvswitch
[ml2_type_flat]
flat_networks = provider
[ml2_type_geneve]
[ml2_type_gre]
[ml2_type_vlan]
network_vlan_ranges = default:3001:4000
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
enable_ipset = true
enable_security_group = False
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

 

 

 /etc/neutron/plugins/ml2/openvswitch_agent.ini 

下图是从vxlan模式修改过来的配置。注意enable_tunneling=false

openstack ovs实现vlan组网_第3张图片

 

直接配置成vlan模式

 

/etc/neutron/plugins/ml2/openvswitch_agent.ini 

[DEFAULT]
[agent]
tunnel_types = vxlan
vxlan_udp_port = 4789
l2_population = False
prevent_arp_spoofing = False
arp_responder = False
[ovs]
bridge_mappings = external:br-ex,default:br-eth1
local_ip = 10.0.10.150
tunnel_bridge = br-tun
integration_bridge = br-int
tunnel_id_ranges = 1:1000
tenant_network_type = vxlan
enable_tunneling = false
tunnel_types = vxlan
[securitygroup]
enable_security_group = False
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
[xenapi]

 

 

修改好所有的配置后创建网桥,重启服务。原理见vxlan分析。

ovs-vsctl add-br br-eth1

ovs-vsctl add-port br-eth1 ens192

service neutron-openvswitch-agent restart

 

compute节点:

网卡信息:ens160 外网网卡;ens192 管理网卡

openstack ovs实现vlan组网_第4张图片

 

/etc/neutron/plugins/ml2/ml2_conf.ini

 

/etc/neutron/plugins/ml2/openvswitch_agent.ini 

openstack ovs实现vlan组网_第5张图片

 

计算节点同样要创建br-eth1网桥

ovs-vsctl add-br br-eth1 

ovs-vsctl add-port br-eth1 ens192

service neutron-openvswitch-agent restart

 

 

 

/etc/neutron/plugins/ml2/openvswitch_agent.ini 
openvswitch
[DEFAULT]
[agent]
tunnel_types = vxlan
l2_population = False
prevent_arp_spoofing = False
arp_responder = False
vxlan_udp_port = 4789
[ovs]
bridge_mappings = default:br-eth1
local_ip = 10.0.10.151
tunnel_type = vlan
tunnel_bridge = br-tun
integration_bridge = br-int
tunnel_id_ranges = 1:1000
tenant_network_type = vxlan
enable_tunneling = false
[securitygroup]
enable_ipset = True
enable_security_group = False
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
[xenapi]
/etc/neutron/plugins/ml2/ml2_conf.ini
[DEFAULT]
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vlan
mechanism_drivers = openvswitch
[ml2_type_flat]
[ml2_type_geneve]
[ml2_type_gre]
[ml2_type_vlan]
network_vlan_ranges = default:3001:4000
[ml2_type_vxlan]
vni_ranges = 1:1000
vxlan_group = 
[securitygroup]
enable_security_group = False
enable_ipset = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

 

转载于:https://www.cnblogs.com/goldsunshine/p/9274543.html

你可能感兴趣的:(openstack ovs实现vlan组网)