What Is BGP? The Protocol That Runs the Internet, Explained Simply

networkingbgprouting

If you’ve ever wondered how an email leaves your laptop and reliably finds a server on the other side of the planet, the short answer is BGP — the Border Gateway Protocol. It’s the routing protocol that stitches the entire internet together, and understanding it is one of the clearest dividing lines between a hobbyist and a professional network engineer.

Let’s break it down without the jargon.

The internet is a network of networks

The internet isn’t one giant network. It’s tens of thousands of independent networks — called Autonomous Systems (AS) — operated by ISPs, cloud providers, universities, and large companies. Each AS gets a unique number (an ASN), like a postal code for networks.

The problem: how does your ISP’s network know how to reach Google’s network, which might be five or six networks away? They need to advertise which destinations they can reach, and learn routes from their neighbors. That’s exactly what BGP does.

What BGP actually does

BGP is the protocol Autonomous Systems use to exchange reachability information. In plain terms, each network tells its neighbors: “I can reach these blocks of IP addresses — here’s the path to get to them.”

Two routers in different networks form a BGP peering session (a TCP connection on port 179) and then swap route advertisements. Over time, every router builds a map of the internet’s address space and the best path to each destination.

Key ideas to anchor on:

  • Prefixes: BGP advertises blocks of addresses (e.g. 203.0.113.0/24), not individual IPs.
  • AS path: Each advertisement carries the list of Autonomous Systems a route passed through. This both prevents loops and helps pick the best path.
  • Policy, not just speed: Unlike protocols inside a single network (like OSPF), BGP chooses paths based on business and policy — who you want to send traffic to, and who pays whom — not simply the fastest link.

eBGP vs iBGP

There are two flavors:

  • eBGP (external BGP): between routers in different Autonomous Systems — e.g. your company and your ISP.
  • iBGP (internal BGP): between routers inside the same AS, to carry externally-learned routes across your own network.

A big part of real-world BGP work is making these two interact cleanly.

Why BGP matters (and why it’s fragile)

Because BGP runs on trust, mistakes propagate fast. A misconfigured advertisement can accidentally tell the world “send all traffic for these addresses to me” — a route leak or hijack. Famous outages have taken major services offline for hours because of a single bad BGP announcement. That’s why engineers who truly understand BGP — filtering, route maps, and safeguards like RPKI — are in high demand.

How to actually learn it

Reading about BGP only gets you so far. The protocol clicks when you configure two routers, watch them form a peering session, advertise a prefix, and see the route appear on the other side. You start to feel how AS paths and policies shape traffic.

On Learn.GT, you can do exactly that in hands-on labs — configure eBGP and iBGP on real router environments, break things on purpose, and learn to fix them. If you’re starting from zero, begin with networking fundamentals and work up to advanced routing.

BGP isn’t magic. It’s a set of rules for how networks cooperate — and once you’ve configured it yourself, the internet stops feeling like a black box.