UPDATE: This works only with Debian Etch, cause in Lenny update-modules is deprecated!
If you want to enable bonding in Debian, for example to have high-availability of your network interfaces, these are the quick steps you have to do:
# apt-get install ifenslave-2.6
edit /etc/network/interfaces
to look like this:
auto bond0
iface bond0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
up /sbin/ifenslave bond0 eth0 eth1
then, add this line to /etc/modprobe.d/aliases
:
alias bond0 bonding
and issue
# update-modules
Stop the old eth0 interface with
# ifconfig eth0 down
(do not use ifdown cause it reads /etc/network/interfaces that no long knows anything about eth0)
and finally start the new bonded interface with
# ifup bond0
OR
# /etc/init.d/networking restart