Preparation
With some Linux releases, the bonding module is not loaded by default. In such cases, issue the following command as root to load the bonding module:
# modprobe bonding
Before setting up a channel bonding interface, the network devices should be ready for the system. To keep the device configuration persistent, it is recommended that you manage network devices using udev rules. The following is an example of a udev rule to add a qeth device with subchannel id 0.0.b230 and preserve the mapping of network interface eth0 to the OSA device 0.0.b230. This rule is defined in /etc/udev/rules.d/70-persistent-net.rules file.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="qeth", KERNELS=="0.0.b230",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
You can use the command lscss (list subchannels) to display a list of devices with subchannel information, as shown in Figure 3.
# lscss
Device Subchan. DevType CU Type Use PIM PAM POM CHPIDs
----------------------------------------------------------------------
0.0.b230 0.0.0010 1732/01 1731/01 yes 80 80 ff b6000000 00000000
0.0.b231 0.0.0011 1732/01 1731/01 yes 80 80 ff b6000000 00000000
0.0.b232 0.0.0012 1732/01 1731/01 yes 80 80 ff b6000000 00000000
0.0.b2a0 0.0.0013 1732/01 1731/01 yes 80 80 ff b7000000 00000000
0.0.b2a1 0.0.0014 1732/01 1731/01 yes 80 80 ff b7000000 00000000
0.0.b2a2 0.0.0015 1732/01 1731/01 yes 80 80 ff b7000000 00000000
Here the two OSA devices 0.0.b230 and 0.0.b2a0 are taken as examples for configuration of a channel bonding. Looking at the output of the lscss command in Figure 3, we can see both devices with triplet device bus-IDs, connected to different channel paths. This guarantees that if one channel path is in error state, the failover will work with the other one.
You can also use the command lsqeth (list qeth-based network devices) to display a summary of information about the qeth group device, as shown in Figure 4.
# lsqeth
Device name : eth0
----------------------------------------------------------
card_type : OSD_10GIG
cdev0 : 0.0.b230
cdev1 : 0.0.b231
cdev2 : 0.0.b232
chpid : B6
online : 1
portname : osaport
portno : 0
state : UP (LAN ONLINE)
priority_queueing : always queue 0
buffer_count : 64
layer2 : 1
isolation : none
switch_attrs : unknown
In the example, we can see that the network interface eth0, representing group device 0.0.b230, 0.0.b231, and 0.0.b232, is an OSA-Express® adapter with 10-Gitabit Ethernet. For the channel bonding configuration it is important for the OSA device to be defined as a Layer 2 device.