How to create a bonded ethernet interface using Linux

This article has a sample configuration to create a bonded ethernet interface.

There are three configuration files of note in this folder that has to be present on a Red Hat compatible system:

/etc/sysconfig/network-scripts

The files are related to the bond and the two ethernet cards, a total of three. All three must be present.

The bond file

The bond file will contain a name and the actual IP address:

#cat ifcfg-bond0
DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
IPADDR=a.b.c.d
PREFIX=29
GATEWAY=a.b.c.e
ONBOOT=yes
BOOTPROTO=none
BONDING_OPTS=”mode=4 miimon=100 lacp_rate=1″

The ethernet 1 file

#cat ifcfg-enp9s0f0
HWADDR=”aa:bb:cc:dd:ee:ff”
TYPE=”Ethernet”
BOOTPROTO=”none”
DEFROUTE=”yes”
PEERDNS=”yes”
PEERROUTES=”yes”
IPV4_FAILURE_FATAL=”no”
IPV6INIT=”yes”
IPV6_AUTOCONF=”yes”
IPV6_DEFROUTE=”yes”
IPV6_PEERDNS=”yes”
IPV6_PEERROUTES=”yes”
IPV6_FAILURE_FATAL=”no”
NAME=”enp9s0f0″
UUID=”594a66c7-6311-4197-8557-dea062a6de2e”
ONBOOT=”yes”
MASTER=bond0
SLAVE=yes

The ethernet 2 file

# cat ifcfg-enp9s0f1
HWADDR=”aa:bb:cc:dd:ee:gg”
TYPE=”Ethernet”
BOOTPROTO=”none”
DEFROUTE=”yes”
PEERDNS=”yes”
PEERROUTES=”yes”
IPV4_FAILURE_FATAL=”no”
IPV6INIT=”yes”
IPV6_AUTOCONF=”yes”
IPV6_DEFROUTE=”yes”
IPV6_PEERDNS=”yes”
IPV6_PEERROUTES=”yes”
IPV6_FAILURE_FATAL=”no”
NAME=”enp9s0f1″
UUID=”920f43f9-60f0-42f5-aff8-278f62c307cd”
ONBOOT=”yes”
MASTER=bond0
SLAVE=yes

There you go! This should be enough to get you going.

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top