154 IBM z/VM and Linux on IBM System z: Virtualization Cookbook for Red Hat Enterprise Linux 4
Linux now has access to two OSA devices, each you can use as one interface in the bonding
11.2.3 Configure the physical switch
For balance-xor mode to function properly, the physical switch that the OSA devices are
connected to must support port aggregation. Most high end switches support channel
bonding, however, the term varies across vendors, for example
etherchannel or port
11.2.4 Configuring Linux
At the moment, connecting to LINUX04 is accomplished by vsw1 and the virtual network
interface card (NIC) at address 0600. Upon completion of this section, connections are
established through a new interface device that bonds all OSA devices at 0700 and 0800.
Log in to LINUX04 as root and create the following three interface configuration files:
Example 11-19 Configuration file for eth0 (/etc/sysconfig/network-scripts/ifcfg-eth0)
Example 11-20 Configuration file for eth1 (/etc/sysconfig/network-scripts/ifcfg-eth1)
Note: Because channel bonding configuration is specific to a switch vendor, we do not
document the procedure here. At a high level, you must configure the switch to aggregate
the ports connected to the bonded interfaces. This allows duplicate MAC addresses for the
bonded interfaces, and load balances traffic across the ports. For details on configuring
your switch, consult the switch manufacturer.
Chapter 11. Miscellaneous recipes 155
Example 11-21 Configuration file for bond0 (/etc/sysconfig/network-scripts/ifcfg-bond0)
Both ifcfg-eth0 and ifcfg-eth1 contain very similar information. The options that might be
unfamiliar to you are as follows:
If “yes” then the current interface is set to slave mode. In a channel bonding configuration
only the bond interface must be in MASTER mode and all bonded interfaces must be in
Indicates which interface acts as the master for the current interface configuration. This is
always the name of a bonding interface.
This is a list of name/value pairs, which you can use to modify settings in the qeth driver.
In this case, we are using OSA-Express that is running in layer 2 mode. In order for Linux
to cooperate with this you must define an extra configuration that sets the device to layer 2
Indicates the virtual MAC address of the interface. It must be unique within your physical
network. The address prefix of two hexadecimal digits are 02. This means that this MAC
address falls within the allowable range of addresses classified as locally administered. If
you configure the channel bonding interface with balance-xor mode, all SLAVE interfaces
must have the same MAC addresses.
You require to define the bonding module in the /etc/modprobe.conf file as Example 11-22
shows. The definition includes an alias, and also a list of options that you must pass to the
bonding module. The two options used are miimon and mode. The first option miimon
specifies the interval in milliseconds, which you use to detect link failures. The second option
is mode, which you can use to select how the channel bonding acts.
Example 11-22 Configuration file for modprobe.conf (/etc/modprobe.conf)
alias eth0 qeth
alias eth1 qeth
alias bond0 bonding
options bonding miimon=100 mode=2
options dasd_mod dasd=100-102