BGP Route Dampening (2024)

Lesson Contents

A flapping route is an unstable route that is advertised and withdrawn over and over again. Every time a flap occurs, a BGP UPDATE message is sent. When routers have to process many BGP UPDATE messages, their CPU load increases.

BGP route dampening can be used to prevent installing flapping BGP routes and forwarding them to other BGP routers. This decreases the CPU load of routers and increases network stability. Nowadays, routers are powerful enough to process BGP updates so dampening isn’t considered a best practice anymore. Back in the 90s, routers weren’t so powerful.

In fact, there are issues with best path selection when you use BGP route dampening so you shouldn’t blindly enable this feature for all routes.




Let’s take a look at how BGP route dampening works. There are five attributes:

  • Penalty: 1000
  • Suppress-Limit: 2000
  • Half-Life: 15 minutes
  • Reuse limit: 750
  • Maximum Suppress-Limit: 60 minutes

I included the default values for Cisco IOS. In a nutshell, here’s how it works:

  • Each time a route flaps, the penalty is increased by 1000.
  • When the route exceeds the suppress limit, the route is dampened.
  • Once the route is dampened, the router won’t install the route in the routing table nor advertise it to other BGP neighbors.
  • When the router learns again about a route with a penalty, the half-life timer starts. When half-life is reached, the penalty is reduced by 50%.
  • To install or advertise the route again, the penalty has to be lower than a reuse limit.
  • Once the penalty is below 50% of the reuse limit, the penalty is removed completely.

Let me give you an example:

  • The penalty is 4000 and the half-life time is 15 minutes.
  • After 15 minutes the penalty is 2000.
  • After another 15 minutes, the penalty is 1000.
  • Another 15 minutes and the penalty is 500.

Once the penalty is below the reuse limit of 750, the route can be used again and advertised to other BGP routers. When the penalty is below 50% of the reuse limit, the penalty is removed from the route.

The maximum suppress limit ensures that a route won’t be dampened forever. The maximum suppress time is 60 minutes by default.

Configuration

Let’s see how we configure BGP dampening. This is the topology we’ll use:

BGP Route Dampening (1)

I’m using IOSv Software version 15.9(3)M2.

Configurations

Want to take a look for yourself? Here you will find the startup configuration of each device.

R1

hostname R1!ip cef!interface Loopback0 ip address 1.1.1.1 255.255.255.255!interface GigabitEthernet0/0 ip address 192.168.12.1 255.255.255.0!router bgp 1 network 1.1.1.1 mask 255.255.255.255 neighbor 192.168.12.2 remote-as 2 !end

R2

hostname R2!ip cef!interface GigabitEthernet0/0 ip address 192.168.12.2 255.255.255.0!router bgp 2 neighbor 192.168.12.1 remote-as 1!end

There are two routers, each in their own AS. R1 has a loopback interface that we advertise through BGP.

We have two options to configure BGP route dampening:

  • Global
  • Route-map

Global

When you enable BGP route dampening globally, it affects all routes. This is how to enable it:

R2(config)#router bgp 2R2(config-router)#bgp dampening

Route-Map

The alternative is to include a route-map. This way, you can specify which routes you want to enable dampening for:

R2(config)#ip access-list standard R1_L0R2(config-std-nacl)#permit host 1.1.1.1R2(config)#route-map DAMPENING permit 10R2(config-route-map)#match ip address R1_L0R2(config-route-map)#set dampening 15 750 2000 60 R2(config)#router bgp 2R2(config-router)#bgp dampening route-map DAMPENING

I’ll keep it simple and use the global option for now.

Verification

Let’s see what we have. R2 has learned route 1.1.1.1/32 from R1:

R2#show ip bgpBGP table version is 2, local router ID is 192.168.12.2Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 1.1.1.1/32 192.168.12.1 0 0 1 i

The route is installed in the routing table:

R2#show ip route bgp 1.0.0.0/32 is subnetted, 1 subnetsB 1.1.1.1 [20/0] via 192.168.12.1, 00:07:15

Let’s try whether route dampening works or not. Let’s check the timers. You can see them in the running configuration:

R2#show run all | include dampening bgp dampening 15 750 2000 60

Or you can use this show command:

R2#show ip bgp dampening parameters dampening 15 750 2000 60 (DEFAULT) Half-life time : 15 mins Decay Time : 2320 secs Max suppress penalty: 12000 Max suppress time: 60 mins Suppress penalty : 2000 Reuse penalty : 750

To see route dampening in action, I’ll enable a debug on R2:

R2#debug ip bgp dampeningBGP dampening debugging is on for all address families

To simulate a flapping route, we’ll shut the loopback interface of R1:

R1(config)#interface Loopback 0R1(config-if)#shutdown

Now take a look at R2:

