本文是配置文档,非说明文档,只讲配置,不讲原理。
controller节点:
网卡信息:ens160 外网网卡 ; ens192 数据网卡
/etc/neutron/plugins/ml2/ml2_conf.ini配置
/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
直接配置成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 管理网卡
/etc/neutron/plugins/ml2/ml2_conf.ini
/etc/neutron/plugins/ml2/openvswitch_agent.ini
计算节点同样要创建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 = <None> [securitygroup] enable_security_group = False enable_ipset = True firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/194312.html