BGP (RFC 4271) is the glue that holds the Internet together. It is a path-vector protocol used to exchange routing and reachability information between autonomous systems.

Autonomous Systems (AS)

An Autonomous System is a massive network or group of networks under a single administrative routing policy (e.g., an ISP like Comcast, or a cloud provider like AWS). Every AS is assigned an Autonomous System Number (ASN).

BGP's job is not to find the shortest path based on latency, but the shortest path based on the number of AS hops (while adhering to business peering agreements).

> AS 15169 (Google) announces reachability to 8.8.8.0/24
> AS 7018 (AT&T) receives announcement, updates local routing table
> Traffic from AT&T to 8.8.8.8 is routed via peering link to Google

BGP Hijacking

Historically, BGP operates on absolute trust. If a rogue ISP in Eastern Europe announces that they are the shortest path to Twitter's IP block, global routers will blindly believe them and route traffic there (a "BGP Hijack").

Modern mitigation relies on RPKI (Resource Public Key Infrastructure), which uses cryptographic certificates to validate that an AS is actually authorized to announce a specific IP prefix. However, global RPKI adoption remains incomplete.