Junos Interface Flapping: Hold-Time and Damping Configuration - 夜莺博客

Junos Interface Flapping: Hold-Time and Damping Configuration

Link instability is one of the most disruptive problems in production networks: interfaces that flap repeatedly trigger routing churn, unnecessary failovers, and in the worst case take down entire subscriber sessions. Junos OS gives operators two built-in mechanisms to suppress transient interface failures before they ever reach the routing process — static hold-time timers and exponential backoff damping. This guide explains when to use each method, how to choose timer values based on interface role, and how to deal with hardware faults at the data-plane level on MX-series routers, based on Juniper Networks' official guidance for the MX204, MX301, MX304, MX10004, and MX10008 platforms.

Why Interface Flapping Is Dangerous

Every time a physical link goes down and comes back up, Junos advertises the state change to routing protocols such as IS-IS, OSPF, and BGP. Short, repeated flaps cause the IGP to recompute SPF over and over, flooding LSAs across the network and consuming CPU on every adjacent router. In broadband edge designs where the MX terminates PPPoE sessions, a simultaneous flap can disconnect all subscribers at once. Damping the interface at the physical layer is therefore the first line of defense.

Method 1: Static Hold-Time Timers

Static hold-time timers are configured per interface and per link state (up and down). They are expressed in milliseconds and are best suited to short-duration flaps in the millisecond range, such as those caused by transport protection switching.

set interfaces ge-0/0/1 hold-time up 5000
set interfaces ge-0/0/1 hold-time down 0

Juniper recommends setting hold-time up to a value greater than or equal to the IGP SPF hold-down timer (for example, 5000 ms for IS-IS by default). This prevents short repeated flaps from reaching the routing process and reduces unnecessary flooding. Keep hold-time down at 0 ms unless a specific use case requires a delay, so that link-down events are still reported to routing protocols immediately.

Method 2: Exponential Backoff Damping

For periodic, longer-duration flaps measured in seconds, use interface damping with an exponential backoff mechanism similar to BGP route dampening:

  • Each interface down event adds a penalty of 1000.
  • The penalty decays by 50% every half-life interval while the interface stays stable.
  • When the penalty exceeds the suppress threshold, Junos OS suppresses the interface and stops advertising state changes to routing protocols.

Choose damping parameters based on the interface role — core, customer, peer, or edge — and on whether redundant paths exist. Juniper also recommends using similar damping configuration on both ends of the physical interface; damping on one end only can produce undesired behavior.

Resolving Data-Plane Hardware Issues

When flapping is caused by actual hardware faults rather than transport issues, Junos can be configured to react automatically. On MX platforms, the system can isolate a faulty Packet Forwarding Engine and, depending on the design, remove up to two links from a LAG; if another PFE carrying upstream traffic fails, that PFE is disabled to prevent traffic impact. Operators can also collect diagnostics manually:

  • get-state — collect additional diagnostic data and store it in /var/tmp
  • CM-ALARM — generate an internal CMERROR notification
  • LOG — generate a syslog message
  • RESET — restart the affected component (PFE or line card)

Operational Takeaways

Start with hold-time timers for sub-second transport flaps, then layer on exponential damping for persistent periodic flaps, and finally address the hardware root cause on the data plane. For more Junos operational detail, see our guides on identifying a flapped interface with Junos EX CLI commands and troubleshooting Junos LAN reachability issues; a quick cross-vendor command reference is available in the multi-vendor network CLI cheat sheet.

原文链接:https://juniper.net/documentation/us/en/software/platform/mx301-configuration-essentials/configuration-essentials-mx301-mx304/topics/concept/mx-resolving-hw-issues.html