Ethernet bonding in CentOS 7

Just a few quick notes about how I configured Ethernet bonding on CentOS 7. I want to write it down because it was subtly different from what I had on CentOS 6, so I’ll have a reference for the future ;)

/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
TYPE=Bond
BONDING_MASTER=yes
IPADDR=192.168.0.100
PREFIX=24
GATEWAY=192.168.0.1
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
USERCTL=no
BONDING_OPTS="mode=1 miimon=100 downdelay=300 updelay=30000 primary=enp2s0f0"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_PEERDNS=no
IPV6_PEERROUTES=no
IPV6_FAILURE_FATAL=no
DNS1=192.168.0.251
DNS2=192.168.0.252
DNS3=192.168.0.253
DOMAIN=stardata.lan

/etc/sysconfig/network-scripts/ifcfg-enp2s0f0

NAME=enp2s0f0
DEVICE=enp2s0f0
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED="no"
USERCTL="no"
MASTER="bond0"
SLAVE="yes"

/etc/sysconfig/network-scripts/ifcfg-enp4s0f0

NAME=enp4s0f0
DEVICE=enp4s0f0
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED="no"
USERCTL="no"
MASTER="bond0"
SLAVE="yes"

For more info and different methods to setup the bonding (nmtui is actually pretty cool), check the official RHEL7 documentation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s