cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

BGP Route Dampening.....confused???

73244
Views
18
Helpful
7
Comments
Beginner

Route Dampening is a way to suppress flapping routes so that they are "suppressed" instead of being advertised.  An unstable network can cause BGP routes to flap, which can cause other BGP routers in the network to constantly reconverge.  This wastes valuable CPU cycles and can cause severe problems in the network. As a best practice most ISPs use route dampening regularly.

Definitions of the Route Dampening terms:

Penalty -

An incremented numeric value that is assigned to a route each time it flaps.  A route is penalized 1000 every time it flaps.  A route is considered to have flapped when we receive a WITHDRAW and then an UPDATE for a route. If we drop and regain our adjacency with a BGP peer we do not assign a penalty to the routes learned from that peer.

Half life time -

A configurable numeric value that describes the amount of time that must elapse to reduce the penalty by one half.  The default value is 15 minutes but can range from 1 minute up to 45 minutes.

Suppress limit -

A numeric value that is compared with the penalty.  If the penalty is greater than the suppress limit, the route is suppressed.  The default is 2000 but can range from 1 to 20000.

Reuse limit -

A configurable numeric value that is compared with the penalty.  If the penalty is less than the reuse limit, a suppressed route that is up will no longer be suppressed. The default value is 750 but can range from 1 to 20,000.

Max suppress limit

- The longest amount of time that a route can be suppressed.  The default is 4x the half life time but can range from 1 to 255.

Suppressed route

- A route that is not advertised, even if it is up.  A route is suppressed if the penalty is more than the suppress limit.

History entry -

An entry used to store flap information.  For the purposes of monitoring and calculating the level of oscillation of a route, it is important to store oscillation information in the router.  When the route stabilizes, the history entry will become useless and will be flushed from the router.


Let's take an example to understand route dampening,

Topology:

Assume that RB is using route dampening with all of the defaults for half-life-time, etc.

1st  Case  :  When  everything for 10.0.0.0/8 looks fine:

RB#
RB#sh ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 185404176
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x200
  10
    1.1.1.1 from 1.1.1.1 (1.1.1.1)
      Origin IGP, localpref 100, valid, external, best
RB#show ip bgp flap-statistics

<<<  No  flaps
 
RB#show ip bgp dampened-paths
 
<<<  No  route  is  dampened
RB#


Case  2:  After the route that RA is advertising to RB has flapped once:

RB#sh ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 96
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x208
    10 (history entry)
    1.1.1.1 from 1.1.1.1 (1.1.1.1)
      Origin IGP, localpref 100, external
      Dampinfo: penalty 992, flapped 1 times in 00:00:13

!---Here We see  route  flapped  once.
!---- Penality  <<  Supress  time (2000)

!--- Route  was  penalized by  1000  but  the  route  is  not  supressed because
penality<supresstime  (2000)

RB#show ip bgp flap-statistics
BGP table version is 96, local router ID is 20.1.75.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          From            Flaps Duration Reuse    Path
 h 10.0.0.0/8       1.1.1.1         1     00:00:36          10

RB#
RB#show ip bgp dampened-paths
 
<<<<  No  route  is  dampened

Case  3:  Now let us see what the penalty situation is after the route has flapped twice:

RB#sh ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 105
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x208
  10
    1.1.1.1 from 1.1.1.1 (1.1.1.1)
      Origin IGP, localpref 100, valid, external, best
      Dampinfo: penalty 1836, flapped 2 times in 00:03:28

!----Here  we  see  route  flapped twice and Penality  is  still  <  Supress  time (2000).
Hence  we  still  advertising  the  route.We  are  still  under  the  supress limit of  2000, 
so  everything  is ok.

RB#show ip bgp flap-statistics
BGP table version is 106, local router ID is 20.1.75.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          From            Flaps Duration Reuse    Path
*> 10.0.0.0/8       1.1.1.1         2     00:03:31          10
RB#show ip bgp dampened-paths
 
<<<  No  route  is  dampened

Case  4: Now let us see what happens when the route flaps a third time: 

RB#sh ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 110
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  10, (suppressed due to dampening)
    1.1.1.1 from 1.1.1.1 (1.1.1.1)
      Origin IGP, localpref 100, valid, external
      Dampinfo: penalty 2621, flapped 3 times in 00:05:35, reuse in 00:27:00

Here we  see route  flapped  thrice and Penality (2621)   >  Supress  time  (2000)
RB#
RB#show ip bgp flap-statistics
BGP table version is 110, local router ID is 20.1.75.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          From            Flaps Duration Reuse    Path
*d 10.0.0.0/8       1.1.1.1         3     00:05:38 00:27:00 10
RB#
RB#show ip bgp dampened-paths

!--  Now  we  see  route  is  dampened
BGP table version is 110, local router ID is 20.1.75.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          From             Reuse    Path
*d 10.0.0.0/8       1.1.1.1          00:27:00 10 i

We see something as Reuse timer. It tells us that it will be 27 minutes until this route is advertised again.

If you need the route to be reused in less than 27 minutes then you can use  "clear  ip bgp  dampening" command to reset the penality 

values.

Enjoy and please carry on with dampening your BGP routes frequently.

7 Comments
Beginner

if you are an edge/leaf network, is there a point of having BGP route dampening enabled?

Our audit department wants it enabled, but since we are an edge network I don't see any reason to have it enabled.

Any comments?

In ISP  lot  of  CE  network  terminates  and  there is  huge  possibility  of  several  link flaps  terminating  on  PE.  hence  we  enable BGP  dampening in  ISP  network.

if  you are  sitting  at  edge  network  i.e  CE  side,  there  is  no  need to  implement  BGP  dampening

Enthusiast

Hello,

according to the latest RIPE  recomendadion https://www.ripe.net/ripe/docs/ripe-378

the BGP dampening should be avoided  by ISP because it cause more instability.

Beginner

Hi,

    i want to userstand that when any route get flapped it penalized by 1000 by default and after that when it crosses the suppress limit. the route get suppressed but after that how it reaches to reuse limit what whould be the time interval and decays value it uses.

     like if i take an example as above-

RB#sh ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 110
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  10, (suppressed due to dampening)
    1.1.1.1 from 1.1.1.1 (1.1.1.1)
      Origin IGP, localpref 100, valid, external
      Dampinfo: penalty 2621, flapped 3 times in 00:05:35, reuse in 00:27:00

Here we  see route  flapped  thrice and Penality (2621)   >  Supress  time  (2000)

In above example route having 2621 penalty then how it reduse its penalty value with time.


Beginner

Thanks for the write-up, very useful

Beginner

Thanks your for your kindly writing.

Cisco Employee

Very informative. Thanks for the details.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards


This widget could not be displayed.