BGP Route Flap Dampening (RFC 2349)

While reading this tutorial, remember that BGP is a routing protocol. That means BGP
learns and selects the best route to a given destination. Anything that makes a route less
preferred causes the router to stop adding the route to the IP routing table and to stop
advertising the route to neighbors.

What is a Route Flap?

BGP peers exchange routes and send updates not faster than every 90 seconds by default.
When a route is repeatedly advertised and withdrawn, it is considered to be ‘flapping‘.
Flapping routes cause instability in the Internet routing
 table and Cisco routers running
BGP contain an optional mechanism designed to
dampen the destabilizing effect of
flapping routes. When a Cisco router running BGP
detects a flapping route it automatically
dampens that route. The route dampening prevents routers from thrashing while trying
to re-calculate a large number of route
updates. The overall effect is to produce a more
stable routing table. BGP routes can
remain in the routing table for months.

The term route flap is used when a previously advertised route is withdrawn and then
readvertised. Cisco IOS later than 11.0 has a route dampening function built into it.
If you are running BGP version 4, the BGP process assigns a penalty of 1000 to the route
each time it flaps. When the penalty value exceeds the first of two limits, the route is
moved into the ‘historical’ list of routes, dampened, and then is no longer accepted from
other peers or announced to any peers. After the first limit has been exceeded, the timer
which tracks the period for which the route is to be dampened is doubled for each flap.

The suppression half-life is 15 minutes. The maximum suppress limit is four times the
half-life; thus, one hour is the default. The suppression penalty decays at half the half life
(7.5 minutes). So:

BGP Route Dampening Terms:

  • Flap—A route whose availability alternates repeatedly
  • History state—After a route flaps once, it is assigned a penalty and put into history
    state, meaning the router does not have the best path, based on historical information.
  • Penalty—Each time a route flaps, the router configured for route dampening in
    another autonomous system assigns the route a penalty of 1000. Penalties are
    cumulative. The penalty for the route is stored in the BGP routing table until the
    penalty exceeds the suppress limit. At that point, the route state changes from
    history to damp.
  • Damp state—In this state, the route has flapped so often that the router will not
    advertise this route to BGP neighbors
  • Suppress limit—A route is suppressed when its penalty exceeds this limit.
    The default value is 2000
  • Half-life—Once the route has been assigned a penalty, the penalty is decreased by
    half after the half-life period (which is 15 minutes by default). The process of
    reducing the penalty happens every 5 seconds.
  • Reuse limit—As the penalty for a flapping route decreases and falls below this
    reuse limit, the route is unsuppressed. That is, the route is added back to the BGP
    table and once again used for forwarding. The default reuse limit is 750. The
    process of unsuppressing routes occurs at 10-second increments. Every 10 seconds,
    the router finds out which routes are now unsuppressed and advertises them to the world
  • Maximum suppress limit—This value is the maximum amount of time a route can
    be suppressed. The default value is four times the half-life.

You can check for dampened paths by issuing the following command at the command prompt:

router#show ip bgp dampening dampened-paths

This works on Cisco, Juniper, Avici and HP routers.

Configuring Dampening:

  • enable
  • configure terminal
  • router bgp autonomous-system-number
  • address-family ipv4 [unicast | multicast | vrf vrf-name]
  • bgp dampening [half-life reuse suppress max-suppress-time] [route-map map-name]
  • end

Checking default values:

R1#sh ip bgp dampening parameters
 dampening 15 750 2000 60 (DEFAULT)
  Half-life time      : 15 mins       Decay Time       : 2320 secs
  Max suppress penalty: 12000         Max suppress time: 60 mins
  Suppress penalty    :  2000         Reuse penalty    : 750