Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Using Routing Policies to Damp BGP Route Flapping

BGP route flapping describes the situation in which BGP systems send an excessive number of update messages to advertise network reachability information. BGP flap damping is a way to reduce the number of update messages sent between BGP peers, thereby reducing the load on these peers without adversely affecting the route convergence time.

Flap damping reduces the number of update messages by marking routes as ineligible for selection as the active or preferable route. Doing this leads to some delay, or suppression, in the propagation of route information, but the result is increased network stability. You typically apply flap damping to external BGP (EBGP) routes (that is, to routes in different ASs). You can also apply it within a confederation, between confederation member ASs. Because routing consistency within an AS is important, do not apply flap damping to IBGP routes. (If you do, it is ignored.)

BGP flap damping is defined in RFC 2439, BGP Route Flap Damping.

To effect changes to the default BGP flap damping values, you define actions by creating a named set of damping parameters and including it in a routing policy with the damping action (described in Configuring Actions That Manipulate Route Characteristics). For the damping routing policy to work, you also must enable BGP route flap damping.

The following sections discuss the following topics:

Configuring BGP Flap Damping Parameters

To define damping parameters, include the damping statement:

The name identifies the group of damping parameters. It can contain letters, numbers, and hyphens (-) and can be up to 255 characters. To include spaces in the name, enclose the entire name in quotation marks (“ ”).

You can specify one or more of the damping parameters described in Table 1.

Table 1: Damping Parameters

Damping Parameter

Description

Default

Possible Values

half-life minutes

Decay half-life, in minutes

15 minutes

1 through 45 minutes

max-suppress minutes

Maximum hold-down time, in minutes

60 minutes

1 through 720 minutes

reuse

Reuse threshold

750 (unitless)

1 through 20,000 (unitless)

suppress

Cutoff (suppression) threshold

3000 (unitless)

1 through 20,000 (unitless)

If you do not specify one or more of the damping parameters, the default value of the parameter is used.

To understand how to configure these parameters, you need to understand how damping suppresses routes. How long a route can be suppressed is based on a figure of merit, which is a value that correlates to the probability of future instability of a route. Routes with higher figure-of-merit values are suppressed for longer periods of time. The figure-of-merit value decays exponentially over time.

A figure-of-merit value of zero is assigned to each new route. The value is increased each time the route is withdrawn or readvertised, or when one of its path attributes changes. With each incident of instability, the value increases as follows:

  • Route is withdrawn—1000

  • Route is readvertised—1000

  • Route’s path attributes change—500

    Note:

    Other vendors’ implementations for figure-of-merit increase the value only when a route is withdrawn. The Junos OS implementation for figure-of-merit increases the value for both route withdrawal and route readvertisement. To accommodate other implementations for figure-of-merit, multiply the reuse and suppress threshold values by 2.

When a route’s figure-of-merit value reaches a particular level, called the cutoff or suppression threshold, the route is suppressed. If a route is suppressed, the routing table no longer installs the route into the forwarding table and no longer exports this route to any of the routing protocols. By default, a route is suppressed when its figure-of-merit value reaches 3000. To modify this default, include the suppress option at the [edit policy-options damping name] hierarchy level.

If a route has flapped, but then becomes stable so that none of the incidents listed previously occur within a configurable amount of time, the figure-of-merit value for the route decays exponentially. The default half-life is 15 minutes. For example, for a route with a figure-of-merit value of 1500, if no incidents occur, its figure-of-merit value is reduced to 750 after 15 minutes and to 375 after another 15 minutes. To modify the default half-life, include the half-life option at the [edit policy-options damping name] hierarchy level.

Note:

For the half-life, configure a value that is less than the max-suppress. If you do not, the configuration is rejected.

A suppressed route becomes reusable when its figure-of-merit value decays to a value below a reuse threshold, thus allowing routes that experience transient instability to once again be considered valid. The default reuse threshold is 750. When the figure-of-merit value passes below the reuse threshold, the route once again is considered usable and can be installed in the forwarding table and exported from the routing table. To modify the default reuse threshold, include the reuse option at the [edit policy-options damping name] hierarchy level.

The maximum suppression time provides an upper bound on the time that a route can remain suppressed. The default maximum suppression time is 60 minutes. To modify the default, include the max-suppress option at the [edit policy-options damping name] hierarchy level.

Note:

For the max-suppress, configure a value that is greater than the half-life. If you do not, the configuration is rejected.

A route’s figure-of-merit value stops increasing when it reaches a maximum suppression threshold, which is determined based on the route’s suppression threshold level, half-life, reuse threshold, and maximum hold-down time.

The merit ceiling, εc, which is the maximum merit that a flapping route can collect, is calculated using the following formula:

εc ≤ εr e(t/λ) (ln 2)

εr is the figure-of-merit reuse threshold, t is the maximum hold-down time in minutes, and λ is the half-life in minutes. For example, if you use the default figure-of-merit values in this formula, but use a half-life of 30 minutes, the calculation is as follows:

εc ≤ 750 e(120/30) (ln 2)

εc ≤ 12000

Note:

The cutoff threshold, which you configure using the suppress option, must be less than or equal to the merit ceiling, εc. If the configured cutoff threshold or the default cutoff threshold is greater than the merit ceiling, the route is never suppressed and damping never occurs.

To display figure-of-merit information, use the show policy damping command.

A route that has been assigned a figure of merit is considered to have a damping state. To display the current damping information on the routing device, use the show route detail command.

Specifying BGP Flap Damping as the Action in Routing Policy Terms

To BGP flap damping as the action in a routing policy term, include the damping statement and the name of the configured damping parameters either as an option of the route-filter statement at the [edit policy-options policy-statement policy-name term term-name from] hierarchy level:

or at the [edit policy-options policy-statement policy-name term term-name then] hierarchy level:

Disabling Damping for Specific Address Prefixes

Normally, you enable or disable damping on a per-peer basis. However, you can disable damping for a specific prefix received from a peer by including the disable option:

Disabling Damping for a Specific Address Prefix

In this routing policy example, although damping is enabled for the peer, the damping none statement specifies that damping be disabled for prefix 10.0.0.0/8 in Policy-A. This route is not damped because the routing policy statement named Policy-A filters on the prefix 10.0.0.0/8 and the action points to the damping statement named none. The remaining prefixes are damped using the default parameters.

Configuring BGP Flap Damping

Enable BGP flap damping and configure damping parameters:

To display damping parameters for this configuration, use the show policy damping command: