ML2插件的Macvtap mechanism驱动程序通常会提高实例的网络性能。 考虑此mechanism驱动程序的以下属性以确定在你的环境中的实用性: 仅支持实例端口。用于DHCP和第3层(路由)服务的端口必须使用其它的mechanism驱动程序,如Linux网桥或Open vSwitch(OVS)。 仅支持无标签(flat)和标签(VLAN)网络。 缺乏对安全组的支持,包括基本(正常)规则和反欺骗规则。 缺乏对第3层高可用性机制的支持,例如虚拟路由器冗余协议(Virtual Router Redundancy Protocol - VRRP)和分布式虚拟路由(Distributed Virtual Routing - DVR)。 只有计算可以通过macvtap关联的资源。不支持关联另外的如DHCP、路由器等的资源。因而在控制器节点上运行OVS或Linux网桥在VLAN或者flat模式。 实例迁移需要每个计算节点上的physical_interface_mapping配置选项相同。有关详细信息,请参阅`https://bugs./neutron/ bug/1550400
前提条件 Prerequisites你可以添加此mechanism驱动程序到一个已存在的环境中,此环境使用Linux网桥或者OVS mechanism驱动程序提供仅provider网络,或者provider和self-service并存网络。你可以更改现有计算节点的配置或添加使用Macvtap mechanism驱动的计算节点。示例配置假定添加带有Macvtap mechanism驱动的计算节点到:deploy-lb-selfservice 或 deploy-ovs-selfservice 部署示例中。 使用以下组件添加一个或多个计算节点: 三个网络接口: management, provider, and overlay. OpenStack Networking Macvtap layer-2 代理 和 任何依赖关系.
注: 为了支持与部署示例的集成,此内容配置Macvtap机制驱动程序以在覆层网络(如 VXLAN)上使用无标签(flat)或标签(VLAN)网络。你的物理网络基础设施必须支持 覆层网络上的VLAN(802.1q)标签功能。
架构 ArchitectureMacvtap机制驱动程序仅适用于计算节点。否则,环境类似于前提条件一节中的部署示例。 

示例配置 Example configuration使用以下示例配置作为模板添加Macvtap机制驱动程序到现有的操作环境中。 控制节点 Controller node在 ml2_conf.ini 文件中: 添加 macvtap 到机制驱动程序项中. [ml2]
mechanism_drivers = macvtap
配置网络映射. [ml2_type_flat]
flat_networks = provider,macvtap
[ml2_type_vlan]
network_vlan_ranges = provider,macvtap:VLAN_ID_START:VLAN_ID_END
注:
使用“macvtap”是任意的。只有self-service部署示例需要VLAN ID范围。使用适当的数字值替换“VLAN_ID_START”和"VLAN_ID_END"。
重启一下的服务:
网络节点 Network nodes无改变. 计算节点 Compute nodes安装 Networking service Macvtap layer-2 agent代理. 在文件 “neutron.conf” 中, 配置通用选项: 参见OpenStack官方文档: shared/deploy-config-neutron-common.txt 在文件 “macvtap_agent.ini” 中, 配置 layer-2 agent 代理. [macvtap]
physical_interface_mappings = macvtap:MACVTAP_INTERFACE
[securitygroup]
firewall_driver = noop
使用底层处理Macvtap mechanism驱动程序的接口名称取代 “MACVTAP_INTERFACE”. 如果使用前提条件的部署示例环境,使用处理覆层网络的底层接口取代“MACVTAP_INTERFACE”,如“eth1”。 启动以下服务: Macvtap agent
验证服务Source the administrative project credentials. Verify presence and operation of the agents:
$ openstack network agent list
-------------------------------------- -------------------- ---------- ------------------- ------- ------- ---------------------------
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
-------------------------------------- -------------------- ---------- ------------------- ------- ------- ---------------------------
| 31e1bc1b-c872-4429-8fc3-2c8eba52634e | Metadata agent | compute1 | None | True | UP | neutron-metadata-agent |
| 378f5550-feee-42aa-a1cb-e548b7c2601f | Open vSwitch agent | compute1 | None | True | UP | neutron-openvswitch-agent |
| 7d2577d0-e640-42a3-b303-cb1eb077f2b6 | L3 agent | compute1 | nova | True | UP | neutron-l3-agent |
| d5d7522c-ad14-4c63-ab45-f6420d6a81dd | Metering agent | compute1 | None | True | UP | neutron-metering-agent |
| e838ef5c-75b1-4b12-84da-7bdbd62f1040 | DHCP agent | compute1 | nova | True | UP | neutron-dhcp-agent |
-------------------------------------- -------------------- ---------- ------------------- ------- ------- ---------------------------
来源:https://www./content-1-312651.html
|