What is BGP Flapping? How to troubleshoot BGP Flapping?

Google ADs

BGP flapping occurs when a BGP route repeatedly goes up and down, causing frequent route updates. This instability can lead to excessive CPU usage and routing table churn across the network.

BGP or Border gateway protocol acts as an Internet postal service and a very crucial protocol which facilitates routing information exchange between enormous networks. However, like any other communication exchange which happens on the Internet BGP is also not spared from its smooth working and impacted by a common phenomenon known as flapping which can disrupt crucial communications, compromise network stability leading to network outages. In this article we will try to understand more in detail the causes of flapping, its potential consequences, how to troubleshoot flapping issues and most importantly understand prevention methodologies. 

BGP Flapping 

Series of uncontrolled, rapid and repetitive changes in routing advertisements in BGP create instability in routing tables leading to BGP flapping issues. This unpredictable behavior is result of various factors such as:

Google ADs

  • Malfunctioning of hardware – Physical network hardware equipment failure such as routers, faulty cables, memory deficiencies can disrupt BGP sessions and lead to route flapping issues. 
  • Configuration errors – Erroneous BGP configuration pertaining to neighbor address, autonomous system (AS) numbers, route filtering policies could lead to inconsistent route advertisements resulting in flapping.
  • Network congestion – Delays in BGP updates can be attributed to high volumes of sudden traffic which may manifest in flapping irrespective  of whether the underlying infrastructure is stable.
  • Software bugs – At times bugs in software deployed on routers or glitches could also be the reason for abnormal route advertisements resulting in flapping issues.

Impact of BGP Flapping

The BGP flapping impact is detrimental and leads to several issues such as :

  • Instability in Routing –  uncontrolled route announcements lead to re-calculation of routing tables again and again by routers. Frequent changes lead to routing instabilities resulting in unpredictable routing behavior. 
  • Loss of Packets – data packets are dropped intermittently or misdirected due to surge in routing table information overhaul which negatively impacts services availability 
  • Performance Degradation – increased processing demand due to BGP flapping strain the router resources and lead to network slowdown, performance degradation. 

How to troubleshoot BGP Flapping?

To troubleshoot BGP flapping issues it is important to follow a systematic approach. We will walk-through the troubleshooting steps as under: 

I. Investigate neighbor device advertisements 

To monitor the volume of packets advertised by the neighbor router over a range of time use show bgp summary command. The trends will be indicative to understand how normal advertisements flow and deviations from that indicate potential flapping. The BGP table version is incremented by 1, whenever a new BGP path is chosen but in the below example the BGP table version is shown as ‘133’. Rapid increase in BGP table version could be an indicator of flapping issues. 

R1#show ip bgp summary
BGP table version is 133 

For deeper insight into irregularities in route advertisement with specific neighbors with continuously increasing number of BGP updates indicate potential flapping issue. The high value indicates the neighbor is continuously advertising / withdrawing routes. 

R1#show ip bgp neighbors 

II. Analyze local route calculation

R1#show bgp 20.20.20.0 <specified network prefix>
‘Path: (1 available , no best path) 

#show ip route A.B.C.D command to control route stability in BGP route for next hop. Frequent changes between valid / invalid state indicates route flapping issue.

R1#show ip route 2.2.2.2
% network not in table 
R1# 

Historical analysis of IP bgp A.B.C.D command indicates route attributes modification which indicate redistribution or software related issues.

III. Neighbor device is flapping

If previous steps indicate no issues then it is time  to check the neighbor device to get to the root cause of unwarranted route updates coming from the BGP neighbor. 

Preventive Measures for BGP Route Flapping 

To get early insight into flapping such as increased frequency of route withdrawals and announcements proactive monitoring BGP routing tables is essential and valuable. 

  • Route dampening technique is used to suppress route instability which are prone to flapping. Frequently flapping routes are penalized to contain the frequency of changes which impact the routing table stability. 
  • Network configuration optimization is achieved with regular network Configuration audits are done to ensure settings are intact and optimized as per current networking requirements. Correcting misconfigurations and updating out of date policies help in  reduction of flapping issues. 
  • Optimization of peer relationships – carefully choosing peers and establishing detection mechanism to detect flapping , implementing strict filters and session parameters to optimize the routes 
  • Network redundancy can be used as a means to establish alternate paths / routes for data transfer so as to reduce the impact of flapping.
  • Software and hardware upgrades – timely upgrade of software and hardware for routing devices help in Maintaining a robust network posture
  • BGP community attributes utilization – tagging routes with specific attributes help in controlling how routes will be propagated or suppressed across networks and this control helps in stabilizing BGP announcements and reducing flapping issues. 

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart