BGP RFD (Route Flap Dampening)

RFD (route flap dampening) is used to prevent a flapping route from using up CPU cycles and creating constant churn in a network. RFD uses a penalty system, in which routes are assigned penalty values each time they flap. Each time a route is withdrawn and then sent in an Update again, the router assigns a penalty value to the route. If the penalty becomes too high, the router simply supresses the prefix that is flapping. As time passes with no flapping, the route’s penalty value starts dropping so that it can eventually be reused again.

There are some terms you will need to understand:

Term

Explanation

Default Value

Configurable range

Half life time

The time it takes for a route’s penalty value to reduce by half.

15 minutes

1-45 minutes

Suppress limit

Once a route’s penalty value exceeds the suppress limit, the route is supressed.

2,000

1-20,000

Reuse limit

Once a suppressed route’s penalty value drops below this limit, the route is reused again.

750

1-20,000

max-supress-time

The maximum amount of time a route can be supressed. Once this timer expires, the route is reused again even if it is still flapping.

4x half life time

1-255 minutes

Each time a route flaps, a value of 1000 is assigned to the route. As far as I know, this penalty value is not configurable.

An example will help explain RFD:

  • At T=1, a route flaps, and a penalty of 1000 is assigned.

  • Between T=1 and T=2, the value decrements based on the half-life.

    • Even if the half-life is 15 minutes, the process of reducing the penalty happens every 5 seconds. It is proportionally calculated so that after 15 minutes, the value has been halved.

  • At T=2, the route flaps again and a penalty of 1000 is assigned. The route is not yet at the 2000 suppress limit, due to the decrement between T=1 and T=2.

  • At T=3, the route flaps for a third time, and the penalty is now above the suppress limit. The route is now suppressed.

  • The route is suppressed until T=8, where it drops below the reuse limit.

Lab

We’ll reuse the simple topology from the last article:

To enable BFD on IOS-XE you use the following command:

By simply configuring bgp dampening we can confirm the default values:

Let’s advertise 5.5.5.5/32 from R5, and cause it to flap by shutting and no-shutting the loopback interface repeatedly. On R4, we can debug dampening and watch it become dampened.

To view dampening statistics you can use the following command:

  • 5.5.5.5/32 will be reused in 8.5 minutes.

RFD on IOS-XR

The process is essentially the same on IOS-XR, except we activate RFD under the address-family. Note that if we used the ipv4 address-family on IOS-XE, we would also have to enable RFD under the address-family. So you could say that the behaviour is the same, except IOS-XE considers the “global” BGP process as the ipv4 unicast address-family by default.

We’ll advertise 4.4.4.4/32 from R4 and cause it to flap a few times. After three flaps, the prefix is dampened.

Conditional Dampening

With both IOS-XE and IOS-XR we can have granular dampening policies per prefix. For example, we can only dampen prefixes that match a prefix list and not dampen other prefixes. To do this, we attach a route-map or route-policy to the dampening statement in BGP.

Last updated