Ubuntu: virt-manager bonding: What is “Carrier Type”



Question:

I'm trying to configure 2 Ethernet interfaces for bonding in virt-manager. So I go "Add Interface" => Select "Bond" => Configure "Bond mode". This opens a window called "Bonding configuration" where I set "Bond mode" to 802.3ad and "Bond monitor mode" to miimon. At the bottom of the window appears a field "Carrier type" where you can select either "netif" or "ioctl".

I've configured bonding before but never came accross these settings. What do these settings mean? And what should I choose on a fresh 16.04 Server installation?

Update: Maybe somebody should tell the virt-manager guys that the timings under "MII settings" are actually milliseconds and not seconds!


Solution:1

KVM networking is not my thing, really bugs me. That's why I had to dig a little deeper and found out that the "Carrier type" translates into the bond_use_carrier parameter in /etc/network/interfaces. Quote from here:

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.  

So, choose "netif" and then take your link offline. If your system doesn't recognize that the link is down, switch back to "ioctl".


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »