我正在尝试在 virt-manager 中配置 2 个以太网接口以进行绑定。因此我转到“添加接口”=> 选择“绑定”=> 配置“绑定模式”。这将打开一个名为“绑定配置”的窗口,我将“绑定模式”设置为 802.3ad,将“绑定监控模式”设置为 miimon。窗口底部出现一个字段“运营商类型”,您可以在其中选择“netif”或“ioctl”。
我以前配置过绑定,但从未遇到过这些设置。这些设置是什么意思?在全新安装 16.04 服务器时我应该选择什么?
更新:也许有人应该告诉 virt-manager 的人,“MII 设置”下的时间实际上是毫秒而不是秒!
答案1
KVM 网络不是我的强项,这真的让我很烦。这就是为什么我不得不深入挖掘并发现“运营商类型”转换为bond_use_carrier
中的参数/etc/network/interfaces
。引用自这里:
use_carrier
Specifies whether or not miimon should use MII or ETHTOOL
ioctls vs. netif_carrier_ok() to determine the link
status. The MII or ETHTOOL ioctls are less efficient and
utilize a deprecated calling sequence within the kernel. The
netif_carrier_ok() relies on the device driver to maintain its
state with netif_carrier_on/off; at this writing, most, but
not all, device drivers support this facility.
If bonding insists that the link is up when it should not be,
it may be that your network device driver does not support
netif_carrier_on/off. The default state for netif_carrier is
"carrier on," so if a driver does not support netif_carrier,
it will appear as if the link is always up. In this case,
setting use_carrier to 0 will cause bonding to revert to the
MII / ETHTOOL ioctl method to determine the link state.
A value of 1 enables the use of netif_carrier_ok(), a value of
0 will use the deprecated MII / ETHTOOL ioctls. The default
value is 1.
因此,选择“netif”,然后将您的链接脱机。如果您的系统无法识别链接已关闭,请切换回“ioctl”。