Ubuntu bonding

(0 comments)

If we need increase Bandwidth of the server we need to configure bond in ethernet card Bonding also calls port trunking this is combination someethernet card in one link with one IP address, for high- loaded systems:

  • load balancing,
  • high-availability,
  • maximum throughput,
  • high-availability

or combinations of these modes. We will setup in Ubunti 12.04 LTS

Ubuntu 12.04.4 LTS Installation we need to install ifenslave-2.6 ifenslave-2.6 used turn-off-turn-on slave ethernet cards in bond

sudo apt-get install ifenslave-2.6

Configuration ethernet cards before configuring eth cards in bond, we need to check exist module bonding in core system and make autoload module:

sudo vi /etc/modules


# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored
loop
lp
rtc
bonding

stop networking: sudo /etc/init.d/networking stop

sudo /etc/init.d/networking stop

load module bonding

sudo modprobe bonding

now we are ready to set up our ethernet cards:

sudo vim /etc/network/interfaces

for example, we have two eth card and we need bond its. eth0 and eth1 for bonding in mode ‘load balancing’.

auto eth0
iface eth0 inet manual
bond-master bond0
auto eth1
iface eth1 inet manual
bond-master bond0
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address 192.168.1.10
gateway 192.168.1.1
netmask 255.255.255.0
bond-mode balance-rr
bond-miimon 100
bond-slaves eth0 eth1

start networking:

sudo /etc/init.d/networking start

verify ethernet card bond0:

$cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
 Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:6a:65:f5
Slave queue ID: 0
 Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:6a:65:f4
Slave queue ID: 0

Everything are OK. --- Original here

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required