Skip to content
LinkState
Go back

When STP IGP and BGP Recovered in the Wrong Order

Introduction to the Event

Background and Context

The incident occurred in a three‑tier leaf‑spine data‑center fabric that provides both Layer‑2 (VXLAN‑based overlay) and Layer‑3 (OSPF underlay, BGP EVPN overlay) services. The fabric consists of:

The design intent is that, after power restoration, each control plane (Layer‑2 and Layer‑3) should reconverge independently and the combined forwarding plane should resume normal traffic flow within the sum of their individual convergence times.

Event Timeline and Key Milestones

Time (UTC)Milestone
T‑00:00Normal operation; all links up, STP stable, LACP aggregators active, OSPF adjacencies full, BGP EVPN sessions established.
T+00:00PDU breaker trips; instantaneous loss of power to all affected switches.
T+00:05Power restored by UPS/generator; switches begin boot sequence.
T+00:30All switches have completed boot and initialized hardware.
T+00:45Layer‑2 control planes (LACP, STP/MSTP, MLAG peer‑link) report link‑up and begin reconvergence.
T+00:50OSPF hellos begin exchanging on interfaces that are administratively up but whose underlying LACP aggregator is not yet marked “collecting/distributing”.
T+01:00OSPF adjacencies reach FULL state on several leaf‑spine port‑channel interfaces (per OSPF log).
T+01:10BGP EVPN sessions re‑establish using the OSPF‑learned underlay routes.
T+01:20STP/MSTP has elected a new root and blocked redundant ports; LACP aggregators on leaf‑spine links are still negotiating.
T+01:30Traffic loss observed: ping/TCP flows between servers attached to different leaves experience >90% packet loss.
T+02:00LACP aggregators finally transition to collecting/distributing state; LACP logs show “LAG interface up”.
T+02:05Forwarding plane resumes normal traffic; packet loss drops to <1%.
T+02:30All control planes report stable state; no further alarms.

Key observation: Layer‑2 (LACP, STP) and Layer‑3 (OSPF, BGP) each reported successful recovery on their own timelines, yet the combined convergence produced a ~75‑second window of traffic blackhole.


Technical Overview of the Infrastructure

Layer‑2 Network Architecture

Layer‑3 Network Architecture

Interdependencies and Interactions Between Layers

  1. LACP → OSPF: OSPF treats the LACP port‑channel as a single logical interface. OSPF adjacency formation depends only on the logical interface being administratively up and having an IP address; it does not wait for the LACP aggregator to reach the collecting/distributing state.
  2. STP → VXLAN: STP port state (blocking/forwarding) determines whether the underlying physical port can carry VXLAN encapsulated traffic. If a port is blocked, VXLAN packets are dropped at the ingress of the physical port.
  3. MLAG/vPC → LACP: The peer‑link LACP aggregator must be up for the MLAG peer‑sync to exchange MAC tables and sequence numbers; otherwise the peer‑link remains in a standby state, causing asymmetric MAC learning.
  4. BGP → OSPF: BGP EVPN next‑hop resolution relies on OSPF‑installed underlay routes; if OSPF installs a route over a not‑yet‑ready LACP link, BGP will program that next‑hop into the FIB, leading to blackhole until the LACP link becomes usable.

These dependencies mean that a timing mismatch between Layer‑2 link readiness and Layer‑3 adjacency can cause a transient forwarding blackhole even though each control plane believes it has converged.


The Power Event and Initial Response

Description of the Power Event

At T+00:00 a feeder breaker supplying the rack’s PDU tripped, causing an instantaneous loss of AC power to:

All affected switches experienced a hard power loss; line cards, supervisors, and fans went offline. No graceful shutdown was possible.

Immediate Effects on Layer‑2 and Layer‑3 Controls

Initial Troubleshooting and Recovery Efforts

Operations team performed the following steps immediately after power restoration:

  1. Verified PDU output and UPS status.
  2. Checked switch console logs for boot completion (show version, show system uptime).
  3. Confirmed that all switches had re‑initialized line cards and that link LEDs were amber/green as expected.
  4. Initiated Layer‑2 health checks:
    show lacp neighbor
    show spanning-tree summary
  5. Initiated Layer‑3 health checks:
    show ip ospf neighbor
    show bgp summary

At T+00:45 the team observed that LACP and STP reported link‑up and began exchanging protocol packets; OSPF hellos were seen on the wire, but no adjacencies had yet reached FULL.


Layer‑2 Control Recovery

Successful Recovery Mechanisms

By T+02:00 all LACP aggregators on leaf‑spine links showed LAG interface up, and STP/MSTP had a stable topology with no blocked ports affecting VXLAN traffic.


Layer‑3 Control Recovery

OSPF*


Layer‑3 Control Recovery

OSPF Reconvergence

BGP EVPN Reconvergence

Resulting Forwarding State


Combined Convergence Failure Analysis

FactorLayer‑2 TimelineLayer‑3 TimelineImpact
LACP collecting/distributingT+02:00Physical link not usable before this time.
OSPF adjacency FULLT+01:00Routes installed over not‑yet‑ready links.
BGP EVPN session upT+01:10Overlay routes programmed with blackhole next‑hops.
STP/MSTP stableT+01:20No Layer‑2 blocking after this point.
Traffic loss observedT+01:30>90% packet loss due to LACP not ready.
Forwarding restoredT+02:05LACP ready, traffic flows.

The root cause is the lack of synchronization between OSPF/BGP convergence and LACP link readiness. OSPF and BGP consider the port‑channel “up” as soon as the logical interface is administratively active, ignoring the LACP state machine. Consequently, the control plane converges faster than the data plane can support, creating a transient blackhole.


Mitigation and Recommendations

  1. Enable OSPF BFD on LACP port‑channels – BFD will detect forwarding failures faster than OSPF dead intervals and prevent adjacency formation over not‑ready links.
  2. Delay OSPF adjacency until LACP reports collecting/distributing – Some NOSs support a lacp delay or ospf wait-for-lacp knob; enable it if available.
  3. Tune LACP timers – Use lacp rate fast uniformly across the fabric to reduce the time to reach collecting/distributing.
  4. Deploy MLAG peer‑link health checks – Ensure the peer‑link LACP is up before allowing vPC/MLAG to forward traffic.
  5. Monitor and alert on LACP state – Create alerts for any port‑channel that remains in detached or negotiating state beyond a threshold (e.g., 30 s).
  6. Validate design with failure‑injection testing – Simulate power loss and measure end‑to‑end convergence; adjust timers accordingly.

Implementing these changes will align Layer‑2 and Layer‑3 convergence times, eliminating the overlapping window that caused the traffic blackhole.


Conclusion

The power event exposed a subtle timing dependency: Layer‑3 protocols (OSPF, BGP) converged before Layer‑2 link aggregation reached a usable state. Although each control plane independently reported success, the mismatch produced a ~75‑second forwarding blackhole. By tightening the coupling between LACP readiness and


Share this post on:

Previous Post
Model explanations do not prove generated intent
Next Post
Why GRO and GSO make overlay captures lie