How does BGP work, and why can one mistake take part of the internet offline?
The internet is a network of networks. Each large network, called an autonomous system (an ISP, a cloud provider, a big company), needs to tell the others which IP address ranges it can deliver traffic to. That's the job of BGP, the Border Gateway Protocol.
How it works, simplified:
- Each network announces the address ranges (prefixes) it owns or can reach.
- Neighboring networks pass those announcements along, adding themselves to the path.
- Routers choose a path for each destination based on the announcements they receive and local policies, such as preferring cheaper or shorter routes.
Why mistakes spread: BGP was designed in an era when participating networks largely trusted each other. By default, a router may accept an announcement without strong proof that the announcing network is entitled to those addresses.
Things that go wrong:
- Route leaks: a network accidentally re-announces routes it shouldn't, pulling traffic through a path that can't handle it.
- Hijacks: a network announces someone else's addresses, by mistake or deliberately.
- Withdrawals: a configuration error withdraws a company's routes, making its services unreachable even though its servers are fine.
How it's being made safer:
- RPKI lets networks cryptographically sign which network may originate which prefixes, so others can reject invalid announcements.
- Route filtering between networks limits what each neighbor is allowed to announce.
Have you ever had a service outage traced back to routing rather than your own systems? Do you think RPKI adoption is moving fast enough?
Comments · 5
The trust-based part is what surprised me. Networks basically announce routes and the others mostly believe them.
BGP was designed around trust between networks, so a wrong announcement can spread because neighbours have little to verify it with. What's the real-world adoption of route filtering and origin validation? I'd like to know how much of the internet is protected.
We felt one of these outages as a customer. Even if your own stack is fine, a bad route upstream makes you look down. Multi-provider setups are the only hedge.
Are there safeguards being rolled out to stop bogus routes spreading? I vaguely remember something called RPKI.
Yes, RPKI lets networks cryptographically sign which AS may originate a prefix, and more providers filter on it. Adoption is growing but still uneven.