JUNOS BGP Damping Policies

Attached is a good starting point for damping policies.  You could create different damping policies per BGP group/neighbor, but a standard set allows an enforced “network-wide” BGP damping policy.

Download BGP_Damping_config_template_stanza.txt

To apply the policy, you just add the damping knob and add the policy to the import policy list before any ACCEPT actions are done. I typically like to make the damping policy the first import policy, but I have seen it as the penultimate policy before any terminating actions are done.

If you don’t have a background in JUNOS damping (It’s a little different from Cisco’s “dampENing”), I’ll explain each policy below.  I’ve ordered them by aggressiveness (the amount of route flaps you can have / time period).

As a side note, since decaying metrics are decreased fractionally as a mathematical function, I’m using rough numbers and times for examples.  I told myself after Cal3 I wouldn’t ever do limits again! 🙂

DAMPING-TIMID-SHORTER (A VERY “timid” policy with EXTREMELY SHORT hold times):

  • 1 route flap / minute
  • If a route flaps 5 times in less than 5 minutes, it will be suppressed for 5 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 5 minutes, the metric will be cut in half.  If the metric ever increases above 5000 (5 flaps in <5 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 1 half-life decay of the minimum suppression metric.  The maximum a route can be suppressed is 10 minutes.

 

DAMPING-TIMID-SHORTER (An even less “aggressive” policy with shorter hold times):

  • 1 route flap / 2 minutes
  • If a route flaps 5 times in less than 10 minutes, it will be suppressed for 10 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 10 minutes, the metric will be cut in half.  If the metric ever increases above 5000 (5 flaps in <10 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 1 half-life decay of the minimum suppression metric.  The maximum a route can be suppressed is 15 minutes.

 

DAMPING-TIMID (A less “aggressive” policy with shorter hold times):

  • 1 route flap / 3 minutes
  • If a route flaps 5 times in less than 15 minutes, it will be suppressed for 15 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 15 minutes, the metric will be cut in half.  If the metric ever increases above 5000 (5 flaps in <15 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 1 half-life decay of the minimum suppression metric.  The maximum a route can be suppressed is 30 minutes.

 

DAMPING-DEFAULT (The JUNOS default damping policy):

  • 1 route flap / 5 minutes
  • If a route flaps 3 times in less than 15 minutes, it will be suppressed for 30 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 15 minutes, the metric will be cut in half.  If the metric ever increases above 3000 (3 flaps in <15 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 2 half-life decays of the minimum suppression metric.  The maximum a route can be suppressed is 60 minutes.

 

DAMPING-LONGEST (An “aggressive” policy with very long hold times):

  • 1 route flap / 15 minutes
  • If a route flaps 3 times in less than 45 minutes, it will be suppressed for 90 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 45 minutes, the metric will be cut in half.  If the metric ever increases above 3000 (3 flaps in <45 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 2 half-life decays of the minimum suppression metric.  The maximum a route can be suppressed is 240 minutes.

 

DAMPING-AGGRESSIVE (A more “aggressive” policy with low flap tolerances):

  • 1 route flap / 15 minutes
  • If a route flaps 2 times in less than 15 minutes, it will be suppressed for 30 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 15 minutes, the metric will be cut in half.  If the metric ever increases above 2000 (2 flaps in <15 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 2 half-life decays of the minimum suppression metric. The maximum a route can be suppressed is 60 minutes.

 

DAMPING-LONGER (An “aggressive” policy with longer hold times):

  • 1 route flap / 30 minutes
  • If a route flaps 3 times in less than 30 minutes, it will be suppressed for 60 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 30 minutes, the metric will be cut in half.  If the metric ever increases above 3000 (3 flaps in <30 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 2 half-life decays of the minimum suppression metric.  The maximum a route can be suppressed is 120 minutes.

 

 

DAMPING-AGGRESSIVE-LONGER (An even more “aggressive” policy with low flap tolerances and higher hold times):

  • 1 route flap / 30 minutes
  • If a route flaps 2 times in less than 30 minutes, it will be suppressed for 60 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 30 minutes, the metric will be cut in half.  If the metric ever increases above 2000 (2 flaps in <30 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 2 half-life decays of the minimum suppression metric.  The maximum a route can be suppressed is 120 minutes.

 

DAMPING-AGGRESSIVE-LONGEST (A VERY “aggressive” policy with low flap tolerances and VERY high hold times):

  • 1 route flap / 45 minutes
  • If a route flaps 2 times in less than 45 minutes, it will be suppressed for 90 minutes.
  • When a route flaps, a metric of 1000 is added to the route.  This metric begins decaying immediately.  After 45 minutes, the metric will be cut in half.  If the metric ever increases above 2000 (2 flaps in <45 minutes), the route is suppressed until the “reuse” metric is reached.  The reuse metric is set for 2 half-life decays of the minimum suppression metric.  The maximum a route can be suppressed is 240 minutes.

 

 


Leave a Reply

There aren't any comments at the moment, be the first to start the discussion!