8.5. Channel Bonding Interfaces

Channel bonding enables two or more network interfaces to act as one. The following procedure describes how to channel bond interfaces in Rocks.

We'll use the example of channel bonding two interfaces for compute-0-1. First, let's list the current configuration of the interfaces for compute-0-1:

# rocks list host interface compute-0-1
SUBNET  IFACE MAC               IP           NETMASK     MODULE NAME        VLAN OPTIONS
private eth0  00:1e:4f:b0:74:ef 10.1.255.253 255.255.0.0 tg3    compute-0-1 ---- -------
------- eth1  00:10:18:31:74:43 ------------ ----------- tg3    ----------- ---- -------

Here's what we'll do:

# rocks add host bonded compute-0-1 channel=bond0 interfaces=eth0,eth1 ip=10.1.255.253 network=private

The above command changes the interface configuraion for compute-0-1 in the following way:

# rocks list host interface compute-0-1
SUBNET  IFACE MAC               IP           NETMASK     MODULE  NAME        VLAN OPTIONS CHANNEL
private bond0 ----------------- 10.1.255.253 255.255.0.0 bonding compute-0-1 ---- ------- -------
------- eth0  00:1e:4f:b0:74:ef ------------ ----------- tg3     ----------- ---- ------- bond0  
------- eth1  00:10:18:31:74:43 ------------ ----------- tg3     ----------- ---- ------- bond0

To apply the configuration, execute:

# rocks sync config
# rocks sync host network compute-0-1

8.5.1. Adding Parameters to the Kernel Bonding Module

There are several options that can be added to the kernel bonding module (see RedHat's documentation The Channel Bonding Module for a full description of all the options).

To set options "miimon=100" and "mode=balance-rr" for the kernel bonding module associated with bond0, execute:

# rocks set host interface options compute-0-1 bond0 options="miimon=100 mode=balance-rr"

Warning

The "options" value (e.g., "miimon=100 mode=balance-rr") must be a space-separated list.

And now we see:

SUBNET  IFACE MAC               IP           NETMASK     MODULE  NAME        VLAN OPTIONS                    CHANNEL
private bond0 ----------------- 10.1.255.253 255.255.0.0 bonding compute-0-1 ---- miimon=100 mode=balance-rr -------
------- eth0  00:1e:4f:b0:74:ef ------------ ----------- tg3     ----------- ---- -------------------------- bond0  
------- eth1  00:10:18:31:74:43 ------------ ----------- tg3     ----------- ---- -------------------------- bond0

To apply the options to the bond0 interface, execute:

# rocks sync host network compute-0-1