Network Bonding: How to

Ideal place for discussions related to Linux/Windows server security, Apache, MySQL, MS SQL and PHP, including tutorials and questions.
hr-ethadmin
Site Admin
Posts: 67
Joined: Fri May 31, 2013 1:04 pm

Network Bonding: How to

Postby hr-ethadmin » Sat Jun 01, 2013 2:18 am

Bonding: Linux allows binding of multiple network interfaces into a single channel/NIC using special kernel module called bonding. Network bonding refers to the combination of network interfaces on one host for redundancy and/or increased throughput. Linux network Bonding is creation of a single bonded interface by combining 2 or more Ethernet interfaces. This helps in high availability of your network.

1: Create a Bond0 Configuration File
# vi /etc/sysconfig/network-scripts/ifcfg-bond0

Append the following linest:

DEVICE=bond0
IPADDR=1.1.1.1
NETWORK=1.1.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

You need to replace IP address with your actual setup. Save and close the file.

2: Modify eth0 and eth1 config files

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

Modify/append directive as follows:
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Open eth1 configuration file using vi text editor, enter:
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
Make sure file read as follows for eth1 interface:
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Save and close the file.

3: Load bond driver/module

Make sure bonding module is loaded when the channel-bonding interface (bond0) is brought up. You need to modify kernel modules configuration file:# vi /etc/modprobe.conf
Append following two lines:alias bond0 bonding
options bond0 mode=balance-alb miimon=100

4: Test configuration

# modprobe bonding

Restart the networking service in order to bring up bond0 interface, enter:
# service network restart

Make sure everything is working. Type the following cat command to query the current status of Linux kernel bounding driver, enter:

# cat /proc/net/bonding/bond0

Return to “System Security”

Who is online

Users browsing this forum: No registered users and 2 guests