Vous êtes sur la page 1sur 4

BGP ROUTE DAMPENING

ROUTE FLAP: BGP peers exchange routes and send updates not faster than every 90 seconds by default. When a route is repeatedly advertised and withdrawn, it is considered to be 'flapping'. Flapping routes cause instability in the Internet routing table and Cisco routers running BGP contain an optional mechanism designed to dampen the destabilizing effect of flapping routes. When a Cisco router running BGP detects a flapping route it automatically dampens that route. The route dampening prevents routers from thrashing while trying to re-calculate a large number of route updates. The overall effect is to produce a more stable routing table. BGP routes can remain in the routing table for months. The term route flap is used when a previously advertised route is withdrawn and then re-advertised. Cisco IOS later than 11.0 has a route dampening function built into it. BGP route dampening feature has three goals1. a mechanism to reduce load on router processor caused by flapping routes 2. increase route stability 3. prevent sustained route oscillations BGP ROUTE DAMPENING CONFIGURATION: router bgp 100 bgp dampening half-life reuse-limit suppress-limit maximum-suppress-limit ! Route dampening maintains a route-flap history for each prefix. The following parameters are used History state: After a single route flap, the route is assigned a penalty, and the dampening state of the route is set to History. The default penalty for a route flap is 1000. Each time the route flaps, the penalty increases. Suppress limit: If the penalty exceeds the suppress limit, the route is Dampened. The state is changed from History to Damp. The default suppress limit is 2000. When the route is in Damp state, the router is not considered for best path selection and is not advertised to BGP peers. Half-life: The penalty of a route is decreased based on the half-life period. The default half-life period is 15 minutes. The penalty on the route is reduced every 5 seconds. Reuse limit: When the penalty falls below the reuse limit, the route is unsuppressed. The default reuse limit is 750. When the penalty falls below half of reuse limit, the history of the route is cleared. Maximum suppress limit: It is the maximum amount of time a route can be suppressed for. The default maximum suppress limit is 60 minutes (or four times half-life period). The BGP dampening feature affects only eBGP routes. Further, this feature operates on routes on a per-path basis. For instance, if a prefix has two paths, and one is dampened, the other prefix is still available and is advertised to BGP peers. BGP ROUTE DAMPENING OPERATION: If you are running BGP version 4, the BGP process assigns a penalty of 1000 to the route each time it flaps. When the penalty value exceeds the first of two limits, the route is moved into the 'historical' list of routes, dampened, and then is no longer accepted from other peers or announced to any peers. After the first limit has been exceeded, the timer which tracks the period for which the route is to be dampened is doubled for each flap. The suppression half-life is 15 minutes. The maximum suppress limit is four times the half-life; thus, one hour is the default. The suppression penalty decays at half the half-life (7.5 minutes). So: 1. First flap, penalty 1000 assigned, route placed in 'historical' category and becomes less preferred. 2. Second flap, route has met the suppression limit of 2000 (a Cisco default). The route is dampened and no longer advertised to neighbors or accepted from neighbors. 3. If route does not flap any further the penalty is decayed. The decay process begins 7.5 minutes after the route stabilized and decays exponentially every 5 seconds thereafter.

BGP ROUTE DAMPENING


4. Once the suppression penalty decays below 750 (the default value for the reuse threshold), the route is removed from dampened state and reused. The router parses the historical routes list every 10 seconds for reusable routes.

R2 and R3 routers are configured for BGP dampening with default values. Suppress limit = 2000, half-life period = 15 minutes, reuse-limit = 750 and maximum suppress-limit = 60 minutes. R3 router advertises 1.1.1.1/32 prefix to R2 router via eBGP. When 1.1.1.1/32 route flaps for the first time, its state is changed to History. Also, a penalty of 1000 is applied to the route 1.1.1.1/32. The debug ip bgp dampening command displays this information. First flap 02:01:19.687: EvD: charge penalty 1000, new accum. penalty 1000, flap count 1 02:01:19.687: EvD: unsuppress item left in reuse timer array with penalty 1000 02:01:19.687: BGP(0): charge penalty for 1.1.1.1/32 path 300 with halflife-time 15 reuse/suppress 750/2000 02:01:19.687: BGP(0): flapped 1 times since 00:00:00. New penalty is 1000 R2# show ip bgp dampening flap-statistics BGP table version is 9, local router ID is 10.2.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network h 1.1.1.1/32 From 10.2.2.2 Flaps Duration Reuse Path 1 00:34:34 300

