Ethernet Bonding – Ubuntu 12.10

* Install package
{{{
sudo apt-get install ifenslave-2.6
}}}
* Enable Kernel Module:
* `sudo nano /etc/modules`
* add `bonding` to the end (if not already contained in the file)
* Stop networking and load kernel module
{{{
sudo stop networking
sudo modprobe bonding
}}}
* Configure `/etc/network/interfaces`
{{{
# The loopback network interface
auto lo
iface lo inet loopback
###Adapter bonding for eth1 eth2 and eth4
auto bond0
iface bond0 inet static
address 192.168.69.100
netmask 255.255.255.0
gateway 192.168.69.254
dns-nameservers 8.8.8.8 8.8.4.4
post-up ifenslave bond0 eth1 eth2 eth4
pre-down ifenslave -d bond0 eth1 eth2 eth4
}}}
* Restart networking
{{{
sudo service networking restart
}}}
* Verify everything looks good (give it a few minutes). You should see data on all interfaces, and it should add up to the amount of data on the bond; but may be unbalanced (mainly with the RX bytes) between interfaces depending on the clients accessing it.
{{{
dlasley@server:~/$ ifconfig
bond0 Link encap:Ethernet HWaddr 90:2b:34:12:5a:81
inet addr:192.168.69.100 Bcast:192.168.69.255 Mask:255.255.255.0
inet6 addr: fe80::922b:34ff:fe12:5a81/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:210521680 errors:0 dropped:0 overruns:0 frame:0
TX packets:143109863 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:159188155519 (159.1 GB) TX bytes:192498759647 (192.4 GB)

eth1 Link encap:Ethernet HWaddr 90:2b:34:12:5a:81
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:118078172 errors:0 dropped:0 overruns:0 frame:0
TX packets:47787091 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103358906380 (103.3 GB) TX bytes:64339147118 (64.3 GB)
Interrupt:17 Memory:fd6e0000-fd700000

eth2 Link encap:Ethernet HWaddr 90:2b:34:12:5a:81
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:130317 errors:0 dropped:0 overruns:0 frame:0
TX packets:47599095 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25088064 (25.0 MB) TX bytes:64081786517 (64.0 GB)
Interrupt:17 Memory:fd6a0000-fd6c0000

eth4 Link encap:Ethernet HWaddr 90:2b:34:12:5a:81
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:92313191 errors:0 dropped:0 overruns:0 frame:0
TX packets:47723677 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:55804161075 (55.8 GB) TX bytes:64077826012 (64.0 GB)
}}}


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *