BGP Dampening: Suppressing Route Flapping

A remote router has a flaky connection. Route appears, disappears, appears again — 10 times per minute. Each flap propagates through BGP. Your router processes updates. Your peers process updates. The entire internet processes updates. All for a route that will flap again in seconds.

BGP dampening penalizes routes that flap frequently. After enough flaps, the route is suppressed — temporarily hidden until it proves stable. This protects your network from chasing unstable routes.

Dampening prevents unstable routes from destabilizing your network.

How Dampening Works

Route flap detected:
→ Penalty added (e.g., +1000)
→ If penalty > suppress threshold: route suppressed
→ Penalty decays over time
→ If penalty < reuse threshold: route unsuppressed

Key Parameters

ParameterDescriptionTypical Value
Half-lifeTime for penalty to decay by half15 minutes
ReusePenalty below which route is reused750
SuppressPenalty above which route is suppressed2000
Max-suppressMaximum suppression time60 minutes

Example Timeline

Time 0:00 - Route withdrawn → Penalty: 1000
Time 0:01 - Route announced → Penalty: 2000 (flap)
Time 0:02 - Route withdrawn → Penalty: 3000 → SUPPRESSED (> 2000)
Time 0:03 - Route announced → Still suppressed, penalty +1000 = 4000
Time 15:00 - Penalty decayed to 2000 (half-life)
Time 30:00 - Penalty decayed to 1000
Time 35:00 - Penalty decayed to ~750 → REUSED (< 750)

Basic Dampening Configuration

Enable Dampening Globally

Terminal window
configure
# Enable with default parameters
set protocols bgp address-family ipv4-unicast dampening
commit

Custom Parameters

Terminal window
configure
# Custom dampening parameters
set protocols bgp address-family ipv4-unicast dampening half-life 15
set protocols bgp address-family ipv4-unicast dampening re-use 750
set protocols bgp address-family ipv4-unicast dampening start-suppress-time 2000
set protocols bgp address-family ipv4-unicast dampening max-suppress-time 60
commit

Per-Neighbor Dampening

Terminal window
# Different dampening for different peers
# Typically done via route-map
configure
# More aggressive for untrusted peers
set policy route-map DAMPENING-AGGRESSIVE rule 10 action permit
set policy route-map DAMPENING-AGGRESSIVE rule 10 set dampening half-life 10
set policy route-map DAMPENING-AGGRESSIVE rule 10 set dampening re-use 500
set policy route-map DAMPENING-AGGRESSIVE rule 10 set dampening start-suppress-time 1500
# Apply to peer
set protocols bgp neighbor 10.0.0.2 address-family ipv4-unicast route-map import DAMPENING-AGGRESSIVE
commit

Viewing Dampening Status

Show Dampened Routes

Terminal window
# Show all dampened routes
show bgp ipv4 unicast dampening dampened-paths
# Output:
# Network From Reuse Path
# 203.0.113.0/24 10.0.0.2 00:25:00 65002 65003
# 198.51.100.0/24 10.0.0.2 00:45:00 65002 65004

Show Flap Statistics

Terminal window
# Show routes with flap history
show bgp ipv4 unicast dampening flap-statistics
# Output:
# Network From Flaps Duration Reuse Path
# 203.0.113.0/24 10.0.0.2 15 01:30:00 00:25:00 65002
# 198.51.100.0/24 10.0.0.2 8 00:45:00 00:45:00 65002

Show Dampening Parameters

Terminal window
# Show configured parameters
show bgp ipv4 unicast dampening parameters
# Output:
# Half-life time: 15 minutes
# Reuse penalty: 750
# Suppress penalty: 2000
# Max suppress time: 60 minutes

Clearing Dampening

Clear Specific Route

Terminal window
# Clear dampening for specific prefix
clear bgp ipv4 unicast dampening 203.0.113.0/24

Clear All Dampened Routes

Terminal window
# Clear all dampening history
clear bgp ipv4 unicast dampening

Parameter Tuning

Aggressive Dampening

For untrusted peers or known-unstable sources:

Terminal window
configure
# Quick to suppress, slow to recover
set protocols bgp address-family ipv4-unicast dampening half-life 10
set protocols bgp address-family ipv4-unicast dampening re-use 500
set protocols bgp address-family ipv4-unicast dampening start-suppress-time 1000
set protocols bgp address-family ipv4-unicast dampening max-suppress-time 60
# Suppress after ~1-2 flaps
# Stay suppressed for up to 1 hour
# Be very stable to return
commit

Lenient Dampening

For trusted peers or critical routes:

Terminal window
configure
# Harder to suppress, quick to recover
set protocols bgp address-family ipv4-unicast dampening half-life 20
set protocols bgp address-family ipv4-unicast dampening re-use 1000
set protocols bgp address-family ipv4-unicast dampening start-suppress-time 3000
set protocols bgp address-family ipv4-unicast dampening max-suppress-time 30
# Suppress after ~3+ flaps
# Return to use faster
# Maximum 30 minutes suppression
commit

