BGP route flapping describes the situationin which BGP systems send an excessive number of update messages toadvertise network reachability information. BGP flap damping is a way to reduce the number of update messages sent between BGPpeers, thereby reducing the load on these peers without adverselyaffecting the route convergence time.
Flap damping reduces the number of update messages by markingroutes 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 increasednetwork stability. You typically apply flap damping to external BGP(EBGP) routes (that is, to routes in different ASs). You can alsoapply it within a confederation, between confederation member ASs.Because routing consistency within an AS is important, do not applyflap damping to IBGP routes. (If you do, it is ignored.)
BGP flap damping is defined in RFC2439, BGPRoute Flap Damping.
To effect changes to the default BGP flap damping values, youdefine actions by creating a named set of damping parameters and includingit in a routing policy with the damping
action (describedin Configuring Actions That Manipulate Route Characteristics). For the damping routing policy to work, you also must enable BGProute flap damping.
The following sections discuss the following topics:
Configuring BGP Flap Damping Parameters
To define damping parameters, include the damping
statement:
[edit policy-options]damping name { disable; half-life minutes; max-suppress minutes; reuse number; suppress number;}
The name identifies the group of damping parameters. It cancontain letters, numbers, and hyphens (-) and can be up to 255characters.To include spaces in the name, enclose the entire name in quotationmarks (“”).
You can specify one or more of the dampingparameters described in Table 1.
Damping Parameter | Description | Default | Possible Values |
---|---|---|---|
| Decay half-life, in minutes | 15minutes | 1 through 45minutes |
| Maximum hold-down time, in minutes | 60minutes | 1through 720minutes |
| Reuse threshold | 750 (unitless) | 1 through20,000 (unitless) |
| Cutoff (suppression) threshold | 3000 (unitless) | 1 through20,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 tounderstand how damping suppresses routes. How long a route can besuppressed is based on a figure of merit, whichis a value that correlates to the probability of future instabilityof a route. Routes with higher figure-of-merit values are suppressedfor longer periods of time. The figure-of-merit value decays exponentiallyover 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 ofinstability, 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 increasethe value only when a route is withdrawn. The JunosOS implementationfor figure-of-merit increases the value for both route withdrawaland route readvertisem*nt. To accommodate other implementations forfigure-of-merit, multiply the
reuse
andsuppress
threshold values by2.
When a route’s figure-of-merit value reaches a particularlevel, called the cutoff or suppressionthreshold, the route is suppressed. If a route is suppressed,the routing table no longer installs the route into the forwardingtable and no longer exports this route to any of the routing protocols.By default, a route is suppressed when its figure-of-merit value reaches3000.To modify this default, include the suppress
option atthe [edit policy-options damping name]
hierarchy level.
If a route has flapped, but then becomes stable so that noneof the incidents listed previously occur within a configurable amountof time, the figure-of-merit value for the route decays exponentially.The default half-life is 15minutes. For example, for a routewith a figure-of-merit value of1500, if no incidents occur,its figure-of-merit value is reduced to750 after 15minutesand to375 after another 15minutes. To modify the defaulthalf-life, include the half-life
option at the [editpolicy-options damping name]
hierarchylevel.
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-meritvalue decays to a value below a reuse threshold, thus allowing routes that experience transient instability to onceagain be considered valid. The default reuse threshold is750.When the figure-of-merit value passes below the reuse threshold, theroute once again is considered usable and can be installed in theforwarding table and exported from the routing table. To modify thedefault reuse threshold, include the reuse
option at the [edit policy-options damping name]
hierarchylevel.
The maximum suppression time provides an upper bound on thetime that a route can remain suppressed. The default maximum suppressiontime is 60minutes. 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 thanthe half-life. If you do not, the configuration is rejected.
A route’s figure-of-merit value stops increasing whenit reaches a maximum suppression threshold, which is determined basedon the route’s suppression threshold level, half-life, reusethreshold, and maximum hold-down time.
The merit ceiling, εc, which is the maximum merit thata flapping route can collect, is calculated using the following formula:
εc ≤ εr e(t/λ) (ln2)
εr is the figure-of-merit reuse threshold, t is the maximumhold-down time in minutes, and λ is the half-life in minutes. For example, ifyou use the default figure-of-merit values in this formula, but usea half-life of 30minutes, the calculation is as follows:
εc ≤ 750 e(120/30) (ln2)
ε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 thresholdis greater than the merit ceiling, the route is never suppressed anddamping never occurs.
To display figure-of-merit information, use the show policydamping
command.
A route that has been assigned a figure of merit is consideredto have a damping state. To display the current damping informationon the routing device, use the show route detail
command.
Specifying BGP Flap Damping as the Action in Routing PolicyTerms
To BGP flap damping as the action in a routing policy term,include the damping
statement and the name of the configureddamping 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:
[edit policy-options policy-statement policy-name term term-name from]route-filter destination-prefixmatch-type { damping damping-parameters;}
or at the [edit policy-options policy-statement policy-name term term-name then]
hierarchy level:
[edit policy-options policy-statement policy-name term term-name then]damping damping-parameters;
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 froma peer by including the disable
option:
[edit policy-options damping name]disable;
Disabling Damping for a Specific Address Prefix
In this routing policy example, although damping is enabledfor the peer, the damping none
statement specifies thatdamping 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 pointsto the damping
statement named none
. The remainingprefixes are damped using the default parameters.
[edit]policy-options { policy-statement Policy-A { from { route-filter 10.0.0.0/8 exact; } then damping none; } damping none { disable; }}
Configuring BGP Flap Damping
Enable BGP flap damping and configure damping parameters:
[edit]routing-options { autonomous-system 666;}protocols { bgp { damping; group group1 { traceoptions { file bgp-log size 1m files 10; flag damping; } import damp; type external; peer-as 10458; neighbor 192.168.2.30; } }}policy-options { policy-statement damp { from { route-filter 192.168.0.0/32 exact { damping high; accept; } route-filter 172.16.0.0/32 exact { damping medium; accept; } route-filter 10.0.0.0/8 exact { damping none; accept; } } } damping high { half-life 30; suppress 3000; reuse 750; max-suppress 60; } damping medium { half-life 15; suppress 3000; reuse 750; max-suppress 45; } damping none { disable; }}
To display damping parameters forthis configuration, use the show policy damping
command:
user@host> show policy dampingDamping information for "high": Halflife: 30 minutes Reuse merit: 750 Suppress/cutoff merit: 3000 Maximum suppress time: 60 minutes Computed values: Merit ceiling: 3008 Maximum decay: 24933Damping information for "medium": Halflife: 15 minutes Reuse merit: 750 Suppress/cutoff merit: 3000 Maximum suppress time: 45 minutes Computed values: Merit ceiling: 6024 Maximum decay: 12449 Damping information for "none":Damping disabled