Wednesday 20 May 2015

Port Bonding and VLAN - CentOS 6

Create the file /etc/modprobe.d/bonding.conf, add the following lines:
alias bond0 bonding
options bond0 mode=1 miimon=100
Create the bond file /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=1"
TYPE=Unknown
IPV6INIT=no
Create the VLAN bond file /etc/sysconfig/network-scripts/ifcfg-bond0.35
DEVICE=bond0.35
BOOTPROTO=none
TYPE=Ethernet
ONBOOT=yes
VLAN=yes
NM_CONTROLLED=no
IPADDR=x.x.35.13
PREFIX=24
GATEWAY=x.x.35.250
NM_CONTOLLED=no
USERCTL=no
Edit the interface files ifcfg-em1 and ifcfg-em2:
DEVICE="em1"
BOOTPROTO="none"
HWADDR="xx:xx:xx:xx:xx:7A"
IPV6INIT="yes"
MTU="1500"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="90e968f4-xxxx-xxxx-xxxx-0a188c6cc9e8"
MASTER=bond0
SLAVE=yes
USERCTL=no
--------------------------------------------------------------------------
DEVICE=em2
HWADDR=xx:xx:xx:xx:xx:7C
TYPE=Ethernet
UUID=4bc7043a-xxxx-xxxx-xxxx-cd5f6f04e0f7
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no