What Is BGP Routing and Why Does It Fail? Internet Outages & Route Leaks

What Is BGP Routing and Why Does It Fail? Internet Outages & Route Leaks

When half the global internet suddenly goes dark—taking down major platforms like Cloudflare, Meta, Amazon AWS, or global banking networks in a matter of seconds—the underlying cause is almost never a severed undersea cable or a cyber physical attack. Instead, the failure is almost always traced to a single, fragile protocol designed in 1989 on the back of three ketchup-stained napkins: **the Border Gateway Protocol (BGP)**. How does BGP route global internet traffic, and why does it fail so catastrophically?

1. What Is BGP? The Global Postal System of the Internet

The internet is not a single unified network; it is a sprawling collection of over 100,000 independently operated networks known as **Autonomous Systems (ASNs)**. Major telecom operators (AT&T, Lumen, Telia), cloud providers (AWS, Google, Microsoft), and hosting companies each control their own ASN (e.g. Google is AS15169, Cloudflare is AS13335).

BGP is the routing protocol that allows these 100,000+ Autonomous Systems to announce to one another: "Here are the IP address ranges (prefixes) I own, and here is the shortest path to reach them." Global core routers exchange these routing tables dynamically, constantly recalculating the optimal path for billions of data packets every millisecond.

2. 💥 The 3 Main Reasons BGP Fails and Causes Massive Outages

Failure Type Mechanism Impact Famous Real-World Incident
BGP Route Leak An ISP accidentally announces transit routes to another peer Massive traffic blackholing & congestion Allegro / Cloudflare Route Leak (2019)
BGP Hijacking (Malicious) A rogue ASN advertises IP prefixes it does not own Traffic interception & crypto theft Klaytn / MyEtherWallet DNS Hijack (2018)
Internal Configuration Withdrawal Automated scripts withdraw authoritative DNS IP routes Global disappearance from DNS & web Facebook / WhatsApp 6-Hour Outage (2021)

3. 🔓 The Fundamental Flaw of BGP: Built on Implicit Trust

When BGP was invented, the internet was a small academic network consisting of trusted research institutions. As a result, standard BGP has zero built-in cryptographic authentication. If a small regional ISP in Eastern Europe or South America mistakenly broadcasts a BGP announcement claiming it has the fastest, most direct route to Google's or Amazon's IP addresses, neighboring tier-1 transit routers will believe the announcement and redirect global traffic into the small ISP's narrow pipes, instantly creating a global internet black hole.

4. 🛡️ The Modern Fix: RPKI (Resource Public Key Infrastructure)

To prevent accidental route leaks and malicious BGP hijacking, the global networking community is actively deploying **RPKI (Resource Public Key Infrastructure)**:

  • Route Origin Authorization (ROA): Network owners create cryptographically signed certificates linking their IP address blocks to their specific Autonomous System Number (ASN).
  • Route Origin Validation (ROV): Core transit routers automatically drop any BGP route announcement that lacks a valid cryptographic ROA signature, neutralizing unauthorized routing claims before traffic is redirected.

5. 🧠 The BGP Path Selection Algorithm

When an Autonomous System router receives multiple competing routes to the same destination IP prefix, it applies a rigorous 8-step decision algorithm to pick the single active route:

  1. Highest Weight: Cisco-proprietary local metric.
  2. Highest Local Preference (LOCAL_PREF): Network administrator preference across the entire ASN.
  3. Locally Originated Routes: Prefer routes created within the local network.
  4. Shortest AS-Path: Routes traversing fewer Autonomous Systems are favored.
  5. Lowest Multi-Exit Discriminator (MED): Inbound traffic preference from external peers.
  6. eBGP over iBGP: Prefer routes learned from external peers over internal peers.
  7. Lowest IGP Metric to BGP Next Hop: Shortest internal network distance.
  8. Lowest BGP Router ID: Final deterministic tiebreaker.

6. 🌐 MANRS: The Global Initiative for Routing Security

To establish accountability across the global internet, the Internet Society established **MANRS (Mutually Agreed Norms for Routing Security)**. Network operators joining MANRS commit to four mandatory security actions: strict prefix filtering, anti-spoofing source address validation (BCP 38), coordinated global NOC contact registration, and universal RPKI deployment.

7. ⚡ BGP Anycast vs. Unicast: How Global CDNs Work

In traditional Unicast routing, an IP address belongs to a single physical server in one datacenter. In **BGP Anycast**, hundreds of server clusters in 300+ cities worldwide announce the exact same IP address (such as Cloudflare 1.1.1.1 or Google 8.8.8.8) into global BGP tables simultaneously.

When you query an Anycast IP, BGP routers naturally steer your packets to the geographically and topologically closest server node. If an Anycast datacenter in London experiences a power failure, BGP withdraws the local route announcement in under 5 seconds, and traffic automatically reroutes to Frankfurt or Amsterdam with zero service interruption.

8. 🔍 How to Inspect BGP Routes Using Looking Glass Servers

Network engineers and developers can inspect live global BGP routing tables using public **BGP Looking Glass servers** (such as lookingglass.he.net or lg.ring.nlnog.net). These portals allow you to view the exact AS-Path, community tags, and prefix origin validation status of any IP address on the internet in real time.

9. 🛡️ Autonomous System Peering Types: Transit vs. Peering vs. IXPs

Networks interconnect under BGP in three distinct business relationships: Transit (Paid IP transit), Settlement-Free Peering (Mutual exchange), and Internet Exchange Points (IXPs) like DE-CIX, AMS-IX, and IX.br. When peering relationships break down due to commercial contract disputes, traffic is suddenly forced through congested third-party transit providers, causing latency spikes.

⚡ Test Your ISP's Global Routing & Peering Latency

Measure your round-trip transit latency across multiple cloud backbones and edge nodes:

🎮 View Global Edge Node Latency Matrix →

Frequently Asked Questions

What is an Autonomous System Number (ASN) in BGP?

An ASN is a globally unique identifier assigned to an independent network (like an ISP, university, or tech enterprise) that controls its own routing policies under BGP.

What is a BGP route leak?

A BGP route leak occurs when an ISP accidentally advertises routing information received from one transit provider to another, causing global traffic to be routed through an unintended and congested path.

How does RPKI make internet routing safer?

RPKI uses cryptographic digital certificates to verify that an Autonomous System is authorized to advertise specific IP address blocks, preventing BGP hijacking.

Sources & References

See our research methodology for how we combine our own testing with public data sources.

About the Author

Dalto Cardoso is the founder of DCSpeedTest, a digital nomad who has tested internet connections across multiple countries and runs his own VPS infrastructure for clients worldwide. He holds certifications from Google and Meta Blueprint.