Why cloud engineers meet BGP
Private connections into clouds — direct-connect services, VPN gateways, cloud routers — almost always use BGP to exchange routes. Understanding a few concepts makes these connections much easier to design and troubleshoot.
Routes and prefixes
A route says: "To reach this network (a prefix like 10.20.0.0/16), send traffic to me." BGP is the protocol two routers use to tell each other which prefixes they can reach.
Autonomous System Numbers
Each BGP speaker belongs to an autonomous system identified by an ASN. Public ASNs are used on the internet; private ASNs (64512–65534 and 4200000000–4294967294) are fine for private connections inside your organisation.
Sessions
Two routers configure each other as neighbours and form a session. Once up, they exchange routes. If the session drops, the routes learned over it are removed.
Policy
You decide which routes to accept and which to advertise, and how to prefer one path over another — for example using local preference or AS-path prepending.
Failover
With two connections and BGP on both, if one fails its routes disappear and traffic uses the other automatically. BFD can speed up detection.
Practice
Use our looking glass to see how public prefixes are routed on the internet — the same concepts apply to your private network.
