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.
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.