Multiple bonded interfaces in Red hat Enterprise Server

February 22, 2008 at 1:53 pm Leave a comment

It is common practice to create bonded interface for high availability. The procedure below describes how to create two bonded interfaces in Red Hat Enterprise Server 4. The instructions should apply to RHES 5 as well.

In the following scenario two bonded interfaces will be created as follows:
– bond0 – using eth0 and eth1 physical nicks
– bond1 – using eth2 and eth3 physical nicks

1. Edit /etc/modprobe.conf and add the following lines:

alias bond0 bonding
alias bond1 bonding
options bond0 miimon=200 primary=eth0 mode=1 max_bonds=2
options bond1 miimon=200 primary=eth2 mode=1 max_bonds=2

We have used the following options:

miimon=200 – Link check interval is 200ms
mode=1 – Mode of operation is set to active-backup.
primary=ethX – Primary network device to use
max_bonds=2 – Maximum number of bonded interfaces. This one is often forgotten. It is not required if we only have one bond but has to be put in place to allow for multiple bonded interfaces.

2. Create corresponding files in /etc/sysconfig/network-scripts directory

ifcfg-bond0:
DEVICE=bond0
BOOTPROTO=none
IPADDR=10.200.10.106
NETMASK=255.255.0.0
ONBOOT=yes
TYPE=Ethernet

ifcfg-eth0:
DEVICE=eth0
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HWADDR=00:1E:4F:18:F7:A0
ONBOOT=yes
TYPE=Ethernet
ETHTOOL_OPTS="autoneg off speed 1000 duplex full"

ifcfg-eth1:
DEVICE=eth1
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HWADDR=00:1E:4F:18:F7:A2
ONBOOT=yes
TYPE=Ethernet
ETHTOOL_OPTS="autoneg off speed 1000 duplex full"

ifcfg-bond1:
DEVICE=bond1
BOOTPROTO=none
IPADDR=10.199.10.106
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet


ifcfg-eth2:

DEVICE=eth2
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
HWADDR=00:1E:4F:18:F7:A4
ONBOOT=yes
TYPE=Ethernet
ETHTOOL_OPTS="autoneg off speed 1000 duplex full"

ifcfg-eth3:
DEVICE=eth3
MASTER=bond1
SLAVE=yes
BOOTPROTO=none
HWADDR=00:1E:4F:18:F7:A6
ONBOOT=yes
TYPE=Ethernet
ETHTOOL_OPTS="autoneg off speed 1000 duplex full"

As seen above physical interfaces do not have any network specific options but contain two bonding parameters:
MASTER=bondX
SLAVE=yes

I have additionally specified ethtool options and set the following defaults for all the nicks:

autoneg off – disable autonegotiation
speed 1000 – set network speed to 1Gb
duplex full – enable full duplex

Live information about the status of each bonded interfaces can be checked in /proc/net/bonding directory.

Advertisements

Entry filed under: Red Hat. Tags: , , .

Daylight saving time What is the right linux filesystem?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Categories


%d bloggers like this: