Sub topic 11
Link failure, rehashing and minimum links
This chapter assumes you know how a LAG spreads flows across members with a hash, and that you have seen LACP negotiate a bundle. Here you will see what happens when a member fails, and how to control the outcome.
What happens when a member fails
A port channel keeps working when one member goes down. The switch removes the failed port from the active set and recomputes the mapping between hash results and member links. This is called rehashing.
Take a bundle of four links. Each flow's hash result is reduced to a value from 0 to 3, and that value selects a link. When one link fails, the same hash result now maps onto three links. Flows that were on the failed link move to the survivors. Depending on the platform, flows on healthy links may move too.
Flows that move can see a short burst of loss or reordering. TCP recovers on its own. Real-time traffic such as voice may glitch for a moment. Failover is usually well under a second when the physical link drops, because the switch detects loss of signal immediately.
Capacity after a failure
Redundancy is not the same as spare capacity. Four 1 Gbps links give 4 Gbps. After one failure you have 3 Gbps. If the bundle was carrying 3.5 Gbps, the survivors now saturate and drop traffic. Size a bundle so the load fits after the loss of the number of links you expect to lose.
Rehashing also does not balance load evenly. With uneven flow sizes, one surviving link can take more than its share.
Detecting failure: physical and LACP
A physical failure, such as a pulled cable, is detected at once. A harder case is a link that stays up electrically but stops passing frames, for example because of a faulty media converter or a problem on the far device. LACP handles this. Each side sends LACPDUs, and if a member hears nothing from its partner for the timeout, the port is removed from the bundle. The timeout is 3 seconds with the fast rate (1 second PDUs) and 90 seconds with the slow rate (30 second PDUs). Static mode has no such check, so a silent failure can blackhole the flows hashed to that link.
Minimum links
Sometimes a degraded bundle is worse than a failed one. Suppose a 4-link bundle is the uplink to a core and carries 3 Gbps. If three links fail, the one remaining link cannot carry the load, yet the port channel stays up and keeps attracting all the traffic. Routing and spanning tree see a healthy path, so they do not move traffic elsewhere.
The minimum links setting solves this. You set the number of active members the bundle needs. If fewer remain, the whole port channel goes down, and traffic fails over to an alternate path.
interface Port-channel1
port-channel min-links 2On IOS this command is port-channel min-links. Linux bonding has a similar min_links parameter. Platforms differ in syntax, so check your own.
Checking the result
After a failure, show etherchannel summary shows the failed member with a flag such as D (down), while the port channel stays SU (Layer 2, in use). If min-links is not met, the port channel itself shows as down.
Exercise
A 4 x 10 Gbps port channel normally carries 25 Gbps. One member fails. What risk do you face, and what could you do about it?
Show answer
The remaining capacity is 30 Gbps, so the bundle still fits but runs at about 83 percent, and uneven hashing may overload one link. A second failure leaves 20 Gbps, below the 25 Gbps load, and the port channel would stay up and drop traffic. Add members or use faster links to leave headroom, and set min-links to 3 so the bundle goes down and traffic moves to an alternate path when capacity is no longer enough.
Exercise
Why does LACP detect a link that is up but silently dropping frames, while static mode does not?
Show answer
LACP members exchange LACPDUs and remove a port when its partner stops answering within the timeout. Static mode sends no control messages, so the switch only sees link state and keeps hashing flows onto the faulty member.