/ˌbiː ˌdʒiː ˈpiː/

noun — "the protocol that directs traffic between the world’s networks."

BGP (Border Gateway Protocol) is the standardized exterior gateway protocol used to exchange routing information between autonomous systems (ASes) on the Internet. Unlike interior protocols like OSPF, which manage routing within a single network, BGP controls how data is routed across multiple independent networks, making it the backbone of global Internet connectivity. It determines the best paths for data based on policies, path attributes, and reachability rather than purely on shortest distance.

Technically, BGP uses TCP port 179 to establish sessions between peers, exchanging full or incremental routing tables in the form of BGP updates. It relies on path-vector mechanisms, maintaining a list of ASes that a route traverses, and uses attributes such as AS path, next-hop, local preference, and MED (Multi-Exit Discriminator) to select optimal routes. BGP supports IPv4 and IPv6, route aggregation, route filtering, and policy-based routing to implement administrative and commercial constraints.

Key characteristics of BGP include:

  • Inter-domain routing: operates between autonomous systems rather than within a single network.
  • Policy-driven: routing decisions are influenced by administrative rules, not only metrics like distance.
  • Path-vector protocol: tracks the sequence of ASes to prevent routing loops.
  • Scalable: can manage hundreds of thousands of routes across the global Internet.
  • Flexible: supports IPv4, IPv6, route aggregation, and traffic engineering.

In practical workflows, BGP is used by Internet service providers (ISPs), data centers, and large enterprises to manage inter-network traffic. Network engineers configure BGP peers to exchange reachability information, apply route policies, and balance traffic loads. In case of link failures, BGP propagates updates to reestablish connectivity, ensuring reliable global Internet routing despite dynamic network conditions.

Conceptually, BGP is like a global air traffic control system for data: it guides packets through a complex web of autonomous networks, choosing routes according to rules, priorities, and the current state of the network.

Intuition anchor: BGP keeps the Internet connected, ensuring that data finds a path across countless independent networks around the world.

Related links include OSPF and IP.