BGP Route Flap Damping Explained: Penalty and Timer Tuning - 夜莺博客

BGP Route Flap Damping Explained: Penalty and Timer Tuning

BGP route flap damping is a mechanism that protects routers from unstable neighbors that keep advertising and withdrawing the same route. Every flap forces a router to process a BGP UPDATE and to re-run best-path selection, and in the worst case this churn is propagated across the whole Internet. Damping assigns a penalty to a flapping route and temporarily suppresses it when the penalty crosses a threshold, which stabilizes routing tables and reduces CPU load. This article explains the penalty model, the default timers, how to configure damping on Cisco IOS and Junos, and why operators must tune it carefully today.

How Route Flap Damping Works

Each time a route is withdrawn and re-advertised (a flap), the router adds a penalty of 1000 to that route. The route is suppressed - removed from the routing table and not advertised to neighbors - once the penalty exceeds the suppress limit (2000 by default on Cisco IOS). The penalty then decays exponentially: after one half-life period (15 minutes by default), the penalty is halved. When the penalty falls below the reuse limit (750 by default), the route is reused and advertised again. The maximum suppress time (60 minutes) caps how long a route can stay suppressed even if it keeps flapping.

BGP Damping Parameters and Defaults

  • Penalty per flap: 1000
  • Suppress limit: 2000 (route is dampened above this value)
  • Half-life: 15 minutes (penalty reduced by 50% per interval)
  • Reuse limit: 750 (route usable again below this value)
  • Max suppress: 60 minutes

Once the penalty drops below 50% of the reuse limit, the penalty is removed from the route entirely.

Configuring BGP Dampening on Cisco IOS

Enable dampening globally, or use a route-map to dampen only selected routes:

router bgp 65000
 bgp dampening
 !
 ! selective dampening with a route-map:
 bgp dampening route-map DAMPEN-CUSTOMER-PREFIXES

route-map DAMPEN-CUSTOMER-PREFIXES permit 10
 match ip prefix-list CUSTOMER-PREFIXES
 set dampening 15 750 2000 60

The route-map form sets half-life reuse suppress max-suppress respectively. Verify with show ip bgp dampened-paths, and clear the history with clear ip bgp dampening.

Damping Parameters on Junos OS

Junos applies flap damping through routing policy. Default values are a half-life of 15 minutes, max-suppress of 60 minutes, reuse of 750 and a suppress threshold of 3000. To customize, define a damping profile and reference it with a damping action:

set policy-options damping DAMP-CUSTOMER half-life 15
set policy-options damping DAMP-CUSTOMER reuse 750
set policy-options damping DAMP-CUSTOMER suppress 3000
set policy-options damping DAMP-CUSTOMER max-suppress 60

set policy-options policy-statement DAMP-IN term 10 from protocol bgp
set policy-options policy-statement DAMP-IN term 10 then damping DAMP-CUSTOMER

set protocols bgp group EBGP import DAMP-IN

Note that by default Junos does not apply damping to internal BGP routes; since Release 12.2 you can enable it per address family if required.

Tuning Advice and the RIPE-580 Debate

Route flap damping is not a "configure and forget" feature. RIPE-580 and years of operational experience show that aggressive default damping can suppress stable but slowly recovering routes, and can even make convergence worse after large-scale failures because many valid prefixes get dampened at the same time. Operators commonly reduce damping on critical peerings, avoid damping more-specific prefixes, and monitor dampened-paths output regularly to confirm that damping is not punishing healthy routes. On the Junos side, interface-level hold-time and damping for physical links is a separate mechanism that also helps to stabilize routing protocols during flapping links.

Related reading: BGP route dampening penalty, suppress and reuse limits and BGP best path selection: the 13-step algorithm.

Original article: https://networklessons.com/bgp/bgp-route-dampening | Juniper: Understanding Damping Parameters