-
Mode 1 (active-backup)
Mode 1 places one of the interfaces into a backup state and will only make it active if the link is lost by the active interface. Only one slave in the bond is active at an instance of time. A different slave becomes active only when the active slave fails. This mode provides fault tolerance.
sudo vi /ete/sysconfig/network-scritpts/ifcfg-bond0
DEVICE=”bond0’’
BOOTPROTO=none
HARDWARE=
ONBOOT=yes
ip address =192.168.178.1
netmask=255.255.255.0
gateway=192.168.10.1
TYPE=’’Bond’’
Prefer interface Primary Slave
BONDING_OPTS=’’mode=1 miimon=100 primary=ens3’’
sudo vi /ete/sysconfig/network-scritpts/ifcfg-ens3
DEVICE=”ens3’
BOOTPROTO=none
HARDWARE=0c:85:e0:f3:ab:00
ONBOOT=yes
MASTER=bond0
#ip address =192.168.x.x
#netmask=255.255.255.0
#gateway=192.168.x.x
TYPE=’’Ethernet’’
sudo vi /ete/sysconfig/network-scritpts/ifcfg-ens4
DEVICE=”ens4’
BOOTPROTO=none
HARDWARE=0c:85:e0:f3:ab:01
ONBOOT=yes
MASTER=bond0
#ip address =192.168.x.x
#netmask=255.255.255.0
#gateway=192.168.x.x
TYPE=’’Ethernet’’
cat /proc/net/bonding/bond0