The penalty decreases with time if no further flaps are noticed. Reducing penalty 02:01:49.567: EvD: accum. penalty 980, not suppressed 02:02:15.931: EvD: accum. penalty decayed to 961 after 27 second(s) When the route suffers a second flap, the further penalty of 1000 is applied. However, since the accumulated penalty does not exceed maximum suppress limit (2000), the route is not dampened. Second flap 02:02:45.599: EvD: accum. penalty decayed to 942 after 29 second(s) 02:02:45.599: EvD: charge penalty 1000, new accum. penalty 1942, flap count 2 02:02:45.599: EvD: unsuppress item left in reuse timer array with penalty 1942 02:02:45.599: BGP(0): charge penalty for 1.1.1.1/32 path 300 with halflife-time 15 reuse/suppress 750/2000 02:02:45.603: BGP(0): flapped 2 times since 00:01:25. New penalty is 1942

BGP ROUTE DAMPENING


The show ip bgp dampening flap-statistics command shows BGP dampening flap-statistics for prefixes. show ip bgp dampening flap-statistics R2# show ip bgp dampening flap-statistics BGP table version is 6, local router ID is 10.2.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network *> 1.1.1.1/32 From 10.2.2.2 Flaps Duration Reuse Path 2 00:02:17 300

Now when the route flaps the third time, a further penalty of 1000 is applied to the route. This time, the accumulated penalty exceeds the max suppress limit 2000 and hence the route is suppressed/ dampened and not advertised. Third flap 02:04:31.463: BGP(0): suppress 1.1.1.1/32 path 300 for 00:28:10 (penalty 2766) 02:04:31.463: halflife-time 15, reuse/suppress 750/2000 02:04:31.463: EvD: accum. penalty 2766, now suppressed with a reuse intervals of 169 The show ip bgp dampening dampened-paths command shows the routes currently dampened. The 'd' at the start of the prefix indicates the route is dampened. show ip bgp dampening dampened-paths R2# show ip bgp dampening flap-statistics BGP table version is 7, local router ID is 10.2.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network *d 1.1.1.1/32 From 10.2.2.2 Flaps Duration Reuse Path 3 00:06:36 00:02:59 300

R2# show ip bgp dampening dampened-paths BGP table version is 7, local router ID is 10.2.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network *d 1.1.1.1/32 From 10.2.2.2 Reuse Path 00:06:19 300 i

When the penalty falls below the reuse-limit 750, the route is unsuppressed and advertised again. Unsuppressed route 02:32:53.147: EvD: accum. penalty decayed to 756 after 12 second(s) 02:32:53.147: EvD: accum. penalty 756, now unsuppressed 02:32:53.151: BGP(0): Unsuppressed 1.1.1.1/32, path 300 R2# show ip bgp dampening flap-statistics BGP table version is 8, local router ID is 10.2.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network *> 1.1.1.1/32 From 10.2.2.2 Flaps Duration Reuse Path 3 00:31:59 300

BGP ROUTE DAMPENING


CLEARING BGP DAMPENING: Clears BGP route dampening information and unsuppresses the suppressed routes. Syntax: clear ip bgp dampening [ip-address mask] ip-address The IP address of a specific network for the clearing of route dampening. mask A network mask applied to the IP address.

Description: This command clears route dampening information for the network IP address provided, as well as unsuppressing its suppressed routes. You can optionally provide a network mask. If you do not provide an IP address, dampening is cleared for routes to all networks configured for dampening. Example 1: The following example clears route dampening information about the route to network 192.0.0.0 and unsuppresses its suppressed routes: R2#clear ip bgp dampening 192.0.0.0 255.0.0.0 Example 2: The following example clears route dampening information about the route to all routers and unsuppresses suppressed routes: R2#clear ip bgp dampening

Vous aimerez peut-être aussi