NETWORKING BASICS / READING GUIDE

What is BGP? How the Border Gateway Protocol connects networks

BGP is how networks tell each other which addresses can be reached through them. Understanding it makes prefixes, AS paths and routing snapshots much easier to read.

Key takeaway

BGP carries reachability information and path attributes. Public routing data comes from specific vantage points and is not the same as the path any particular user’s traffic takes.

Share routes first, then forward traffic

BGP, the Border Gateway Protocol, is the main protocol networks use to exchange routing information with each other on the internet. A network announces to its neighbors that certain IP prefixes are reachable through it. Each neighbor decides, based on its own policy, whether to accept the announcement and whether to pass it on to other networks.

BGP doesn’t carry web pages, video or messages itself. It helps routers choose how to reach a destination; packets are then forwarded hop by hop according to each router’s forwarding table. Keeping route propagation and packet forwarding apart in your mind stops you from treating a BGP record as a complete record of where traffic went.

What the AS_PATH records

A route announcement carries several attributes. One of them, AS_PATH, lists the autonomous systems the routing information passed through, by ASN. If a plain path reads 64496 64497 64498, you can read it as: seen from this vantage point, the route arrived through these autonomous systems, and AS64498, on the far right, is where this example route originated.

These ASNs come from the range reserved for documentation and are only for illustration. With real data, also watch for special path structures, ASNs that appear more than once and how the data platform handles them. An AS_PATH describes how routing information propagated. It isn’t a list of every router along the way, and it isn’t proof of a commercial agreement between networks.

Why networks don’t always take the shortest-looking path

Route selection doesn’t depend on AS_PATH length alone. Local policy, other path attributes and whether the next hop is reachable all play a part. Operators may prefer a particular connection, filter some announcements or change what they advertise to others. So a path through fewer ASNs isn’t necessarily faster, and the route isn’t the same for every user.

For example, a network with two upstream providers can choose by policy to prefer routes learned from one of them, while another network makes a different choice. Even for the same destination address, networks in different places can see different paths at the same moment, and the return path doesn’t have to match the outbound one.

Public routing databases show observations

The RIPE NCC’s Routing Information Service (RIS) runs route collectors that hold BGP sessions with networks that volunteer to share their routes, and stores the updates and withdrawals they receive. Routing databases then build prefix, path and history views from data like this. It’s a very valuable window, but where the window sits and which networks feed it determine what you can see.

So “this prefix wasn’t seen in the latest snapshot” means it wasn’t observed within that dataset, not that it’s unreachable everywhere. To tell whether something actually changed, compare several points in time measured the same way, and check whether the observation sources themselves changed.

Three things to remember when reading routing data

BGP data is good at answering routing-level questions. For a connection’s latency, packet loss or actual forwarding path, you need measurements of those things over a clearly defined time. A single path diagram usually can’t explain everything that happened in a real connection.

  • A prefix announcement is reachability information; it doesn’t mean every device in that range is online.
  • Two ASNs that sit next to each other in a path aren’t automatically upstream and customer, or settlement-free peers.
  • The collection time isn’t the time you’re viewing the page; a snapshot can’t stand in for the complete state of the network right now.

References

This article draws on the primary sources below, where you can check definitions, registry details and protocol specifics for yourself.

  1. RFC 4271: A Border Gateway Protocol 4 (BGP-4)
  2. RFC 5398: Autonomous System (AS) Number Reservation for Documentation Use
  3. RIPE NCC: Routing Information Service (RIS)
Check the data yourself

See which sources ASNBase uses and what each kind of record means.

Data sources
All articles