Create a Bonded Interface in SUSE Linux Enterprise Server 8
Novell Cool Solutions: Feature
By Aaron Gresko
Digg This -
Posted: 16 Mar 2005
Bonding network interfaces together allows for increased network throughput or failover in high availability configurations. Getting SUSE Linux Enterpise Server 8 (SLES8) configured with a bonded device is just a little more complicated than in SLES9, though neither are very difficult to set up.
This article will show how to configure bonding in SLES8 using the example of setting up a bonded interface (bond0) in a server with two ethernet cards already configured with static IP addresses (eth0 and eth1).
One note of caution before proceeding?make sure the SLES8 system has been updated to service pack 3. The configuration given will not work with a system that has not been updated.
Setting up a bonded interface on SLES8 requires the following:
- Modify the bonding module parameters
- Create the bond interface
- Enslave devices to the bond
Modify the Bonding Module Parameters
To set up the bonding module and enable failover mode, do the following:
- Open a terminal and su to root.
- Open /etc/modules.conf and add an alias for the bond device, for example:
alias bond0 bonding
- Configure the bonding module options. The necessary parameters are mode and miimon.
The mode parameter can be set to 0 for round robin operation, 1 for active backup mode (failover), or 2 for XOR operation. When set for failover operation, MII link monitoring should be enabled by setting the miimon parameter to a value higher than zero.
Add an option line for each bond interface, for example:
options bonding mode=1 miimon=200
- The changes to modules.conf will take effect the next time the system is started. Set up the bonding module immediately, by entering modprobe bonding mode=1 miimon=200 at the prompt.
Create the Bond Interface
The bond interface will be created using a configuration file in /etc/sysconfig/network/. Do the following:
- Open a terminal and su to root.
- cd to /etc/sysconfig/network/.
- Create the bond configuration file by entering vi ifcfg-bond0.
- In the configuration file, enter the following:
- Start the bond interface by entering ifup bond0 at the command line. Alternatively, restart the network by entering rcnetwork restart at the command line.
- Run ifconfig to verify the bond interface is up.
DEVICE='bond0' IPADDR='192.168.1.1' NETMASK='255.255.255.0' BROADCAST='192.168.1.255' BOOTPROTO='static' STARTMODE='onboot'
Enslave Devices To The Bond
With the bond interface up and running, the final step is to enslave interfaces to the bond interface. The enslaving is done with the ifenslave command. In the case of the example system, the devices eth0 and eth1 will be enslaved to bond0.
- Open a terminal and su to root
- Enslave the devices by entering ifenslave bond0 eth0 eth1
- Confirm the ethernet devices are enslaved by entering ifconfig
The output of ifconfig should show that the devices are enslaved, as shown in the illustration below:
Running rcnetwork restart will not enslave the interfaces, nor will the devices be enslaved at system startup. The ability to define master/slave relationships in the interface configuration files is present in SLES9 though.
To have the interfaces enslaved when the bond interface is brought up, follow the workaround described in TID 10096919 in the Novell Support Knowledgebase.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com