Thursday, November 6, 2008

BGP Dampening

Enables BGP to suppress use and advertisement of routes that consistently flap.

Configured under the BGP routing protocol. Each time a route flaps a penalty of 1000 is applied to it. This value does NOT appear to be configurable. However the threshold at which routes are suppressed or unsuppressed is.

Suppress Limit: the value to start suppressing a route.

Reuse Limit: the value to start reusing a route.

Alongside these values its possible to
1) specify how quickly a routes penalty is reduced following a period of stability: this is termed 'half-life'.
2) specify the maximum suppression time for a route if it has been stable. This value kicks in if half life degradtion of a penalty takes 'too long'. For example a route may have a period of very high instability and incurr a high penalty - in this scenario it may take an inordinate time of stability to enable re-advertisement waiting for half-life degradation.

The config can simply be applied as follows if the default values will suffice:

bgp dampening

Default values are
penalty: 1000 (not configurable)
half life: 15 minutes
suppress limit: 2000
reuse limit: 750
max suppress: 4 * half life.

If there was a requirement to change half life to 30 minutes, and suppress limit to 3000, whilst leaving other parameters at default this can be achieved as follows:

R1(config-router)#bgp dampening 30 750 3000 120


R1#show ip bgp dampening para
dampening 30 750 3000 120
Half-life time : 30 mins Decay Time : 3600 secs
Max suppress penalty: 12000 Max suppress time: 120 mins
Suppress penalty : 3000 Reuse penalty : 750



You can apply dampening to specific routes by using a route-map to match the prefixes you want to apply dampening to.

First, create the prefix-lists to match the routes:

ip prefix-list RICH seq 5 permit 12.0.0.0/8
ip prefix-list RICH seq 10 permit 13.0.0.0/8


Then match them in the route-map and set the dampening parameters:

route-map DAMPEN permit 10
match ip address prefix-list RICH
set dampening 10 1000 2000 30


Finally, under the BGP process apply the route-map to the dampening command:

router bgp 100
bgp dampening route-map DAMPEN


This ensures that only the prefixes matched in the route-map have dampening applied to them.

No comments: