Tuesday, July 1, 2014

How to Bonding

The most server has two or more NICs. It's a good practice configure those network adapter in Bonding Mode.

The Bonding mode works on this way:

You configure an extra non-physical card called normally bond0. The bond0 is a master card and has two or more NIC slaves. When physically one NIC no responding, the another one respond and secure High Available Network Services.

This is my personal guide to configure Bonding in RHEL 6. Enjoy it!


Warning: Make copy backup for files when you edit it.

Step 1) Disable ipv6:

    vim /etc/modprobe.d/disable_ipv6.conf

    Delete all lines, and put:

    options ipv6 disable=1

    And disable service too:

    chkconfig ip6tables off

    :wq

Step 2) Change ethN interface config file (for each eth into the bonding):

    vim /etc/sysconfig/network-scripts/ifcfg-ethN

    DEVICE="ethN"
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    NM_CONTROLLED="no"

    :wq

Step 3) Edit ifcfg-bondN file:

    vim /etc/sysconfig/network-scripts/ifcfg-bondN

    DEVICE="bond0"
    IPADDR=10.164.5.227
    NETMASK=255.255.255.0
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    NM_CONTROLLED="no"
    BONDING_OPTS="mode=1 miimon=100"
    :wq

Step 4) Restart network service:

    service network restart

Step 5) Check bonding status:

    cat /proc/net/bonding/bondN

I hope that this first guide will be useful.

Regards
Jesus Alberto Ruiz

No comments:

Post a Comment