Guide
BGP Simulator Guide: BGP Basics And How The Simulation Works
One combined guide for the background concepts and the simulation mechanics: what BGP is, why policy matters, how AS paths work, and how this browser-based BGP simulator builds and visualizes winning routes.
Concept To Simulation
What Is BGP?
BGP is the protocol that connects routing domains across the public internet. Instead of one network controlling all paths, thousands of independent networks exchange announcements about which prefixes they can reach.
That lets ISPs, clouds, enterprises, and content networks interconnect while still making their own routing decisions.
What Is An ASN?
An ASN is an Autonomous System Number. It identifies a routing domain such as an ISP, transit provider, cloud platform, university, or enterprise network. In BGP, routes are exchanged between ASNs, and the path is described as a sequence of ASNs.
Why AS Paths Matter
The AS path tells you which networks a route crosses. That matters for performance, visibility, business policy, troubleshooting, and security. A path like (15169, 2152, 25) is not just a line of numbers: it is the route history that explains how the target learned the prefix.
Why Policy Matters
BGP is not basic shortest-path routing. A network may prefer a longer customer path over a shorter provider path because business relationships matter more than raw hop count. That is why understanding BGP usually requires both topology and policy.
Build The Graph
The simulator starts by reading the AS relationship graph. Each row describes how two ASNs relate to one another, typically as provider-to-customer or peer-to-peer. From that input it builds an internal graph that can answer questions like who is connected to whom and what relationship is seen on each hop.
Seed Announcements
Announcements enter the system at their seed ASNs. Each announcement associates a prefix with an origin point and carries an AS path that starts with only the origin ASN. If the input marks an announcement as invalid, that invalid flag stays attached to the route as it propagates.
Propagate Routes
From each origin, routes move through the graph hop by hop. As a route crosses an edge, the receiving AS sees the route through the lens of that relationship. That relationship matters later because it affects policy preference.
Apply Policy
Whenever an AS sees multiple candidate routes for the same prefix, it applies the simulator’s BGP ranking rules. Business relationship preference comes first, then path length, then next-hop ASN as a final tie-breaker. This is why BGP behavior often differs from simple shortest-path routing.
Filter Invalid Routes
If an ASN is marked as deploying ROV, it rejects invalid announcements instead of keeping them as candidates. That changes which routes continue propagating and which prefixes remain visible further down the graph.
Visualize The Result
After propagation finishes, the simulator focuses on one target ASN. The results table shows the winning route for each prefix at that target. When you click a prefix, the graph view renders the chosen AS path and the notes explain both route selection and packet flow.
Why This Is Hard To See Without A Simulator
BGP behavior is hard to reason about from raw tables alone. A route might lose because of policy, because of ROV, because of path length, or because it never reached the target in the first place. The point of this simulator is to make that explanation visible rather than forcing you to infer it from CSVs and command-line output.