Multiple bond devices on single server..

Problem

You want to set up more than one bonded interface on your Red Hat Enterprise Linux 4 or 5 system.

Solution

Multiple bonding setup is different for Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5.

For Red Hat Enterprise Linux 5:


Because initscripts package is updated to fix several problem about bonding, if you are using Red Hat Enterprise Linux 5.3 (or update to initscripts-8.45.25-1.el5), configure multiple bonding channels is very similar to configure single bonding channel. You can setup the ifcfg-bondN and ifcfg-ethX files as if there were only one bonding channel. You can specify different BONDING_OPTS for different bonding channels so that they can have different mode and other settings. Refer to the Red Hat Enterprise Linux 5 Deployment Guide "14.2.3. Channel Bonding Interfaces" for more information.

For example, you can add the following line to /etc/modprobe.conf:

alias bond0 bonding
alias bond1 bonding



And here is an example for ifcfg-bond0 and ifcfg-bond1:


ifcfg-bond0:

DEVICE=bond0
IPADDR=192.168.50.111
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="mode=0 miimon=100"


ifcfg-bond1:

DEVICE=bond1
IPADDR=192.168.30.111
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=50"


For Red Hat Enterprise Linux 4:


To configure multiple bonding channels, first setup the ifcfg-bondN and ifcfg-ethX files as if there were only one bonding channel. Refer to the Red Hat Enterprise Linux 4 Reference guide Section 8.2.3 "Channel Bonding Interface" for more information.



The change comes in setting up /etc/modprobe.conf. If the two bonding channels have the same bonding option, such as bonding mode, monitoring frequency, etc, add the max_bonds option. For example:


alias bond0 bonding
alias bond1 bonding
options bonding max_bonds=2 mode=balance-rr miimon=100



If the two bonding channels have different bonding options (for example, one is using round-robin mode and one is using active-backup mode), the bonding modules have to load twice with different options. For example, in /etc/modprobe.conf:



install bond0 /sbin/modprobe --ignore-install bonding -o bonding0 mode=0 miimon=100 primary=eth0
install bond1 /sbin/modprobe --ignore-install bonding -o bonding1 mode=1 miimon=50 primary=eth2



If you have more bonding channels, add one install bondN --ignore-install bonding -o bondingN options line per bonding channels.



After the file /etc/modprobe.conf is modified, restart the network service.



Note: The use of -o bondingX to get different options for multiple bonds was not possible in Red Hat Enterprise Linux 4 GA and 4 Update 1.

Comments

Popular posts from this blog

configure Netbackup email notification on Unix