Why BGP Exists
How the internet stitches independently run networks together, and why that job needs a protocol built for policy and scale rather than shortest path.
Why BGP exists
Nobody owns the internet. There is no single network with a single operator and one master routing table. What we call "the internet" is really tens of thousands of separate networks (ISPs, cloud providers, universities, banks, the company that streams your shows) that have each agreed to pass traffic to one another. Every one of those networks is an autonomous system, or AS: one organization, one routing policy, one block of IP addresses, run independently of all the rest.
So here is the problem. You have all these independent networks, each minding its own business. How does a single packet get from inside one of them to inside another? That is the entire reason the Border Gateway Protocol exists.
Inside one network: interior gateway protocols
Within a single AS, the routers still have to find each other. That job belongs to an interior gateway protocol (IGP). You have probably met a few:
- OSPF and IS-IS build a complete map of the network (link-state).
- RIP is the old distance-vector protocol: simple, and limited.
- EIGRP is Cisco's more capable distance-vector option.
The mechanics differ, but every IGP leans on the same three assumptions. It hunts for the shortest path, whether that means lowest cost or fewest hops. It trusts every router it talks to, because they all belong to the same organization. And it expects a manageable number of routes, anywhere from a handful to a few thousand, the size of one company's network.
Inside an AS, those assumptions are exactly right. Try to route the whole internet with them and all three fall apart.
Why an IGP can't run the internet
Start with scale. The global routing table a backbone router has to carry (the "default-free zone," if you want the jargon) is past 950,000 IPv4 routes and still climbing. An IGP that floods a map of every link to every router would collapse under that load. It was never meant for hundreds of thousands of prefixes spread across tens of thousands of networks.
Then there is trust, which is the interesting one. AT&T does not trust Google's routers, and it shouldn't. These are different companies, sometimes direct competitors. You cannot just believe whatever routes a neighbor hands you and install them. Routing between networks has to be filtered and checked, not accepted on good faith.
And then policy, where it all comes together. Between networks, the best path is hardly ever the shortest one. It is the one that makes business sense. Networks tend to sit in a few familiar relationships:
- A customer pays you to carry its traffic, so you are glad to route to it.
- A peer swaps traffic with you for free, but only its traffic and yours.
- A provider is the network you pay to reach everything else.
Any operator watching a budget would rather hand a packet to a customer than a peer, and to a peer than a provider it pays, even when the paid route is a hop or two shorter. An IGP has no vocabulary for "this path is cheaper for my business." It only understands distance. That missing vocabulary is exactly what BGP supplies.
BGP: the one protocol between networks
BGP is the exterior gateway protocol (EGP), the one that runs between autonomous systems and stitches them into a single internet. In practice it is the only EGP anyone uses; nothing else runs the global table. IGPs handle the inside of a network, BGP handles the borders.
Here is what makes it tick: BGP cares about policy and control, not shortest path. It does not ask how many hops away something is. It asks which path you choose, given your business relationships, your filters, and what you are even willing to advertise to a neighbor. Reachability and policy do the deciding; hop count is buried far down the tie-breaker list. BGP is less a navigation algorithm and more a way to express and enforce routing policy everywhere two networks meet.
Built for scale and quiet
Carrying close to a million routes across the planet only works if the protocol refuses to redo work it has already done. BGP is built to sit still.
It runs over TCP, on port 179, so it inherits reliable, ordered delivery and never has to invent its own retransmission logic. When two routers first connect, they trade their full tables once. After that they send only changes: a new prefix here, a withdrawn path there. No timer, no periodic re-announcing of everything the way older protocols do. A link nobody touches generates no messages at all. With a million prefixes in play, anything noisier would be hopeless.
Who actually runs BGP?
Anyone who holds an autonomous system number (ASN) and connects to more than one other network:
- ISPs and transit providers, whose whole business is moving other people's traffic.
- Content and cloud companies like Google, Cloudflare, Netflix, and AWS, which announce their address space to the world and steer how you reach them.
- Larger enterprises that are multi-homed: they buy connections from two or more upstreams for redundancy, then run BGP to use both and survive losing one.
If you have a single connection from a single provider, you do not need any of this. A default route ("send everything that way") covers it. BGP starts to earn its place the moment your network's edge has a real choice to make.
What's next
So that is the why. The internet is a pile of independent autonomous systems, IGPs can neither scale to it nor express policy across the lines between companies, and BGP is the policy-first protocol that ties those systems together. Next we get specific about the AS itself: what it is, how autonomous system numbers get handed out, and how public and private ASNs differ, in bgp-autonomous-systems.