Content

| 5.9 |  | Troubleshooting BGP |
| 5.9.5 |  | BGP routes getting dampened |

Dampening is the way to minimize instability in a local BGP network caused by unstable BGP routes from EBGP neighbors. RFC 2439, “BGP Route Flap Dampening,” describes in detail how dampening works. In short, 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: Actually, 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:

1. Wait for the penalty to go below the reuse limit (750).
2. Remove dampening altogether from the BGP configuration.
3. 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.

> Note: “Route instabilities in the Internet will affect everybody one way or the other. It is everyone’s responsibility to minimize route oscillation by being more aware of the things we do and why we do them. Providers are becoming more tough on culprits; there is even talk about charging an additional fee per route flap. This might sound like overkill, but it is getting harder and harder to get the Internet under control. Having a “routing patrol” issue tickets whenever someone breaks the rules may become necessary.” Bassam Halabi, Internet Routing Architectures, Cisco Press.