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

安装配置openstack 中的 Open vSwitch (OVS) service

时间:2015-07-16 20:10:09      阅读:857      评论:0      收藏:0      [点我收藏+]

标签:ovs

?          # yum install openstack-neutronopenstack-neutron-ml2 openstack-neutron- openvswitch


Edit the/etc/neutron/plugins/ml2/ml2_conf.ini file and complete the fol-lowing actions:

a. In the [ml2] section,enable the flat and generic routingencapsulation (GRE) net-work 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 con-figure 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 exter-nalbridge br-ex handles external instance network traffic within OVS. The externalbridge requires a port on the physical external network interface to provideinstances with exter-nal 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 openv

2.  Add theexternal bridge:

# ovs-vsctl add-br br-ex

3.  Add a port to the externalbridge that connects to the physical external network inter-face:

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 itus-ing 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




版权声明:本文为博主原创文章,未经博主允许不得转载。

安装配置openstack 中的 Open vSwitch (OVS) service

标签:ovs

原文地址:http://blog.csdn.net/qq_21398167/article/details/46913271

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