BGP Route Dampening

Introduction

Route dampening stops advertising routes to other ASes when they are flapping to minimize the instability of updates all over the Internet. Graded route flap dampening include a route-map to specify routes and their dampening setting different than global dampening settings.

Route Flap Dampening

  • This feature is disabled by default.
  • It only applies to routes learn with eBGP.
  • The main functionality is to stop the rippling effect of route updates or withdraws.
  • A Flap does not apply to sessions resets only to prefix changes like update/withdraws or attribute changes.
  • Dampening has to be configured on all routers in the AS or else the dampened route could be relearned right away from iBGP not dampening.

Issue with Dampening

  • "The major issue is that if one path is withdrawn, all BGP speakers will use best path selection to pick the next best path, and advertise this best path to all their neighbours. These neighbours will see a change in path; a change in path is a change in attribute, so the prefix as seen on a neighbouring router will attract a flap penalty - even though that path is perfectly valid and there has been no disappearance of the prefix from the routing table [5]." http://www.ripe.net/ripe/docs/ripe-378#2_1

Terms

List of relevant terms:

  • Penalty - is a value that's given to a route every time it flaps. The penalty is 1000 for updates/withdraws and 500 for BGP attribute changes (hard-coded values).
  • History State - the dampened value is stored in the history state, while still advertising the flapping route (until it reached a suppress limit).
  • Suppress Limit - once a the penalty value exceeds the suppress limit, route advertisement is dampened. State of a route is changed from History to Damp.
  • Damp State - routes in this state are not considered for best-path selection process and can not be advertised.
  • Half-life - by default every 5 seconds the penalty value is decreased. Half life takes 15 minutes and is the half of the original penalty.
  • Reuse Limit - once a route stabilized and dropped below a this reuse limit, it is again considered for best-path selection. The default reuse value is 750, the router checks every 10 second for route that have fallen under the reuse-limit. Additionally when the penalty reaches 1/2 of reuse-limit, its history is cleared from memory.
  • Maximum Suppress Limit - this is the upper bound on the penalty. Its main purpose is to prevent routes that initially were extremely unstable. Default 60 minutes (4x suppress limit)

NOTE: By default it takes 3 (not 2) flaps. The half-life decay of penalty between flaps causes it to decrease just below 2000 requiring a 3rd flap.

Maximum penalty has to be larger than the suppress limit. To calculate maximum penalty use the following formula:

max-penalty = reuse-limit * 2 ^ ( max-suppress-time / half-life )

Graded Route Flap Dampening (Route-map)

  • Not all routes should be considered equal in terms of dampening.
  • A /8 prefix compared to a /34 might have a shorter max-suppress time or a DNS root servers prefixes should not be dampended at all.
  • This feature allows for graded route flap dampening with the usage of route-maps.
  • Route-maps select which prefix to group and then set the dampening parameters for each grouping.

Relevant IOS Commands

bgp dampening

By default it has configuration dampening 15 750 2000 60.

R1(config-router)#        bgp dampening (half-life) (reuse-limit) (suppress-limit) (maximum-suppress-limit)

bgp dampening route-map

R1(config-router)#        bgp dampening route-map (rmap)
R1(config)#            route-map (RMAP) permit (seq)
R1(config-rmap)#            match ip address (ACL, prefix-list, as-path...)
R1(config-rmap)#            set dampening (half-life) (reuse-limit) (suppress-limit) (maximum-suppress-limit)

clear ip bgp dampening

clear ip bgp dampening [prefix]

show ip bgp dampening parameters

show ip bgp dampening flap-statistics

show ip bgp dampening dampened-paths

show ip protocols

[[collapsible show="+ Show ip protocols" hide="- Hide ip protocols"]]
Routing Protocol is "bgp 200"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Route Reflector for address family IPv4 Unicast, 3 clients
  Route Reflector for address family IPv6 Unicast, 3 clients
  Route Reflector for address family IPv4 MDT, 3 clients
  Route Reflector for address family VPNv4 Unicast, 3 clients
  Route Reflector for address family VPNv6 Unicast, 3 clients
  Route Reflector for address family IPv4 Multicast, 3 clients
  Route Reflector for address family IPv6 Multicast, 3 clients
  Route Reflector for address family NSAP Unicast, 3 clients
  Route flap dampening configured and enabled                <<<
  Halflife time 15 minutes, reuse value 750                <<<
  Suppress value 2000, maximum suppress time 60            <<<
  IGP synchronization is disabled                        <<<

[[/collapsible]]

debug ip bgp dampening (acl)

Additional Resources

RFC2439 BGP Route Flap Damping

Comments

rating: 0+x
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License