Linux Port Bonding.

From Www

AKA port trunking, ...


Good Instructions

Here is a good link, that details how to do this on Ubuntu 7.10 (and 8.04)

http://www.astroshapes.com/information-technology/blog/archives/21-port-bonding-with-linux-ubuntu-server.html

My example

One bond with the two built-in interface on our hp server. (Basically following the above link.)


Install the software
sudo apt-get install ifenslave

Configure the kernel modules
sudo vi /etc/modprobe.d/arch/i386 


my /etc/modprobe.d/arch/i386 file

alias parport_lowlevel parport_pc

alias binfmt-0064 binfmt_aout

alias bond0 bonding
options bond0 mode=balance-alb miimon=100 max_bonds=1



Configure the interfaces
sudo vi /etc/network/interfaces


my /etc/network/interfaces file

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto bond0
#auto eth0

#iface eth0 inet static
# address 10.2.0.78
# netmask 255.255.255.0
# network 10.2.0.0
# broadcast 10.2.0.255
# gateway 10.2.0.1
# # dns-* options are implemented by the resolvconf package, if installed
# dns-nameservers 10.2.0.54 10.2.1.54
# dns-search ties2.net

iface bond0 inet static
address 10.2.0.78
netmask 255.255.255.0
network 10.2.0.0
broadcast 10.2.0.255
gateway 10.2.0.1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.2.0.54 10.2.1.54
dns-search ties2.net


Reboot!


This is what the interfaces look like with ifconfig (only one ethernet interface is connected)

user@amachine:~$ ifconfig 
bond0 Link encap:Ethernet HWaddr 00:18:fe:28:2c:78
inet addr:10.2.0.78 Bcast:10.2.0.255 Mask:255.255.255.0
inet6 addr: fe80::218:feff:fe28:2c78/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:135 errors:0 dropped:0 overruns:0 frame:0
TX packets:309 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26520 (25.8 KB) TX bytes:36585 (35.7 KB)

eth0 Link encap:Ethernet HWaddr 00:18:fe:28:2c:78
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:135 errors:0 dropped:0 overruns:0 frame:0
TX packets:309 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26520 (25.8 KB) TX bytes:36585 (35.7 KB)
Interrupt:16

eth1 Link encap:Ethernet HWaddr 00:18:fe:28:2c:79
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16373 (15.9 KB) TX bytes:16373 (15.9 KB)



More Links

See /usr/src/linux-source-2.6.15/Documentation/networking/bonding.txt  or where ever your Linux Kernel Source is.


http://www.howtoforge.com/network_bonding_ubuntu_6.10


http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/networking/bonding.txt


http://www.linuxhorizon.ro/bonding.html



Files (0)
 

Retrieved from "http://www.penguinsunbound.org/User:Goeko/Linux_Port_Bonding."

Accessed 1351 times.This page was last modified 23:20, 17 Jun 2008



Running DekiWiki-stable.