Configuring NIC bonding on REDHAT

This entry was posted in Linux, Middleware and tagged on June 17, 2012, by

What is NIC Bonding:

The concept of NIC bonding is that you have two NIC’s bonded together to appear as if they are the same physical device. i.e . they both provide same mac address.

Before attempting to bond two NIC’s it is recommended that you look for the integrity and functionality of each NIC’s on its own.

STEP1:

# mii-tool

eth0: link,ok

eth1: link ok

STEP 2:

Make the Network down

# ifdown eth0

# ifdown eth1

STEP3:

Create a bond0 configuration file:

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

append folllowing lines in the file

DEVICE=bond0

IPADDR=192.168.1.20

NETWORK=192.168.1.0

NETMASK=255.255.255.0

USERCTL=no

BOOTPROTO=none

ONBOOT=yes

Replace the ip with teh actual ip address.

Save the file and exit.

Modify eth0 and eth1 file :

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

DEVICE=eth0

USERCTL=no

ONBOOT=yes

MASTER=bond0

SLAVE=yes

BOOTPROTO=none

Save the file and exit.

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

DEVICE=eth1

USERCTL=no

ONBOOT=yes

MASTER=bond0

SLAVE=yes

BOOTPROTO=none

Save the file and exit.

STEP 4:

Load BOND driver/module:

# vi /etc/modprobe.conf

edit the following lines

alias bond0 bonding

options bond0 mode=balance-alb miimon=100

Save the file and exit.

Step 5:

Load the bonding module:

# modprobe bonding

Step 6:

Restart the network service:

# service network restart

You will see that it bring’s bond0 up.

# ifconfig -a

List bond0, eth0 , eth1 interface.

In this way both nic eth0 and eth1 is bonded together into one nic bond0.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.