R2#debug ip bgp dampeningBGP dampening debugging is on for all address familiesR2#EvD: charge penalty 1000, new accum. penalty 1000, flap count 1EvD: unsuppress item left in reuse timer array with penalty 1000BGP(0): charge penalty for 1.1.1.1/32 path 1 with halflife-time 15 reuse/suppress 750/2000BGP(0): flapped 1 times since 00:00:00. New penalty is 1000

In the output above, you can see that route 1.1.1.1/32 has flapped 1 time and now has a penalty of 1000. If you wait, you’ll also see some debug messages:

R2#EvD: accum. penalty decayed to 958 after 60 second(s)EvD: accum. penalty decayed to 924 after 60 second(s)

In the output above, we can see that the penalty is slowly decreasing (decaying).

R2#show ip bgp dampening flap-statistics BGP table version is 3, local router ID is 192.168.12.2Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not found Network From Flaps Duration Reuse Path h 1.1.1.1/32 192.168.12.1 1 00:02:19 1

Even though the 1.1.1.1/32 route is now gone, R2 keeps track of it. You can see the current penalty here:

R2#show ip bgp 1.1.1.1/32BGP routing table entry for 1.1.1.1/32, version 14Paths: (1 available, best #1, table default) Not advertised to any peer Refresh Epoch 1 1 192.168.12.1 from 192.168.12.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best Dampinfo: penalty 872, flapped 1 times in 00:02:29 rx pathid: 0, tx pathid: 0x0

Let’s see if we can get this route dampened. I’ll make the loopback interface flap one more time:

R1(config)#interface Loopback 0R1(config-if)#no shutdownR1(config-if)#shutdown

This is what we see on R2:

R2#EvD: charge penalty 1000, new accum. penalty 1835, flap count 2EvD: unsuppress item left in reuse timer array with penalty 1835BGP(0): charge penalty for 1.1.1.1/32 path 1 with halflife-time 15 reuse/suppress 750/2000BGP(0): flapped 2 times since 00:03:52. New penalty is 1835

The route receives another penalty (1000) and the current penalty is 1835. This is still below the suppress-limit threshold (2000) so we’ll make the interface flap one more time:

R1(config)#interface Loopback 0R1(config-if)#no shutdownR1(config-if)#shutdown

The route gets another penalty:

R2#EvD: charge penalty 1000, new accum. penalty 2691, flap count 3EvD: unsuppress item left in reuse timer array with penalty 2691BGP(0): charge penalty for 1.1.1.1/32 path 1 with halflife-time 15 reuse/suppress 750/2000BGP(0): flapped 3 times since 00:05:44. New penalty is 2691

We are now above the suppress-limit threshold (2000) so let’s see what happens when we enable the loopback interface again:

R1(config)#interface Loopback 0R1(config-if)#no shutdown

R2 now dampens the route:

R2#BGP(0): suppress 1.1.1.1/32 path 1 for 00:24:40 (penalty 2349)halflife-time 15, reuse/suppress 750/2000EvD: accum. penalty 2349, now suppressed with a reuse intervals of 148

R2 suppresses the router and won’t use it. We can also see this in the following show command:

R2#show ip bgp dampening flap-statistics BGP table version is 7, local router ID is 192.168.12.2Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not found Network From Flaps Duration Reuse Path*d 1.1.1.1/32 192.168.12.1 3 00:09:27 00:02:09 1 

The route shows up as dampened. You can also use this show command:

R2#show ip bgp dampening dampened-paths BGP table version is 7, local router ID is 192.168.12.2Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not found Network From Reuse Path*d 1.1.1.1/32 192.168.12.1 00:01:59 1 i

The route still shows up in the BGP table:

R2#show ip bgpBGP table version is 7, local router ID is 192.168.12.2Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, t secondary path, Origin codes: i - IGP, e - EGP, ? - incompleteRPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *d 1.1.1.1/32 192.168.12.1 0 0 1 i

But it won’t be installed in the routing table:

R2#show ip route bgp

If you have fixed the issue why the route is flapping, you can also clear bgp dampening manually with the clear ip bgp dampening 1.1.1.1 255.255.255.255 command.

if you wait long enough, the route will be used again:

R2#EvD: accum. penalty decayed to 2634 after 60 second(s)EvD: accum. penalty decayed to 2513 after 60 second(s)EvD: accum. penalty decayed to 2422 after 60 second(s)[output omitted]EvD: accum. penalty decayed to 882 after 60 second(s)EvD: accum. penalty decayed to 748 after 60 second(s)EvD: accum. penalty 748, now unsuppressedBGP(0): Unsuppressed 1.1.1.1/32, path 1EvD: accum. penalty decayed to 729 after 60 second(s)EvD: accum. penalty decayed to 695 after 60 second(s)

