Dampening
Scenario to verify BGP dampening parameter configuration.
By default, BGP processes all route updates immediately, including routes that frequently
change state. When a route repeatedly appears and disappears, it consumes CPU resources
and can cause network instability. Route-flap dampening addresses this problem by assigning
penalties to unstable routes. When a route flaps, its penalty increases, and once the penalty
exceeds a threshold, the route is marked as damped with the d flag and is no longer
advertised to peers, even though it remains visible in the BGP table.
The dampening parameter requires four values that control the penalty system. The
half-life determines how quickly penalties decay over time. The start-suppress-time
sets the penalty threshold that triggers suppression. Once suppressed, a route remains
damped until its penalty drops below re-use. The max-suppress-time caps how
long any route can be suppressed regardless of its penalty.
In this test, DUT0 (AS 100) establishes an eBGP session with DUT1 (AS 200). The test
configures aggressive dampening values to demonstrate the feature quickly. After simulating
route flapping by repeatedly toggling redistribute connected, the route accumulates penalties
and becomes suppressed, appearing with the d flag in the BGP table and in the dampening
statistics. These aggressive values are optimized for testing; production environments typically
use more conservative values to balance stability with responsiveness.
Test BGP Dampening
Description
This test verifies that route-flap dampening suppresses unstable routes by accumulating
penalties. After configuring aggressive dampening values (1/1/1/1) on DUT0, the test
simulates route flapping by repeatedly toggling redistribute connected on DUT1. The route
quickly accumulates penalties and becomes suppressed, marked with the d (damped) flag in
the BGP table. The test verifies the route appears in dampening statistics and is no longer
advertised to peers until it stabilizes.
Scenario
Note
Enable dampening on DUT0 with aggressive values for fast testing (1/1/1/1). These values cause dampening to trigger quickly after just a few flaps. Production environments typically use more conservative values like 15/750/2000/60.
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.10.0.100/24 set protocols bgp 100 neighbor peer remote-address 10.10.0.200 set protocols bgp 100 neighbor peer remote-as 200 set protocols bgp 100 neighbor peer route-map import PERMIT set protocols bgp 100 parameters dampening half-life 1 set protocols bgp 100 parameters dampening max-suppress-time 1 set protocols bgp 100 parameters dampening re-use 1 set protocols bgp 100 parameters dampening start-suppress-time 1 set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.10.0.200/24 set protocols bgp 200 neighbor peer remote-address 10.10.0.100 set protocols bgp 200 neighbor peer remote-as 100 set protocols bgp 200 neighbor peer route-map export PERMIT set protocols bgp 200 redistribute connected route-map PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify eBGP session establishes between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.10.0.200.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.10.0.100, local AS number 100 VRF default vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 1, using 24 KiB of memory Dampening enabled. Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 10.10.0.200 10.10.0.100 4 200 2 4 0 0 0 00:00:01 Established 0 (Policy) N/A Total number of neighbors 1
Attention
Verify dampening parameters are configured correctly on DUT0.
Step 4: Run command protocols bgp show ip dampening parameters at DUT0 and check if output matches the following regular expressions:
Half-life time: 1 min[\s\S]+Reuse penalty: 1[\s\S]+Suppress penalty: 1[\s\S]+Max suppress time: 1 minShow output
Half-life time: 1 min Reuse penalty: 1 Suppress penalty: 1 Max suppress time: 1 min Max suppress penalty: 2
Attention
Verify DUT0 initially receives the connected network from DUT1.
Step 5: Run command protocols bgp show ip at DUT0 and check if output matches the following regular expressions:
[*](u|>).*10.10.0.0/24Show output
BGP table version is 1, local router ID is 10.10.0.100, vrf id 0 Default local pref 100, local AS 100 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *u 10.10.0.0/24 10.10.0.200 0 0 200 ? Displayed 1 routes and 1 total paths
Note
Simulate aggressive route flapping (5 times) with short intervals to accumulate penalties rapidly.
Attention
Verify route is now suppressed (damped) and appears in dampening statistics. The route accumulated penalties from flapping and exceeded the start-suppress-time threshold.
Step 6: Run command protocols bgp show ip dampening dampened-paths at DUT0 and check if output matches the following regular expressions:
d.+10.10.0.0/24Show output
BGP table version is 2, local router ID is 10.10.0.100, vrf id 0 Default local pref 100, local AS 100 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network From Reuse Path *d 10.10.0.0/24 10.10.0.200 00:01:00 200 ? Displayed 1 routes and 1 total paths
Attention
Verify route appears with damped flag *d in BGP table.
The asterisk indicates the route is valid, and the d flag shows it is damped and not being advertised.
Step 7: Run command protocols bgp show ip at DUT0 and check if output matches the following regular expressions:
d.+10.10.0.0/24Show output
BGP table version is 2, local router ID is 10.10.0.100, vrf id 0 Default local pref 100, local AS 100 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *d 10.10.0.0/24 10.10.0.200 0 0 200 ? Displayed 1 routes and 1 total paths