前面咱们学习了L2 Population 的原理,今天讨论如何在 Neutron 中配置和启用此特性。linux
目前 L2 Population 支持 VXLAN with Linux bridge 和 VXLAN/GRE with OVS。学习
能够经过如下配置启用 L2 Population。spa
在 /etc/neutron/plugins/ml2/ml2_conf.ini 设置 l2population mechanism driver。ci
mechanism_drivers = linuxbridge,l2populationit
同时在 [VXLAN] 中配置 enable L2 Population。io
L2 Population 生效后,建立的 vxlan-100 会多一个 Proxy ARP 功能。原理
查看控制节点上的 forwarding database,能够看到 VTEP 保存了 cirros-vm2 的 port 信息。配置
cirros-vm2 的 MAC 为 fa:16:3e:1d:23:a3。 VTEP IP 为 166.66.16.11。plugin
当须要与 cirros-vm2 通讯时,控制节点 VTEP 166.66.16.10 会将封装好的 VXLAN 数据包直接发送给计算节点的 VTEP 166.66.16.11。im
咱们再查看一下计算节点上的 forwarding database:
fdb 中保存了 cirros-vm1 和 dhcp 的 port 信息。 当须要与它们通讯时,计算节点 VTEP 知道应该将数据包直接发送给控制节点的 VTEP。
下节咱们开始学习 Neutron 的另外一个特性 -- Securet Group。