Re: NIC Bonding in libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/23/2011 03:49 PM, Shi Jin wrote:
Hi there,

> From http://wiki.libvirt.org/page/FAQ, it says:
Network interface management: Any host running the libvirt daemon can be used to manage physical and logical network interfaces. Enumerate existing interfaces, as well as configure (and create) interfaces, bridges, vlans, and bond devices. This is with the help of netcf.<br/><br/>For more info, see: https://fedorahosted.org/netcf/

It suggests that NIC bonding (teaming) is supported in libvirt but all I can find is this page http://wiki.libvirt.org/page/TodoNICBonding which has nothing in it.  Can anyone advise on which stage this work is at and where to get more information on it.
(Keep in mind that the virInterface API (and corresponding iface-* commands in virsh) are only available on platforms that have netcf, and netcf is unfortunately currently only available on Fedora and RHEL.)

Configuration of bonds is supported, but poorly documented. Here is an example of a bond made from two ethernets:

<interface type="bond" name="bond0">
<start mode="none"/>
<protocol family="ipv4">
<ip address="192.168.50.7" prefix="24"/>
<route gateway="192.168.50.1"/>
</protocol>
<bond mode="active-backup">
<miimon freq="100" updelay="10" carrier="ioctl"/>
<interface type="ethernet" name="eth1"/>
<interface type="ethernet" name="eth0"/>
</bond>
</interface>

This bonds eth0 and eth1 together, and sets one IPv4 address (and a default route) on the bond. Note that once an interface is used in a bond, it is not visible by itself in the list of host interfaces.

My simplistic thought is to have a bridge on a bonded device but that seems to have ARP problems according to https://bugzilla.redhat.com/show_bug.cgi?id=584872 and https://lists.linux-foundation.org/pipermail/bridge/2007-April/005376.html.

I don't know about this bug, but here is an example config for a bond of eth0+eth1 that's connected to a bridge device:

<interface type="bridge" name="br0">
<start mode="onboot"/>
<mtu size="1500"/>
<protocol family="ipv4">
<ip address="192.168.50.7" prefix="24"/>
<route gateway="192.168.50.1"/>
</protocol>
<bridge stp="on" delay="0">
<interface type="bond" name="bond0">
<bond mode="active-backup">
<miimon freq="100" updelay="10" carrier="ioctl"/>
<interface type="ethernet" name="eth1"/>
<interface type="ethernet" name="eth0"/>
</bond>
</interface>
</bridge>
</interface>

Again in this case, the only interface that will be visible in the interface list given by virsh iface-list will be br0 - the bond is subordinate to the bridge, and the physical devices are subordinate to the bond.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]