CentOS 7.x network bonding

From Notes_Wiki
Revision as of 14:59, 8 July 2018 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>CentOS_7.x_network_management|CentOS 7.x network management</yambe:breadcrumb> =CentOS 7.x network bonding= It is possible to combine to NICs in a single bo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>CentOS_7.x_network_management|CentOS 7.x network management</yambe:breadcrumb>

CentOS 7.x network bonding

It is possible to combine to NICs in a single bond interface for redundancy, performance, etc. reasons. To configure bond on top of two physical interfaces use following steps:

  1. Identify two identical interfaces for creating bond. These interfaces should have same speed and should be connected to same VLAN(s).
  2. Go to /etc/sysconfig/network-scripts/ folder
  3. Create 'ifcfg-bond0' with contents similar to:
    DEVICE=bond0
    NAME=bond0
    TYPE=Bond
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=192.168.122.150
    NETMASK=255.255.255.0
    GATEWAY=192.168.122.1
    BONDING_MASTER=yes
    BONDING_OPTS="miimon=0 updelay=0 downdelay=0 mode=4"
    where mode=4 refers to 802.3ad or LACP. For other types of mode such as balance-rr, active-backup, balance-xor, etc. refer to reference links at the end
  4. Update interface configuration files to depend on bond using:
    DEVICE=ens0
    ONBOOT=yes
    TYPE=Ethernet
    BOOTPROTO=none
    MASTER=bond0
    SLAVE=yes
    where ens0 is the name of one of the two ethernet interfaces to be added to bond
  5. Do the same for second ethernet interface
  6. Restart network for settings to take effect:
    systemctl restart network


Refer:



<yambe:breadcrumb>CentOS_7.x_network_management|CentOS 7.x network management</yambe:breadcrumb>