Setting up channel bonding on SLES12
On SLES 12, it is very convenient to use YaST to configure channel bonding. To begin the bonding setup, access the Network Settings module within YaST.
Add the network cards (in this example, the OSA-Express® 5 adapters), with Ethernet device type and select the Address tab. In the Address window (as shown in Figure 1), choose the radio button No Link and IP Setup (Bonding Slaves) to define this network interface as a slave device. This selection also allows you to edit the properties of a previously-defined Ethernet-type device in order to define it as a bonding slave device.
After adding all slaves, add a new network interface with type Bond and select the Address tab again (as shown in Figure 2).
In this window, choose the radio button Statically assign the IP address to configure the IP address of the bond and the host name and click Next. The system displays the Bond Slaves and Order window:
In this window, you can select check boxes to add any of your previously-configured slaves to the bond. In the Bond Driver Options field, you can specify additional options that define the behavior of the bond. In this example, the SLES 12 default options mode=active-backup miimon=1000 are specified. These options configure the bond to active-backup mode, with Media Independent Interface (MII) link monitoring of 1000-ms intervals. (As discussed in Channel bonding options and recommendations, on Linux on Z the option fail_over_mac should always be set to 1 when using active-backup mode.)
To finish the bonding configuration, click the Next button. The system automatically generates a configuration file for the bonding interface (/etc/sysconfig/network/ifcfg-bond0), as shown in Figure 4:
BONDING_MASTER='yes'
BONDING_MODULE_OPTS='mode=active-backup miimon=1000 fail_over_mac=1'
BONDING_SLAVE0='eth1'
BONDING_SLAVE1='eth2'
IPADDR='192.0.2.0/24'
BOOTPROTO='static'
STARTMODE='auto'
- BONDING_MASTER='yes'
- Establishes this as the bonding master.
- BONDING_MODULE_OPTS='mode=active-backup miimon=1000 fail_over_mac=1'
- Provides a list of bonding options, separated with blank.
- BONDING_SLAVE0='eth1'
- Defines the name of this slave.
- BONDING_SLAVE1='eth2'
- Defines the name of this slave.
- IPADDR='192.0.2.0/24'
- Defines the IP address.
If you use the YaST setup to generate config files for each of the slave devices, the MAC addresses of the slave devices will not show up in these files. With OSA devices as bonding slaves, it is recommended to manually define a virtual MAC address (LLADDR) for each slave device, as shown in Figure 5, so that the MAC addresses keep persistent after rebooting.
/etc/sysconfig/network/ifcfg-eth1:
NAME='OSA Express Network card (0.0.b230)'
BOOTPROTO='none'
STARTMODE='auto'
LLADDR='02:00:00:0a:6c:4b'
/etc/sysconfig/network/ifcfg-eth2:
NAME='OSA Express Network card (0.0.b2a0)'
BOOTPROTO='none'
STARTMODE='auto'
LLADDR='02:0b:0c:0d:0e:02'
On SLES12, after configuring the bonding interface, you can use the Wicked network management tool to set the interface down and up (as shown in Figure 6) to put the changes in the configuration files into effect.
# wicked ifdown bond0
# wicked ifup bond0