How to configure network bonding in CentOS Redhat Fedora
Posted May 12th, 2009 by gnulinux
Steps to configure network bonding in CentOS / Redhat / fedora
- It is not necessary but good to run lspci | grep Eth command to list your ethernet port details.
- setup ethernet channel bonding for redundant network connectivity. Add following lines in /etc/modprobe.conf
- Create a ifcfg-bond0, ifcfg-eth0 and ifcfg-eth1 config file as explained below to hold your bonding configuration
- after you finish configuration you need to restart network daemon(service)
/etc/rc.d/init.d/network restart
alias bond0 bonding
options bond0 mode=1 use_carrier=1 primary=eth0 miimon=100 downdelay=300 updelay=300
DEVICE=bond0
ONBOOT=yes
USERCTL=no
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.x.y
BROADCAST=192.168.x.255
NETWORK=192.168.x.0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
You can configure more then 1 bonded interface on same linux system.
-
Use MASTER=bond1 for bond1 if you have configured a second bonding interface, then add the following after the first bond (bond0) in /etc/modprobe.conf:
options bond1 -o bonding1 miimon=100 mode=1
How to find out mac addresses for bonded interfaces
-
Sometimes people ask this question and answer is very simple.
you can find out details of mac addresses from /proc/net/bonding/bondx OR /proc/net/[file/dir]for bonding