感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正!
如果转载,请保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167
原博客地址:http://blog.csdn.net/qq_21398167/article/details/46913271
• # yum install openstack-neutronopenstack-neutron-ml2 openstack-neutron- openvswitch
Edit the/etc/neutron/plugins/ml2/ml2_conf.ini file and complete the following actions:
a. In the [ml2] section,enable the flat and generic routingencapsulation (GRE) network type drivers, GRE tenant networks, and theOVS mechanism driver:
[ml2]
type_drivers = flat,gre tenant_network_types = gre mechanism_drivers= openvswitch
b. In the[ml2_type_flatj section, configure the external network:
[ml2_type_flat]
flatnetworks = external
c. In the [ml2_type_grej section,configure the tunnel identifier (id) range:
[ml2_type_gre] tunnel_id_ranges = 1:1000
d. In the [securitygroup] section,enable security groups, enable ipset, and configure theOVS iptables firewall driver:
[securitygroupj
enable_security_group = True enable_ipset = True
firewall_driver= neutron.agent.linux.iptables_firewall. OVSHybridIptablesFirewallDriver
e. In the [ovs] section, configurethe Open vSwitch (OVS) agent:
[ovs]
local_ip = INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS tunnel_type = greenable_tunneling = True bridge_mappings = external:br-ex
ReplaceINSTANCE—TUNNELS—INTERFACE—IP—ADDRESS with the IP address of the instancetunnels network interface on your network node.
To configure the OpenvSwitch (OVS) service
The OVS service provides theunderlying virtual networking framework for instances. The integration bridgebr-int handles internal instance network traffic within OVS. The externalbridge br-ex handles external instance network traffic within OVS. The externalbridge requires a port on the physical external network interface to provideinstances with external network access. In essence, this port connects thevirtual and physical external networks in your environment.
1. Start the OVS service and configure it to startwhen the system boots:
# systemctl enable openvswitch.service
# systemctlstart openv2. Add theexternal bridge:
# ovs-vsctl add-br br-ex
3. Add a port to the externalbridge that connects to the physical external network interface:
Replace interf^ce_name with the actual interface name. For example, eth2or ens256.
# ovs-vsctl add-port br-ex INTERFACE_NAME
Note
Depending on your networkinterface driver, you may need to disable generic receiveoffload (GRO) to achieve suitable throughput between your instances and theexternal network.
To temporarily disable GRO onthe external network interface while testing your environment:
# ethtool-K INTERFACE_NAME gro off
alize theinstallationTo finalize the installation
1. The Networking serviceinitialization scripts expect a symbolic link /etc/neu- tron/plugin.inipointing to the ML2 plug-in configuration file, /etc/neu-tron/plugins/ml2/ml2_conf.ini. If this symbolic link does not exist, create itusing the following command:
# ln -s/etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
Due to a packaging bug, the Open vSwitch agent initialization scriptexplicitly looks for the Open vSwitch plug-in configuration file rather than asymbolic link /etc/neu- tron/plugin.ini pointing to the ML2 plug-inconfiguration file. Run the following commands to resolve this issue:
# cp/usr/lib/systemd/system/neutron-openvswitch-agent.service \/usr/lib/systemd/system/neutron-openvswitch-agent.service.orig
# sed -i,s,plugins/openvswitch/ovs_neutron_plugin.ini,plugin.ini/g,\ /usr/lib/systemd/system/neutron-openvswitch-agent.service
2. Start theNetworking services and configure them to start when the system boots:
# systemctlenable neutron-openvswitch-agent.service neutron-l3-agent. service \
neutron-dhcp-agent.serviceneutron-metadata-agent.service \ neutron-ovs-cleanup.service
# systemctlstart neutron-openvswitch-agent.service neutron-l3-agent. service \
neutron-dhcp-agent.serviceneutron-metadata-agent.service