Powered By Blogger

Tuesday, May 10, 2011

Configuring Linux Bonding

Switch:

Connect cables to the switch
Make link-aggregate active in the switch for the ports

Server:

1. Create the configuration file for bondX (where X is a number, we'll use 0 to explain the steps forward)
vi /etc/sysconfig/network-scripts/ifcfg-bond0

2. Add the fallowing content to it, update IP with correct information:
DEVICE=bond0
IPADDR=192.10.10.51
NETWORK=192.10.10.32
NETMASK=255.255.255.224
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

3. Update all configuration files for the network interface that will be used by the new bond, using the fallowing template (Update the red text with the right values).
for eth0:
vi /etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
HWADDR=00:34:34:D8:45:89
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

4. Prepare the drivers adding the fallowing lines to /etc/modprobe.conf:
alias bond0 bonding
options bond0 mode=802.3ad miimon=100
5. Load bonding module
# modprobe bonding mode=802.3ad miimon=100
6. Restart network
# service network restart
7. Test the bond
ping -I bond0 192.10.10.12

No comments:

Post a Comment

Welcome to the UNIX world