We present and write attractive Tech blog posts
First up your both networks that you want to bond:
ifup eth1
ifup eth2
Create the bond file ( ifcfg-bond0 ) and specify the ip address, netmask & gateway:
nano /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.18.200
NETMASK=255.255.255.0
GATEWAY=192.168.18.1
TYPE=Bond
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
Edit the files of eth1 & eth2 and make sure you enter the master and slave entry, as shown below:
nano /etc/sysconfig/network-scripts/ifcfg-eth1
Please read /usr/share/doc/initscripts-*/sysconfig.txt
for the documentation of these parameters.
DEVICE=eth1
TYPE=Ethernet
HWADDR=08:00:27:21:68:dc
NM_CONTROLLED=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
nano /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
TYPE=Ethernet
NM_CONTROLLED=no
ONBOOT=yes
HWADDR=08:00:27:08:0a:be
MASTER=bond0
SLAVE=yes
Create the Bond file(bonding.conf):
nano /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond) mode=0 miimon100
Different Modes used in bonding.conf file
.
balance-rr or 0 — round-robin mode for fault tolerance and load balancing.
active-backup or 1 — Sets active-backup mode for fault tolerance.
balance-xor or 2 — Sets an XOR (exclusive-or) mode for fault tolerance and load balancing.
broadcast or 3 — Sets a broadcast mode for fault tolerance. All transmissions are sent on all slave interfaces.
802.3ad or 4 — Sets an IEEE 802.3ad dynamic link aggregation mode.
Creates aggregation groups that share the same speed & duplex settings.
balance-tlb or 5 — Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.
balance-tlb or 5 — Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.
Now Restart the network:
Service Service network restart
Now bond 0 is you bonded interface and you can check this by:
Ifconfig bond0
Verify the Status of bond interface
cat /proc/net/bonding/bond0
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 08:00:27:21:68:dc
Slave queue ID: 0
Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 08:00:27:08:0a:be
Slave queue ID: 0