Skip to main content

BGP

Border Gateway Protocol

Pronunciation
bee-jee-PEE
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/bgp

In short

BGP (Border Gateway Protocol) is the routing protocol that links the internet's autonomous systems by letting them announce which IP ranges they can reach.

What is BGP?

The internet is made of tens of thousands of separate networks run by internet providers, cloud companies, universities and large businesses. Each is an autonomous system (AS) with its own number. BGP is how they exchange reachability: a network announces "these address prefixes are reachable through me", and its neighbors pass the information on, adding themselves to the path.

BGP is a path-vector protocol. Each route carries the list of autonomous systems it has passed through, which prevents loops and lets each network choose routes according to its own policies, such as preferring cheaper links or customers over peers, rather than simply the shortest path. The version used today, BGP-4, dates from 1994.

Because BGP relies largely on trust, mistakes and attacks spread quickly. A route leak or hijack, where a network announces addresses it doesn't own, can send traffic to the wrong place, and misconfigurations have taken large services offline; in 2021 Facebook disappeared from the internet for hours after its routes were withdrawn by accident. RPKI lets networks cryptographically check which AS may announce a prefix.

A common misconception is that BGP matters only to internet providers. Any organization connecting to several providers, running its own address space or using anycast for a CDN or DNS service uses BGP, and cloud networks expose it for private connections between data centers and the cloud.

Key takeaways

  • BGP routes traffic between the internet's autonomous systems.
  • Networks announce the IP prefixes they can reach to their neighbors.
  • Routes carry the path of AS numbers and follow each network's policies.
  • Leaks, hijacks and errors can spread widely; RPKI adds validation.
  • Multi-provider networks, anycast and cloud interconnects use it too.

Readers ask

What is an autonomous system?

A network or group of networks under one organization's control with a single routing policy, identified by an autonomous system number (ASN). Internet providers, cloud companies and large enterprises each run one or more.

What is a BGP hijack?

When a network announces IP prefixes that belong to someone else, by mistake or on purpose, so that traffic for those addresses is routed to it. RPKI route origin validation helps networks reject such announcements.

What is the difference between BGP and OSPF?

OSPF is an interior gateway protocol that finds the best paths inside one organization's network. BGP is an exterior gateway protocol that exchanges routes between different organizations' networks according to their policies.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings