Dampening is the way to minimize instability in a local BGP network caused
by unstable BGP routes from EBGP neighbors. Dampening is the way to assign a
penalty for a flapping BGP route.
A withdrawal of a prefix is considered
a flap. A penalty of 1000 is assigned for each flap; if the flap penalty
reaches the suppress limit because of continued flaps (default 2000), the BGP
path is suppressed and is taken out of the routing table. This penalty is
decayed exponentially based on the half-life time (default 15 minutes). When
the penalty reaches the reuse value (default 750), the path is unsuppressed and
is installed in the routing table and advertised to other BGP neighbors. Any
dampened path can be suppressed only until the maximum suppress time is reached
(default 60 minutes). Dampening is applied only to EBGP neighbors, not to IBGP
neighbors.
BGP dampening is off by default. The following BGP command
activates dampening:
router bgp 109 bgp dampening
Cisco IOS Software allows dampening parameters to be changed and are defined
as follows:
bgp dampening half-life-time reuse
suppress maximum-suppress-time
The range of values
for these options are:
-
half-life-time – 1 to 45 minutes, Default is 15 minutes.
-
reuse – 1 to 20,000, Default is 750
-
suppress – 1 to 20,000, Default is 2,000.
-
maximum-suppress-time – Maximum duration that a route can be
suppressed. Range is 1 to 255, default is four times the half-life-time.
Figure
shows a simple
EBGP network between R1 and R2 in AS 109 and AS 110, respectively. R2 has
advertised 100.100.100.0/24 to R1. To show how dampening works, R2 is made to
flap 100.100.100.0/24 multiple times. Removing the route in R2 routing table
and putting it back again can simulate flapping. R1 receives these flaps and,
if configured with dampening, assigns penalties per flap.
Debugs and
Verification
Figure
shows
the necessary debug commands, debug ip bgp dampening and
debug ip bpg updates, to observe the dampening feature in
R1. Most debugs can be run along with an access list to limit the output
created by these debugs. Access list 1 is permitting only the 100.100.100.0
network.
Figure
shows the debug
output and flap statistics in BGP output. Highlighted debug
and show command output shows that 100.100.100.0/24 has
flapped four times in 3 minutes and 13 seconds. For each flap, a penalty of
1000 is assigned; because the suppress limit of 2000 has been exceeded,
100.100.100.0/24 is suppressed and removed from the routing table.
Solution
 |
NOTE:
Route dampening can be considered the solution regarding ill-behaved
Internet routes and keeping the Internet routers in a stable state.
|
If R1 wants to reinstall 100.100.100.0/24, it can do the following:
- Wait for the penalty to go below the reuse limit (750).
- Remove dampening altogether from the BGP configuration.
- Clear the flap statistics.
Figure
shows how the
dampened path can be cleared and immediately get installed in the routing
table. The output in Figure
is from the
debug ip bgp update 1 command which is on to display the
activity in the BGP process. This output shows 100.100.100.0/24 going into the
IP routing table.
