Wednesday, 3 July 2013

Bonded network interface in Red Hat Linux

Below is a simple steps to create a bonded network interface in Red Hat Linux by teaming 2 interefaces as one.

1. create a configuration script for the virtual interface

# vi /etc/sysconfig/network-scripts/ifcfg-bond0

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


2. create configuration scripts for the physical interfaces which will be part of bond0

#vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

#
#vi /etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes


3. add the following to /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=balance-rr miimon=100


4. load the module

#modprobe bonding

5. restart the bonded network settings

#service network restart

6. check the bonding configuration and status
# cat /proc/net/bonding/bond0

No comments:

Post a Comment