0% found this document useful (0 votes)
49 views2 pages

Bonding

The document describes the steps to configure network bonding on a Linux system using multiple network interfaces. It involves 1) creating a bonding configuration file for the bond0 interface, 2) modifying the interface configuration files to set them as slaves to the bond, 3) configuring the bonding mode and parameters, 4) loading the bonding kernel module, and 5) restarting networking to bring up the bonded interface. Verification steps are provided to check the active slave and failover behavior.

Uploaded by

kumar184
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views2 pages

Bonding

The document describes the steps to configure network bonding on a Linux system using multiple network interfaces. It involves 1) creating a bonding configuration file for the bond0 interface, 2) modifying the interface configuration files to set them as slaves to the bond, 3) configuring the bonding mode and parameters, 4) loading the bonding kernel module, and 5) restarting networking to bring up the bonded interface. Verification steps are provided to check the active slave and failover behavior.

Uploaded by

kumar184
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Network Bonding

Step 1. Create the file ifcfg-bond0 with the IP address, netmask and gateway. Shown below is my test bonding config file. $ cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 IPADDR=192.168.1.12 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 USERCTL=no BOOTPROTO=none ONBOOT=yes Step 2. Modify eth0, eth1 and eth2 configuration as shown below. Comment out, or remove the ip address, netmask, gateway and hardware address from each one of these files, since settings should only come from the ifcfg-bond0 file above. Make sure you add the MASTER and SLAVE configuration in these files. $ cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes # Settings for Bond MASTER=bond0 SLAVE=yes $ cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none ONBOOT=yes USERCTL=no # Settings for bonding MASTER=bond0 SLAVE=yes $ cat /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes Step 3. Set the parameters for bond0 bonding kernel module. Select the network bonding mode based on you need, documented at http://unixfoo.blogspot.com/2008/02/network-bonding-part-ii-modes-of.html. The modes are

mode=0 (Balance Round Robin) mode=1 (Active backup) mode=2 (Balance XOR) mode=3 (Broadcast) mode=4 (802.3ad) mode=5 (Balance TLB) mode=6 (Balance ALB)

Add the following lines to /etc/modprobe.conf

# bonding commands alias bond0 bonding options bond0 mode=1 miimon=100 Step 4. Load the bond driver module from the command prompt. $ modprobe bonding Step 5. Restart the network, or restart the computer. $ service network restart or restart computer When the machine boots up check the proc settings. $ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.0.2 (March 23, 2006) Bonding Mode: adaptive load balancing Primary Slave: None Currently Active Slave: eth2 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth2 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:13:72:80: 62:f0

Look at ifconfig -a and check that your bond0 interface is active To verify whether the failover bonding works..

Do an ifdown eth0 and check /proc/net/bonding/bond0 and check the Current Active slave. Do a continuous ping to the bond0 ipaddress from a different machine and do an ifdown the active interface. The ping should not break.

TLBTransmit Load Balance ALBAdaptive Load balance

You might also like