This section describes how to use the xe CLI to bond NIC interfaces on a XenServer host that is not in a pool. See the section called “Creating NIC bonds in resource pools” for details on using the xe CLI to create NIC bonds on XenServer hosts that comprise a resource pool.

Creating a NIC bond

When you bond a NIC, the bond absorbs the PIF/NIC currently in use as the primary management interface. From XenServer 6.0 onwards, the primary management interface is automatically moved to the bond PIF.

Bonding two NICs

1.Use the network-createcommand to create a new network for use with the bonded NIC. The UUID of the new network is returned:

xe network-create name-label=<bond0>

2.Use the pif-listcommand to determine the UUIDs of the PIFs to use in the bond:

xe pif-list

3.Do one of the following:

To configure the bond in active-active mode (default), use the bond-createcommand to create the bond. Using commas to separate the parameters, specify the newly created network UUID and the UUIDs of the PIFs to be bonded:

xe bond-create network-uuid=<network_uuid>pif-uuids=<pif_uuid_1>,<pif_uuid_2>

The UUID for the bond is returned after running the command.

To configure the bond in active-passive mode, use the same syntax but add the optional mode parameter and specify active-backup:

xe bond-create network-uuid=<network_uuid>pif-uuids=<pif_uuid_1>,<pif_uuid_2> / mode=<balance-slb active-backup>

Note:

In previous releases, you specified the other-config:bond-modeto change the bond mode. While this command still works in XenServer 6.0, it may be not be supported in future releases and it is not as efficient as the mode parameter. other-config:bond-moderequires running pif-unplugand pif-plugto get the mode change to take effect.

Controlling the MAC Address of the Bond

When you bond the primary management interface, the PIF/NIC currently in use as the primary management interface is subsumed by the bond. If the host uses DHCP, in most cases the bond's MAC address is the same as the PIF/NIC currently in use, and the primary management interface's IP address can remain unchanged.

You can change the bond's MAC address so that it is different from the MAC address for the (current) primary management-interface NIC. However, as the bond is enabled and the MAC/IP address in use changes, existing network sessions to the host will be dropped.

You can control the MAC address for a bond in two ways:

An optional mac parameter can be specified in the bond-createcommand. You can use this parameter to set the bond MAC address to any arbitrary address.

If the mac parameter is not specified, from XenServer 6.0 onwards, XenServer uses the MAC address of the primary management interface if this is one of the interfaces in the bond. If the primary management interface is not part of the bond, but another management interface is, the bond uses the MAC address (and also the IP address) that management interface. If none of the NICs in the bond are management interfaces, the bond uses the MAC of the first named NIC.

79

Page 97
Image 97
Citrix Systems 6 manual Creating a NIC bond, Bonding two NICs, Controlling the MAC Address of the Bond