Pages

Saturday 2 March 2013

How To configure Bonding in Ubuntu 12.04


                                   What is Bonding 
Bonding, also called port trunking or link aggregation means combining several network interfaces (NICs) to a single link, providing either high­availability, load­balancing, maximum throughput, or a combination of these.

Step 1. Install the appropriate package for boning. 
            $sudo apt-get install ifenslave


ifenslave is used to attach and detach slave network interfaces to a bonding device.

Step 2. Configure the Interfaces and load bonding module in to the kernel 
 
       2.1.  Edit your /etc/modules file to load the bonding modules into the kernel
             $sudo vim /etc/modules

       2.2.  Ensure the bonding module is loaded:
                loop
                lp
                rtc
                bonding
       2.3.  Configure network Interfaces
               $sudo stop networking
               $sudo modprobe bonding

Step 3. Now edit your /etc/network interfaces file to configuring bonding.

For example, to combine eth0 and eth1 as slaves to your bonding interface:

            $sudo /etc/network/interfaces
               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 192.168.0.1
               netmask 255.255.255.0
               gateway 192.168.0.254
               bond-mode 802.3ad
               bond-miimon 100
               bond-lacp-rate 1
               bond-slaves none

               :wq (save and exit )

 Step 4. Now start the networking service
            $sudo start networking

Step 5. You can check the bonding interface information.
           $sudo cat /proc/net/bonding/bond0

Step 6. To bringing up/down  bonding Interface
            $sudo ifdown bond0
            $sudo ifup bond0







   







No comments:

Post a Comment