Tuesday, August 6, 2013

Configure network bonding Link Aggregation using LACP under RHEL CentOS OEL 5.9

I wrote this from the work on OEL 5.9 64 bit.

The server has 2 physical NICs bonding into 1 IP address.

1.Config the initial bonding configuration

1.1 eth0

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

# Emulex Corporation OneConnect 10Gb NIC (be3)
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no


1.2 eth1
# cat /etc/sysconfig/network-scripts/ifcfg-eth1

# Emulex Corporation OneConnect 10Gb NIC (be3)
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no


1.3 bond0
# cat /etc/sysconfig/network-scripts/ifcfg-bond0

# Bonding Network
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.144.244.14
NETMASK=255.255.255.0
NETWORK=10.144.244.0
GATEWAY=10.144.244.1
TYPE=Unknown
IPV6INIT=no


2.Config Bonding modules

2.1 Bonding settings

# cat /etc/modprobe.conf

alias scsi_hostadapter shpchp
alias eth0 be2net
alias eth1 be2net
alias scsi_hostadapter1 cciss
alias scsi_hostadapter2 usb-storage
alias bond0 bonding
options bond0 miimon=100 mode=4 lacp_rate=1


2.2 Load the bonding modules into the “running” kernel

# modprobe bond0
# lsmod | grep bond
bonding 126649 0


3.Configure your network settings
# cat /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=DB01.milliondollarserver.com


4.Restart the network stack
# service network restart

5.Check the routing configuration
# route -n

6.Check bonding stack for errors
# cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.4.0-2 (October 7, 2008)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 1
Actor Key: 33
Partner Key: 1
Partner Mac Address: 00:00:00:00:00:00

Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: e4:11:5b:e0:55:b8
Aggregator ID: 1

Slave Interface: eth1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: e4:11:5b:e0:55:bc
Aggregator ID: 2


Note:The most important line is “LACP rate: fast” make sure that you can see it in your output

10 comments:

  1. As per the output in step #6 your both the slaves are not participating in the bonding. eth1 has different Aggregator ID than the active Aggregator, also active Aggregator only shows 1 port in the info.

    ReplyDelete
  2. The method describe here is deprecated. All mode options belong into ifcfg-bond0 etc. - no modules config is nessesary. Only that way you can have multiply bonds with different modes.

    ReplyDelete
  3. Hi there, You've done an excellent job. I will certainly digg it and personally recommend to my friends.
    I am confident they'll be benefited from this website.

    ReplyDelete
  4. I'll right away clutch your rss feed as I can not in finding
    your e-mail subscription link or newsletter service.
    Do you've any? Kindly let me recognise so that I may just
    subscribe. Thanks.

    ReplyDelete
  5. We stumbled over here different website and thought I might
    check things out. I like what I see so now i am following you.
    Look forward to going over your web page yet again.

    ReplyDelete
  6. My brother recommended I might like this web site.
    He was entirely right. This post actually made my day.

    You can not imagine just how much time I had spent for this info!
    Thanks!

    ReplyDelete
  7. For the reason that the admin of this website is working, no
    uncertainty very quickly it will be famous, due to its quality contents.

    ReplyDelete
  8. Fastidious replies in return of this issue with solid arguments
    and telling the whole thing on the topic of that.

    ReplyDelete
  9. Hello just wanted to give you a brief heads up and let you know a few of the pictures aren't loading properly.
    I'm not sure why but I think its a linking issue.
    I've tried it in two different web browsers and both show the
    same results.

    ReplyDelete
  10. Yes, you are right.
    I removed few old pictures last month..
    I feel none read it any more.

    Thanks for the heads up.

    Best Regards,

    ReplyDelete