BGP Typo: A Longitudinal Study and Remedies

Liron David,Yuval Shavitt
2023-11-01
Abstract:BGP is the protocol that keeps Internet connected. Operators use it by announcing Address Prefixes (APs), namely IP address blocks, that they own or that they agree to serve as transit for. BGP enables ISPs to devise complex policies to control what AP announcements to accept (import policy), the route selection, and what AP to announce and to whom (export policy). In addition, BGP is also used to coarse traffic engineering for incoming traffic via the prepend mechanism. However, there are no wide-spread good tools for managing BGP and much of the complex configuration is done by home-brewed scripts or simply by manually configuring router with bare-bone terminal interface. This process generates many configuration mistakes. In this study, we examine typos that propagates in BGP announcements and can be found in many of the public databases. We classify them and quantify their presence, and surprisingly found tens of ASNs and hundreds of APs affected by typos on any given time. In addition, we suggest a simple algorithm that can detect (and clean) most of them with almost no false positives.
Networking and Internet Architecture
What problem does this paper attempt to address?
The problem that this paper attempts to solve is typos in BGP (Border Gateway Protocol) announcements. These errors are usually introduced by network operators when manually configuring BGP, resulting in corrupted route announcements. Specifically, the paper focuses on the following points: 1. **Classifying and Quantifying Typos in BGP Announcements**: The paper classifies typos in BGP announcements and quantifies the frequency of these errors. The authors find that these errors are widespread in public databases, affecting dozens of Autonomous System Numbers (ASNs) and hundreds of Address Prefixes (APs). 2. **Proposing Detection and Cleaning Algorithms**: The paper proposes a simple algorithm that can detect and clean up most typos with almost no false positives. This helps to improve the accuracy and reliability of BGP configurations. ### Main Problems: - **Types of Typos**: - **Prepend Count**: Operators insert a prepend count at the end of the path, such as "X 3" or "X X X 3". - **Swap Digits**: Operators swap two consecutive digits when prepending an ASN. - **Insert/Delete One Digit**: Operators input one more or one less digit when prepending an ASN. - **Missing Space**: Operators miss the space between two ASNs when prepending an AS. - **Other Rare Errors**: For example, using a very large prepend count or a private ASN. - **Impacts of Typos**: - **Routing Selection Problems**: Incorrect BGP announcements may lead to routing selection errors and even form routing loops. - **Data Pollution**: These errors pollute many public databases, such as RIPE, CAIDA, and Hurricane Electric, resulting in incorrect AP ownership and AS relationships. - **Security Problems**: Incorrect BGP announcements may trigger the routing hijacking detection system, especially with the increasing deployment of RPKI (Resource Public Key Infrastructure). ### Solutions: - **Detection Algorithms**: - **Loop Detection**: If there is a loop in the path, it is considered a typo. - **Origin Matching**: Check whether the last ASN in the path is the owner of the AP. If not, it is considered a typo. - **Geographical Loop Detection**: Check whether the ASNs in the path form a cross - country geographical loop. - **Inactive ASN Detection**: If an ASN is inactive (does not announce any AP), it is considered a typo. - **Evaluation Results**: - The detection rate of the detection algorithm for type 2 and type 3 typos is almost always between 80% and 100%. - The false positive rate is very low, especially for type 2 typos, with almost no false positives. ### Conclusion: Through detailed analysis and algorithm design, the paper shows how to effectively detect and clean up typos in BGP announcements, thereby improving the reliability and security of Internet routing. At the same time, the authors call for the development of better tools to mechanize the BGP configuration process and reduce human errors.