a bonded interface

stone carving of two slaves

introduction

Two ethernet interfaces are combined to make one bonded interface.

The LIC has many network interfaces. Many are paired for HA. The host ifw01 has two interfaces going through two switches to get to one web server. This was built in the procedure for bonding eth1 and eth2 on xcl01.

Ethernet interfaces are called slaves.

  • Bonded interfaces "bond0" enslaves the two real interfaces "eth2" and "eth3".

from 11.2 High Availability in a Multiple Switch Topology With multiple switches, the configuration of bonding and the network changes dramatically. In multiple switch topologies, there is a trade off between network availability and usable bandwidth. Below is a sample network, configured to maximize the availability of the network:

                |                                     |
                |port3                           port3|
          +-----+----+                          +-----+----+
          |          |port2       ISL      port2|          |
          | switch A +--------------------------+ switch B |
          |          |                          |          |
          +-----+----+                          +-----++---+
                |port1                           port1|
                |             +-------+               |
                +-------------+ host1 +---------------+
                         eth0 +-------+ eth1

what it is

This hides some of the complicated bits of the network from the OS (Operating System). Curiously, creating a bonded interface involves a lot of talk about bonding and slavery.
LIC topology: bond eth1 and eth2 on xcl01
interfaces eth1 and eth2 bond0
computer (xcl01)
eth1 (biz01)
eth2 (biz02)
eth3 (adm01)
eth0
eth1 (200.0.0.2)
eth2 (200.0.0.33)
eth3 (200.0.0.65)
eth0
bond0 (200.0.0.1)
eth3 (200.0.0.65)

These bits make bonding go.

  • A kernel module. This is called the bonding driver and does the hard work.
  • A configuration file. This tells the kernel module what to do.
  • A bonding device (bond0). this looks like a normal Ethernet network device to the kernel.
  • two slave devices (eth1 and eth2). The kernel module sends out the packets via the slave devices.

The bonding driver module is included in Debian Etch. The kernel options file shows the option and the module is already loaded.

xcl01:~# grep -i bonding /boot/config-2.6.18-5-686
CONFIG_BONDING=m
xcl01:~#
xcl01:~# modprobe --list | grep bonding
/lib/modules/2.6.18-5-686/kernel/drivers/net/bonding/bonding.ko
xcl01:~#

The bonding driver keeps an eye on the state of each interface. If one goes down the driver stops using it. Messages like this appear in /var/log/messages.

Nov 15 09:43:23 xcl01 kernel: bonding: bond0: link status down for idle 
 interface eth2, disabling it in 200 ms.
Nov 15 09:43:24 xcl01 kernel: bonding: bond0: link status definitely down for 
 interface eth2, disabling it
When the interface feels better the bonding driver makes it feel loved by using it again.

application instructions

The full story of the The Linux bonding driver is described in the Linux Ethernet Bonding Driver HOWTO. There is a forum on the Sourceforge site for help.

application files

machine

configuration

product

report

Messages are written to the OS activity log /var/log/messages.

issalarg@xcl01:~$ more /var/log/messages
...
Oct 30 11:58:30 xcl01 kernel: [10828.205613] Ethernet Channel Bonding Driver: v3.2.5 (March 21, 2008)
Oct 30 11:58:30 xcl01 kernel: [10828.205622] bonding: ARP monitoring set to 60 ms, validate none, with 1 target(s): 200.0.0.10
Oct 30 11:58:30 xcl01 kernel: [10828.272311] ADDRCONF(NETDEV_UP): bond0: link is not ready
Oct 30 11:58:30 xcl01 kernel: [10828.332453] bonding: bond0: enslaving eth1 as an active interface with an up link.
Oct 30 11:58:30 xcl01 kernel: [10828.332639] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
Oct 30 11:58:30 xcl01 kernel: [10828.335348] eth2:  setting full-duplex.
Oct 30 11:58:30 xcl01 kernel: [10828.336333] e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex
Oct 30 11:58:30 xcl01 kernel: [10828.336522] bonding: bond0: enslaving eth2 as an active interface with an up link.
Oct 30 11:58:30 xcl01 kernel: [10828.388032] bonding: bond0: interface eth1 is now down.
Oct 30 11:58:30 xcl01 kernel: [10828.388048] bonding: bond0: interface eth2 is now down.
Oct 30 11:58:30 xcl01 kernel: [10828.388063] bonding: bond0: now running without any active interface !
Oct 30 11:58:30 xcl01 kernel: [10828.448071] bonding: bond0: link status definitely up for interface eth1, <6>bonding: bond0: first active interface up!
Oct 30 11:58:30 xcl01 kernel: [10828.921227] bond0: duplicate address detected!
...
[planetlarg@test planetlarg]$ action
reaction

what it isn't

content

where it is

content

history

content