Once the penalty is below the reuse limit (750), we can use the route again. You won’t see the route anymore in this show command:

BGP Route Dampening (2024)

FAQs

BGP Route Dampening? ›

BGP route dampening can be used to prevent installing flapping BGP routes and forwarding them to other BGP routers. This decreases the CPU load of routers and increases network stability. Nowadays, routers are powerful enough to process BGP updates so dampening isn't considered a best practice anymore.

What is damping in BGP? ›

BGP flap damping is a method of reducing the number of update messages sent between BGP peers, thereby reducing the load on these peers, without adversely affecting the route convergence time for stable routes.

What is dampening in networking? ›

About dampening

The interface dampening feature uses an exponential decay mechanism to prevent excessive interface flapping events from adversely affecting routing protocols and routing tables in the network. Suppressing interface state change events protects the system resources.

What causes BGP flapping? ›

Transient BGP Flaps are defined as any rapid or temporary changes in a Border Gateway Protocol (BGP) session status. This can happen due to a number of reasons such as hardware failure, software bugs, or human errors.

Why is a BGP route suppressed? ›

Network operators can suppress BGP route installation in the route table when they know that the router can forward the associated traffic anyway; for example, using a default or summary route. By suppressing BGP route installation, CPM memory is saved as well as FIB table space in the line cards.

What are the 3 types of damping? ›

There are 3 primary types of damping: overdamping, critical damping, and under damping. We will explore what each of these 3 types of damping entails.

What are the 4 types of damping? ›

##Types of Damping :
  • Viscous damping.
  • Coulomb or Dry Friction Damping.
  • Solid or Structural Damping or Material or Hysteretic Damping.
  • Slip or Intrefacial damping.
  • Magnetic Damping.

What is the difference between damper and damping? ›

The damper is a mechanical device used in automobiles to absorb shock, hence it is also called a shock absorber. The damping done with the help of fluids is viscous damping, it is more effective in providing resistance to vibration.

What is IP event dampening flapping? ›

event dampening--The process in which a router dampens a flapping interface from the perspective of the routing tables and routing protocols of IP and CLNS by filtering the excessive route adjust message because of the interface state change.

What is the dampening command in Cisco? ›

The dampening command is entered in interface configuration mode to enable the IP Event Dampening feature. If this command is applied to an interface that already has dampening configured, all dampening states are reset and the accumulated penalty will be set to 0.

How common is BGP hijacking? ›

While that incident was noticeable for its scale and impact, it's far from the only time BGP hijacking affected Internet service in 2020. It's so common that Siddiqui's Internet Society colleagues estimate that 2,477 BGP hijacking incidents occurred last year, nearly seven per day.

Why is BGP insecure? ›

The challenge with BGP is that the protocol does not directly include security mechanisms and is based largely on trust between network operators that they will secure their systems correctly and not send incorrect data.

What is BGP weakness? ›

The threat of route Hijacking

The main weakness of BGP is that it is based on the principle of absolute trust, assuming that routers in interconnected networks never lie when advertising the IP address pools, they have.

Why use BGP instead of static route? ›

So in short, BGP is useful for influencing outgoing traffic, but is more useful for influencing the route of incoming traffic.

When should BGP not be used? ›

Those neighbors cannot be trusted, and the information you exchange with those neighbors is (if BGP is configured properly) carefully controlled with route policies. But if connection to an external domain is your only requirement—particularly if there is only one connection—BGP is probably not called for.

What does damping a signal mean? ›

The action of a substance or of an element in a mechanical or electrical device that gradually reduces the degree of oscillation, vibration, or signal intensity, or prevents it from increasing.

What is an example of damping? ›

Some of the damping examples are carpet pads, vibrating springs, shock absorbers in automobiles, sounds produced by tuning forks over long distances, clock pendulum, oscillations of the branch of a tree, RLC circuits, etc.

What is damping in stability? ›

Damping: An engineering concept used in system designs to control energy dissipation. Damping Coefficient: A term used to describe the level of energy dissipation in a system. It affects the stability and response of systems.

What is the term damping? ›

damping, in physics, restraining of vibratory motion, such as mechanical oscillations, noise, and alternating electric currents, by dissipation of energy.

Top Articles
Latest Posts
Article information

Author: Terrell Hackett

Last Updated:

Views: 6149

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Terrell Hackett

Birthday: 1992-03-17

Address: Suite 453 459 Gibson Squares, East Adriane, AK 71925-5692

Phone: +21811810803470

Job: Chief Representative

Hobby: Board games, Rock climbing, Ghost hunting, Origami, Kabaddi, Mushroom hunting, Gaming

Introduction: My name is Terrell Hackett, I am a gleaming, brainy, courageous, helpful, healthy, cooperative, graceful person who loves writing and wants to share my knowledge and understanding with you.