advanced25 min studyLesson 196 in Engineering

Correct final routes can contain unsafe transitions

Construct a routing microloop from asynchronous forwarding updates and measure restoration without confusing hop limits with convergence guarantees.

On this page

What you’ll understand

  • Construct a transient loop from old and new next-hop choices.
  • Separate detection, propagation, computation, and forwarding installation delays.
  • Explain what packet hop limits contain and what they cannot repair.

After a failure, a network does not replace all forwarding tables at once. Routers detect, learn, compute, and install changes at different times. A mixture of individually sensible old and new routes can therefore create a temporary loop even when both complete steady states are loop-free. This intermediate behavior is a real part of availability. A design that only validates the final shortest-path tree can miss the packet loss, repeated work, and queue growth experienced during the transition.

Mix two valid states to produce a loop

Consider destination D with links A–D cost one, A–B cost one, and B–D cost five. Before failure, A forwards directly to D and B forwards through A at total cost two. After A–D fails, the correct new routes are A through B and B directly to D. The complete old and new states are each sensible for their respective topology. The hazard appears if A installs its new next hop before B replaces its old next hop.

During that interval, A sends packets for D to B, and B sends them back to A. This is a forwarding microloop caused by inconsistent update timing; neither router needs to calculate an incorrect final path. If B changes first, the particular two-router loop is avoided, although other losses may remain. Ordered forwarding updates and repair mechanisms address particular transition cases, but their assumptions and failure coverage must be stated. Merely accelerating one component can change the ordering rather than eliminate every unsafe state.

A→newB,B→oldAA\xrightarrow{\rm new}B,\qquad B\xrightarrow{\rm old}A
The arrows denote installed next-hop actions for the same destination during a mixed forwarding state. They describe a two-router cycle; link costs and packet timing are deliberately absent from this state relation.↔ Scroll wide equations horizontally.

Restoration is measured across a pipeline

A local physical indication may detect some failures quickly, while a silent forwarding failure may require another detection method. Information then reaches affected routers, which schedule computation and install resulting entries. These stages can overlap or repeat. A simple sum is appropriate only for a clearly serial model of one critical recovery path. A protocol timer value alone is not a measured bound on user-visible disruption, particularly when forwarding hardware updates or downstream dependencies dominate.

Define the restoration criterion before measuring it. The first successful probe, sustained delivery at the required rate, return-path recovery, and recovery of a long-lived application connection are different events. Synchronize timestamps when comparing devices and account for probe spacing. A probe every second cannot tightly resolve a twenty-millisecond outage. Preserve packet traces and forwarding-installation evidence so an apparent recovery can be connected to the mechanism rather than only to a route announcement.

Trestore≈Tdetect+Tspread+Tcompute+TinstallT_{\rm restore}\approx T_{\rm detect}+T_{\rm spread}+T_{\rm compute}+T_{\rm install}
All terms are durations in seconds along an assumed serial critical recovery chain. Real stages can overlap, occur repeatedly, or leave application state broken afterward, so this illustrative budget is not a universal protocol guarantee.↔ Scroll wide equations horizontally.

Hop limits contain packets, not the control-plane fault

IPv4 TTL and IPv6 Hop Limit bound how many forwarding hops a packet can survive. Their depletion can remove a circulating packet and may trigger an ICMP time-exceeded response, subject to protocol rules and rate limits. They do not force the routers to agree, repair a failed link, or guarantee that later packets avoid the same loop. A larger initial hop limit can allow more repeated forwarding work while the mixed state persists. Treat it as a containment mechanism, not a convergence accelerator.

Use the queue lab to predict resource pressure during disruption. First press Reset, set both λ=3 and μ=2, predict a positive backlog slope, then Play or Step. Compare a separate run by pressing Reset again, setting both λ=2 and μ=3, predicting a four-second drain from the initial four items, then using Play or Step. Editing rates retains elapsed time and recomputes from the initial four; it does not model a live switch on accumulated work. This is a simplified work-budget view, not a loop topology or packet replication simulator. A real loop can multiply load on particular links and interact with finite buffers, neither of which the lab models. Measure per-interface counters and packet paths to determine whether a real transition has that amplification mechanism.

Measure the mixed-state interval

After A–D fails at time zero in the A–B–D example, A installs its new next hop B at 20 ms. B keeps its old next hop A until 80 ms, then switches to D. Find the microloop interval.

  1. Before 20 ms, A still points at its failed direct link; traffic may be lost, but the stated A-to-B/B-to-A forwarding cycle has not yet begun.

  2. From 20 ms until 80 ms, A points to B while B still points to A. The mixed-state microloop lasts 80 − 20 = 60 ms under these installation timestamps.

  3. At 80 ms, B forwards directly to D and the specified cycle ends. The total disruption since failure can be longer than the 60 ms loop interval, and application recovery may extend beyond forwarding repair.

The result

The microloop lasts sixty milliseconds. Reporting that number as the entire outage would omit the earlier failed-link forwarding period and any subsequent application recovery.

Explore the model

Interactive lab

Interactive lab · queue

Disruption leaves a work budget

For each separate run, press Reset, set both λ and μ, predict the slope and any drain time from the initial four items, then Play or Step. This compares fresh fixed-rate cases rather than a live rate switch. The model starts with four work items and does not construct routes, decrement hop limits, reproduce a microloop, or model finite packet buffers.

Disruption leaves a work budgetFluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Current readings: Fluid backlog: 4; Net rate · λ − μ: −1 /s; M/M/1 mean residence: 1 s. All parameters are adjustable with the labeled controls below.02.557.51001.534.56Elapsed time · sFluid backlogλ < μ
Fluid backlogCurrent time
Fluid backlog
4
Net rate · λ − μ
−1 /s
M/M/1 mean residence
1 s
t = 0 s

Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forTemporary forwarding inconsistency can create losses and extra work even when the eventual route table is correct.

Check your understanding

Why can two loop-free steady-state route configurations still produce a transient forwarding loop?

Try it yourself

A serial recovery budget assumes detection 12 ms, propagation 8 ms, computation 15 ms, and installation 5 ms. Calculate the modeled restoration time and explain why a configured 12 ms detector is not the same guarantee.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Sum all four explicitly serial stages. Then identify which stages the detector's timer does not cover.

Compare with the solution

The illustrative serial total is 12 + 8 + 15 + 5 = 40 ms. The detector covers only the first component; delayed announcements, computation queues, and forwarding installation still contribute. Real overlap could reduce the sum, while repeated changes or failed dependencies could extend restoration. Measure sustained data-plane success at sufficient temporal resolution instead of claiming forty milliseconds from timer settings alone.

Take it with you

  • Asynchronous forwarding changes can create loops absent from both final configurations.
  • User-visible restoration spans detection through forwarding and possibly application recovery.
  • TTL and Hop Limit contain circulating packets without repairing routing state.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.