Concepts / Loops and bonded links

Loops and bonded links

LACP

Also called link aggregation control protocol, LACPDU, 802.3ad, slow protocols, port state 63

The protocol both ends of a bond speak to agree which cables belong to it, and to notice one failing.

The problem

A cable in a bond can fail for one end only, and the end that still sees a link keeps sending into it.

  1. officeRouter and the file server send a LACPDU on each cable of their bond, every second (fast rate), to 01:80:c2:00:00:02.
  2. Each says who it is (actor) and what it heard from the other end (partner).
  3. A cable carries traffic only when both agree: in sync, collecting and distributing. That is port state: 63.
  4. officeRouter's end of bond0p1 dies; the file server's card still has carrier, so nothing looks wrong there.
  5. After three missed LACPDUs the file server marks the partner expired and stops using bond0p1; bond0p2 carries every flow.
The fibre nobody can see
The fibre nobody can see

Each card checks its link as far as the media converter, and both those stretches stay lit with the fibre cut between them. From the Link aggregation: make two cables add up lab.

What you'd see

$ cat /proc/net/bonding/bond0
Slave Interface: bond0p1
MII Status: up
details actor lacp pdu:
    system mac address: 5a:1b:4f:9b:88:12
    port number: 1
    port state: 143
details partner lacp pdu:
    system mac address: 0e:ad:6c:6a:be:8a
    port number: 1
    port state: 55
  • Run on the file server, 4 seconds after officeRouter went silent on bond0p1.
  • MII Status: up: the card still sees a link, so carrier alone would keep using it.
  • port state: 143 (was 63): expired (128) set, collecting (16) and distributing (32) cleared. The cable is out of the bond.

Guess first

The same failure happens on a static bond, with no LACP. What happens to the file server's traffic hashed onto bond0p1?

Show answer

It is lost: with carrier still up, the file server never notices, and keeps sending that share of flows into a dead cable. Those connections hang.

In short

Each end sends a LACPDU on every member (every second at the fast rate, every 30 at the slow) to 01:80:c2:00:00:02, saying who it is (actor) and what it heard (partner). A cable carries traffic only once both agree: in sync, collecting and distributing. When the partner's LACPDUs stop, the port leaves the bond after three missed, even if its own card still has carrier. A static bond has no protocol: a mismatch, or a far end that cannot see the failure, loses traffic silently.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab