Skip to content

Status of bonding support

Vincent Bernat edited this page Apr 30, 2011 · 1 revision

Bonding support

lldpd supports bonding interfaces. Bonding is the link aggregation mechanism for Linux. You take several interface and you turn into a logical interface with more bandwidth, more reliability or load-balancing (or a mix). LLDP is a L2 protocol. We need to send and receive packets from real interfaces, not logical interfaces. However, Linux made this task a bit difficult.

Here are the difficulties:

  1. unable to listen to real interface for packets (need to listen to logical interface)
  2. unable to determine the real interface for a packet received on the logical interface
  3. unable to get packet if the real interface is passive
  4. on Linux, the bonding interface uses the same MAC address as one of the slaves; moreover, all slaves take this address too

To solve the last difficulty, lldpd sends the frames using the real MAC address of the interface. Moreover, if the slave is inactive, address 00:00:00:00:00:00 is used to avoid to confuse switches by using the same MAC address for two different ports (the active one and the inactive one for example, this happens when the active interface is the second interface: the bond device keeps the same MAC address which is the address of the first interface whose real address matches the current address of the second active interface).

2.6.27

Starting from 2.6.27, thanks to 3 patches from Joe Eykholt, we can now listen to real interfaces. The patches are available here:

So, if you are using a 2.6.27, you will get reliable information from bonds.

2.6.24

Before 2.6.24, it is not possible to determine the real interface (for multicast packets) when we receive a packet from the logical interface. This is fixed with those patches:

Therefore, if you are using a 2.6.24, you will get reliable information from bonds, except if you are using active/backup bonds. In this case, you won't get any information from the passive interface.

Older kernels

With older kernels, lldpd will try to choose the best real interface for packets received on the logical interface. Usually, you will get an exact information or an inverted information. If this is not acceptable, you should consider upgrading to a more recent kernel or to apply the above patches.