Dampening BGP Peer Flap

BGP Peer Flap dampening is used to prevent unstable BGP peers from bringing down the network. Unstable peers cause a change in the routing state that requires forwarding entries to be added or removed from the forwarding table.

Adding or removing entries from the forwarding table is computationally intensive and could result in the router not being able to maintain its BGP or IBGP sessions due to it being busy. This could, sometimes, result in the router becoming unresponsive.

When a router becomes unresponsive, it can cause an increase in the network which may result in unexpected behavior and further disruptions. In some cases, it could also result in a state of stable oscillation, which has to be avoided and is harder to recover.

The optional session attribute suggested in RFC-4271-section 8.1.1, DampPeerOscillations indicates that the BGP connection is using logic that damps BGP peer oscillations in the Idle State.

How it works

A stable BGP Peer will be in the Established state. When there is a flap in the peer session, the peer is considered to be unstable and placed in the Idle state. Whenever the peer is placed in the Idle state, the Idle-Hold timer is started.

If this is the first time the peer is placed in the Idle state, the Idle-Hold timer is initialized with the value specified in the Delay-Hold configuration, else, a time penalty is added to the Idle-Hold timer. This penalty time is defined in the Penalty configuration.

For every subsequent flap, the Penalty value is added to the Idle-Hold time till the Idle-Hold timer value reached the value specified in the Maximum-Penalty upper limit value. When the Idle-Hold timer reaches or exceeds the Maximum-Penalty value, the Penalty value will not be added to the Idle-Hold for subsequent flaps.

When the peer's status changes from Idle to Established, the Stability-Interval timer starts. If the BGP peer remains stable (error-free) till the expiry of the Stability-Interval timer, the Idle-Hold timer is reduced by the Penalty value. This is done every time the peer is stable for the Stability-Interval period till the Idle-Hold timer reaches zero (0).

If the value of the Idle-Hold timer is lesser than the Penalty value, i.e., reducing the Penalty value from the Idle-Holdvalue causes the Idle-Hold value to go below zero (0), then the Idle-Hold value is reduced by the value specified in the Delay-Hold value.

Click to expand in new window
Click to expand in new window
Peer Dampening