Bonding Network Interface (LACP) - Linux

Permanently deleted user -

This article describes the setup and configuration of how to bond Ethernet devices.

Bonding can be done on almost every Linux distribution, this article assumes you are on a RedHat/CentOS based system.

Create a channel bonding interface

Create a new (master) interface configuration file: /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
TYPE=Bond
NAME=bond0
BONDING_MASTER=yes
BOOTPROTO=none
ONBOOT=yes
MTU=9000
IPADDR=100.112.10.100
PREFIX=24
GATEWAY=100.112.10.1
NM_CONTROLLED=no
BONDING_OPTS="mode=4 miimon=100 lacp_rate=1 updelay=20000"

Add slave device(s) to the bond

NOTE: Each server uses a slightly different naming convention, take note of the interfaces you are bonding.  

/etc/sysconfig/network-scripts/ifcfg-ens1f0

DEVICE=ens1f0
TYPE=Ethernet
NAME=ens1f0
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
IPV6INIT=no

/etc/sysconfig/network-scripts/ifcfg-ens1f1

DEVICE=ens1f1
TYPE=Ethernet
NAME=ens1f1
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no

Restart the interfaces

ifdown ens1f0 | ifup ens1f0
ifdown ens1f1 | ifup ens1f1
ifdown bond0 | ifup bond0

Or, reboot the system

reboot

Check the status of the bonding interface

cat /proc/net/bonding/bond0

 

 

Original Article used for RedHat Systems:

This article describes the setup and configuration of how to bond Ethernet devices.

Bonding can be done on almost every Linux distribution, this article assumes you are on a RedHat based system.

Create a channel bonding interface

Create a new (master) interface configuration file: /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
NM_CONTROLLED=no

Add slave device(s) to the bond

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

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

/etc/sysconfig/network-scripts/ifcfg-eth1

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

Add bonding module to the kernel

Create configuration file /etc/modprobe.d/bonding.conf

alias bond0 bonding
options bond0 miimon=100 mode=802.3ad

Reboot and check config

Reboot the server and verify that the bonding modules has been loaded

cat /proc/net/bonding/bond0

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.