openstack ovs实现vlan组网

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

controller节点:

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

openstack ovs实现vlan组网

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

openstack ovs实现vlan组网

openstack ovs实现vlan组网

openstack ovs实现vlan组网

openstack ovs实现vlan组网

/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::
[ml2_type_vxlan]
vni_ranges = :
[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组网

直接配置成vlan模式

openstack ovs实现vlan组网

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

[DEFAULT]
[agent]
tunnel_types = vxlan
vxlan_udp_port =
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 = :
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组网

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

openstack ovs实现vlan组网

openstack ovs实现vlan组网

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

openstack ovs实现vlan组网

openstack ovs实现vlan组网

计算节点同样要创建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 =
[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 = :
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::
[ml2_type_vxlan]
vni_ranges = :
vxlan_group = <None>
[securitygroup]
enable_security_group = False
enable_ipset = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
上一篇:MYSQL 慢日志


下一篇:centos7 修改密码