how to configure bond interface in centos 7 | network bonging | network timing

how to configure bond interface in centos 7 | network bonging | network timing

Bonding is a method of combining a multiple physical interface into single logical interface. It provide a high availability and redundancy.

Type of bonding

mode=0 (balance-rr)  Round-robin : It the default mode. provides load balancing and fault tolerance.
mode=1 (active-backup) : Active-backup policy: only one slave in the bond is active when the active slave fails other one become active. This mode provides fault tolerance.
mode=2 (balance-xor) : XOR policy:  This mode provides load balancing and fault tolerance.
mode=3 (broadcast)  Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.
mode=4 (802.3ad)  : IEEE 802.3ad Dynamic link aggregation that share the same speed and duplex settings.
mode=5 (balance-tlb) : Adaptive transmit load balancing
mode=6 (balance-alb) : Adaptive load balancing:


OS = CentOS 7
Minimum Interface = 2

ip a


Here we have three interface and we will use a eth1 and eth2 for creating a bond

Step 1 :

Load bonding module

modprobe --first-time bonding

Bonding module info

modinfo bonding

configure bond interface step by step, network timing,  bonding interface, bond, bonding,  bond0, bonding in linux, linux tutorial, linux, centos, linuxtopic, lokesh
Step 2:

Create bond interface  

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

TYPE=bond
BOOTPROTO=static
NAME=bond0
DEVICE=bond0
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=4 lacp_rate=1"
IPADDR=172.17.20.111
NETMASK=255.255.0.0
GATEWAY=172.17.0.1
DNS1=8.8.8.8

configure bond interface step by step, network timing,  bonding interface, bond, bonding,  bond0, bonding in linux, linux tutorial, linux, centos, linuxtopic, lokesh

Here we configure 802.3ad  ( ”mode 4” )  IEEE 802.3ad Dynamic link aggregation,
BONDIGN_OPTS=”mode 4”

Note: interface name like bondX, here X is number so we can create first bond interface like bond0

Step 3:

Add Physical interface in networking bonding ( bond0 )

A: eth1

vi  /etc/sysconfig/network-scripts/ifcfg-eth1

TYPE=Ethernet
BOOTPROTO=static
NAME=eth1
DEVICE=eth1
ONBOOT=yes
MASTER=bond0
SLAVE=yes

configure bond interface step by step, network timing,  bonding interface, bond, bonding,  bond0, bonding in linux, linux tutorial, linux, centos, linuxtopic, lokesh

B: eth2

vi  /etc/sysconfig/network-scripts/ifcfg-eth2

TYPE=Ethernet
BOOTPROTO=static
NAME=eth2
DEVICE=eth2
ONBOOT=yes
MASTER=bond0
SLAVE=yes

configure bond interface step by step, network timing,  bonding interface, bond, bonding,  bond0, bonding in linux, linux tutorial, linux, centos, linuxtopic, lokesh

Step 4:

Create bond interface  

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

TYPE=Ethernet
BOOTPROTO=static
NAME=eth1
DEVICE=eth1
ONBOOT=yes
MASTER=bond0
SLAVE=yes

Restart network service

systemctl restart network

Step 5:

Check bond0 interface

cat /proc/net/bonding/bond0

ifconfig bond0


ifconfig eth1ifconfig eth2



Thanks

Your Support is valuable for us so I request you to please comment, share and  like this post.

www.linuxtopic.com
Latest
Previous
Next Post »