HOW TO CONFIGURE ACTIVE/BACKUP BONDING IN RED HAT

HOW TO CONFIGURE ACTIVE/BACKUP   BONDING IN RED HAT


You will need identify the interfaces that you need to configure on the server and confirm with Networking the configuration for those port.

In our case I will configure the interfaces em4 and em5 in bonding, with a bond0 and after that I will configurate a bond0.23 refering the VLAN 23 over the bonding (bond0)

The configuration for the interfaces is the following:

#vi/etc/sysconfig/network-scripts/ifcfg-em4
DEVICE=em4
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static


#vi /etc/sysconfig/network-scripts/ifcfg-em5
DEVICE=em5
TYPE=Ethernet
MASTER=bond0
ONBOOT=yes
SLAVE=yes
NM_CONTROLLED=no
BOOTPROTO=static


After defining the configuration in the interfaces, I will need to define the bonding

#vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
BONDING_OPTS="mode=1 miimon=50 primary=em4"


The BONDING_OPTS, defines the following:
mode=1 is active/backup
miimon=50 Specifies (in milliseconds) how often MII link monitoring occurs. (is used to verify that the NIC is active)
primary=em4 Specifies the primary interface in active mode
 
Finally you can define the interface bond0.23, that specifies the vlan 23 with the information below (IP,Netmask and GW)


# cat /etc/sysconfig/network-scripts/ifcfg-bond0.23
DEVICE=bond0.23
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
VLAN=yes
IPADDR=192.19.23.200
PREFIX=24
GATEWAY=192.19.23.1


Restart the network services

# service network restart

#ifconfig -a
bond0     Link encap:Ethernet  HWaddr
          inet6 addr: fe80:: Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:6754318 errors:0 dropped:0 overruns:0 frame:0
          TX packets:126045 errors:0 dropped:0 overruns:0 carrier:0

bond0.23  Link encap:Ethernet  HWaddr
          inet addr:192.19.23.200  Bcast:192.19.23.255  Mask:255.255.255.0
          inet6 addr: fe80::xxxxxxxxxxxxxx Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:5215741 errors:0 dropped:0 overruns:0 frame:0

And you can reboot the server in order to check that bonding is starting with no issues

# init 6

Regards
Roger

Comments