Omnipresent IT Solutions Pvt Ltd

Saturday, January 7, 2012

Channel Bonding in Ubuntu by Combining Wired and Wireless networking

Channel Bonding

Channel bonding allows to combine several network ports to a single group.Virtual NIC interface created provides increased bandwidth by merging the bandwidth of the individual ports/NICs. It's primary use is to increase a network link speed beyond the limits of any one single cable or port. Although It can also be used for failover, if one link dies all traffic to and from the machine should be routed to the remaining links.



Configuration

1. Need to install ifenslave
sudo apt-get install ifenslave

2.Edit /etc/network/interfaces and enter the following details

auto bond0
iface bond0 inet static
address 192.168.2.2
gateway 192.168.2.1
netmask 255.255.255.0
bond-slaves eth0 wlan0
bond_mode 0
bond_miimon 100

auto eth0
iface eth0 inet manual


3. Restart Networking

sudo /etc/init.d/networking restart

4. You can have different modes, change the value of bond_mode

mode=0 (balance-rr) Round-robin policy

mode=1 (active-backup)Active-backup policy

mode=2 (balance-xor)XOR policy

mode=3 (broadcast)Broadcast policy

mode=4 (802.3ad)IEEE 802.3ad Dynamic link aggregation.

mode=5 (balance-tlb) Adaptive transmit load balancing

mode=6 (balance-alb) Adaptive load balancing

5. You can check bond link information

root@opis-nb1:~# cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.7.0 (June 2, 2010)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:1e:ec:5f:ca:2b
Slave queue ID: 0

Slave Interface: wlan0
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:22:69:7e:d0:92
Slave queue ID: 0

No comments: