Setting up Channel Bonding on Debian

From KoshWiki

Jump to: navigation, search

Contents

Description

This guide is my experiences with the instructions from Jérôme Warnier's guide.[1]

Installing Packages

Run apt-get to install the ifenslave package

# apt-get install ifenslave-2.6
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  ifenslave-2.6
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 10.6kB of archives.
After unpacking 41.0kB of additional disk space will be used.
Get:1 http://ftp.au.debian.org stable/main ifenslave-2.6 1.1.0-4 [10.6kB]
Fetched 10.6kB in 2s (3965B/s)
Selecting previously deselected package ifenslave-2.6.
(Reading database ... 10381 files and directories currently installed.)
Unpacking ifenslave-2.6 (from .../ifenslave-2.6_1.1.0-4_i386.deb) ...
Setting up ifenslave-2.6 (1.1.0-4) ...

Setup your Interfaces

iface bond0 inet static
        address 10.10.199.5
        netmask 255.255.255.0
        network 10.10.199.0
        up /sbin/ifenslave bond0 eth0
        up /sbin/ifenslave bond0 eth1

Setting up the Modules

edit /etc/modprobe.d/arch/i386 and add

alias bond0 bonding

once you have added that, run the following to update your modules files.

# update-modules

Finished

now running ifconfig, should show you something like this.

# ifconfig
bond0     Link encap:Ethernet  HWaddr 00:14:6C:86:62:8E
          inet addr:10.10.199.1  Bcast:10.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:234 (234.0 b)  TX bytes:834 (834.0 b)

eth1      Link encap:Ethernet  HWaddr 00:14:6C:86:62:8E
          inet6 addr: fe80::214:6cff:fe86:628e/64 Scope:Link
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:78 (78.0 b)  TX bytes:456 (456.0 b)
          Interrupt:169 Base address:0x5000

eth2      Link encap:Ethernet  HWaddr 00:14:6C:86:62:8E
          inet6 addr: fe80::214:6cff:fe86:628e/64 Scope:Link
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:156 (156.0 b)  TX bytes:378 (378.0 b)
          Interrupt:201 Base address:0x7000

Troubleshooting

bond0: No Such Device

If you are seeing something similar to the following, then the modules file is probably not correct.

# /etc/init.d/networking restart
Setting up IP spoofing protection: rp_filter.
Reconfiguring network interfaces...ifup: interface lo already configured
SIOCSIFADDR: No such device
bond0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
bond0: ERROR while getting interface flags: No such device
Failed to bring up bond0.
done.

In my example, I wrote "aliad" instead of "alias"

# modprobe bond0
WARNING: /etc/modprobe.d/arch-aliases line 6: ignoring bad line starting with 'aliad'
FATAL: Module bond0 not found.

After correcting the spelling, remember to run

# update-modules


References

  1. BeezNest - Jérôme Warnier - HOWTO Setup Bonding Ethernet on Debian with a 2.6 kernel
Personal tools