Calculating Flaps to Suppress

Suppress threshold / Penalty per flap = Flaps to suppress
Example:
2000 / 1000 = 2 flaps → suppressed
With decay during flapping, actual number varies

Selective Dampening

Dampen Only Specific Prefixes

Terminal window
configure
# Only dampen longer prefixes (more specific routes)
set policy prefix-list DAMPEN-TARGETS rule 10 prefix 0.0.0.0/0 ge 24
set policy route-map SELECTIVE-DAMPEN rule 10 match ip address prefix-list DAMPEN-TARGETS
set policy route-map SELECTIVE-DAMPEN rule 10 action permit
set policy route-map SELECTIVE-DAMPEN rule 10 set dampening half-life 15
set policy route-map SELECTIVE-DAMPEN rule 20 action permit
# No dampening for other routes
commit

Exclude Critical Routes

Terminal window
configure
# Don't dampen default route or critical prefixes
set policy prefix-list NO-DAMPEN rule 10 prefix 0.0.0.0/0
set policy prefix-list NO-DAMPEN rule 20 prefix 8.8.8.0/24 # Critical DNS
set policy route-map SAFE-DAMPEN rule 10 match ip address prefix-list NO-DAMPEN
set policy route-map SAFE-DAMPEN rule 10 action permit
# No dampening for matched routes
set policy route-map SAFE-DAMPEN rule 20 action permit
set policy route-map SAFE-DAMPEN rule 20 set dampening half-life 15
commit

Dampening Considerations

When to Use Dampening

✓ Edge routers receiving external routes ✓ Networks with known flapping sources ✓ Protection against propagating instability

When Not to Use Dampening

✗ Internal BGP (iBGP) — hides real problems ✗ Critical routes where availability is paramount ✗ Networks with known slow convergence (dampening adds to it)

Dampening vs BFD

BFD: Detect failures FAST
Dampening: Suppress UNSTABLE routes
They solve different problems:
- BFD: "Quickly know when peer is dead"
- Dampening: "Don't trust peers that keep dying"
Use both together for:
- Fast failure detection (BFD)
- Protection from flapping (dampening)

Monitoring and Alerting

Monitor Dampening Events

Terminal window
# Log when routes are suppressed/reused
show log | grep -i dampen
# Track frequently dampened prefixes
show bgp ipv4 unicast dampening flap-statistics

Alert on Persistent Dampening

Terminal window
# If route stays dampened, investigate source
# Persistent dampening = persistent instability somewhere
# Check which peer is source
show bgp ipv4 unicast 203.0.113.0/24
# Note the "from" peer

Troubleshooting

Route Stays Suppressed

Terminal window
# Check current penalty and reuse time
show bgp ipv4 unicast dampening dampened-paths
# If penalty not decaying:
# - Recent flaps reset penalty
# - Half-life too long
# Manual clear if needed
clear bgp ipv4 unicast dampening 203.0.113.0/24

Expected Route Not Appearing

Terminal window
# Might be dampened
show bgp ipv4 unicast dampening dampened-paths | grep <prefix>
# If dampened, wait for reuse or clear

Dampening Not Working

Terminal window
# Verify dampening is enabled
show bgp ipv4 unicast dampening parameters
# Check route-map is applied
show configuration commands | grep dampening
show configuration commands | grep route-map

Best Practices

1. Start Conservative

Terminal window
# Default parameters are reasonable starting point
set protocols bgp address-family ipv4-unicast dampening
# Monitor before tuning

2. Different Parameters for Different Sources

Terminal window
# Tier 1 transit: Lenient (trusted)
# Tier 2 transit: Standard
# Peers: Standard
# Customers: Lenient (you control their stability)

3. Monitor Dampening Statistics

Terminal window
# Regular review of what's being dampened
# Persistent dampening = investigate root cause

4. Don’t Dampen Everything

Terminal window
# Critical routes shouldn't be dampened
# Internal routes shouldn't be dampened
# Only dampen external routes from untrusted/unknown sources

The Lesson

Dampening prevents unstable routes from destabilizing your network.

Without dampening:

  • Flapping route → constant updates
  • Updates propagate to all peers
  • CPU and memory consumed processing junk
  • Potentially affects routing for stable routes

With dampening:

  • Flapping route → penalty accumulates
  • After threshold → route suppressed
  • Network ignores unstable route
  • Stable routes unaffected

The tradeoff: Dampening delays convergence for routes that are legitimately changing. A real path change looks like a flap. Too aggressive dampening can hide valid routes.

Balance: Conservative dampening on external routes, no dampening on internal/critical routes.