Syed Jahanzaib – Personal Blog to Share Knowledge !

September 17, 2013

Multiple NIC bonding to achieve higher data transfer & redundancy

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 4:38 PM

2- ha with load balancing

Recently at a local cable.network, I deployed NIC teaming in a File Sharing server for high availability and to provide better data transfer to users with failover. Lets discuss some dry theory first.

NIC bonding or NIC teaming is used to achieve high throughput and link redundancy by combining or aggregating multiple network connections in parallel. This is done to increase throughput, and to provide redundancy in case one of the links fails or Ethernet card fails.  This is a short guide on howto combine multiple Ethernet devices into a single link, to achieve higher data rates and link failover. NIC teaming increases network availability by removing single point of failure.

In this example I have used UBUNTU Server 12.4 64bit edition.

Its useful in scenarios like Media / File server, important application server where data transfer is high and link redundancy is also required to avoid cable/nic/switch failure.

.

Scenario:
.

We have two interfaces in our Linux / Ubuntu box and we want to do NIC bonding to achieve higher data and redundancy.

Here are the step by step method.

I assume that you have installed the ubuntu and updated it already.
Now Install the ifenslave package which allows you to create Master/Slave bindings:

sudo apt-get install ifenslave
Now enable bonding support in your kernel. Edit /etc/modules file and add bonding as shown below:
.
nano /etc/modules
and add following line in the end

bonding

As showed in the image below . . .

1- modules

Save & Exit.

now reload this module, before doing so, then stop networking services by


/etc/init.d/networking stop

modprobe bonding

.
.

Now configure the interfaces files in /etc/networking/interfaces file. We will use eth0 and eth1 for bonding.

Edit the file

nano /etc/network/interfaces

.

and paste the following

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
address 10.0.0.1  # Change it as per your requirements, zaib
netmask 255.0.0.0
#    gateway 10.0.0.2
bond-slaves none
bond-miimon 100
bond-mode balance-rr

 As showed in the image below . . .

2- interfaces files.

Now start networking services by


/etc/init.d/networking start

now issue ifconfig command to view the changes in itnerfaces.

ifconfig

3- ifconfig.

.

Regard’s
Syed Jahanzaib

5 Comments »

  1. is the same possible with centos machine

    Like

    Comment by ammar — September 17, 2013 @ 8:42 PM

  2. can you use different types of lancards?

    Like

    Comment by jgams — September 18, 2013 @ 9:38 AM

  3. Late Question, 🙂
    Can you help to explain (some example), how to implement it (Server bonding eg. 2 NIC or more with Mikrotik)
    Thanks

    Like

    Comment by yanisidi — June 6, 2019 @ 12:08 AM


RSS feed for comments on this post. TrackBack URI

Leave a comment