Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags


What is BGP?

Fareeha Rafaqat

Border Gateway Protocol

Whenever a person drops a parcel at any postal service, the service figures out the most expedient route to deliver it to its intended destination. Similarly, the Border Gateway Protocol (BGP) acts like a postal service to deliver messages on the Internet. BGP determines the optimum routing for data sent over the Internet by examining all possible paths.

Autonomous systems

All the Internet traffic is routed through a single point of contact using BGP. Routing is simple in a local area network because all devices are connected to the same computer network. A network rises in complexity when there are millions of other networks throughout the world connected to it. Managing Internet connectivity for different websites and locations is often handled by large enterprises or Internet Service Providers (ISPs). This type of system is referred to as an autonomous system (AS).

Multiple routers in an autonomous system
1 of 2

Role of BGP

The BGP has two pivotal tasks:

  1. To make the existence of each autonomous system known to its neighbors. Without this, each AS would be an island unto itself, with no idea of the presence of any other islands in the vast sea. Each AS obtains prefix reachability information from its surrounding autonomous systems to perform this task.
  2. To define the best route for each prefix.

Internal and external BGP

Routing information and Internet traffic are transmitted using external BGP. In contrast, internal BGP is a form of BGP that autonomous systems can use to route through their internal networks. To use external BGP, we don’t need to use internal BGP. The autonomous systems can use any of several internal protocols to connect the routers to their internal network.

BGP route leak

A BGP leak is when routing announcements are spread beyond their intended audience. Announcing a learned BGP route from an Autonomous System (AS) to another AS violates the policies of the receiver, sender, and/or one of the preceding ASes on the AS path. Some famous leaks are as follows:

  • G Suite became unavailable between 1:00 PM and 2:23 PM PST on November 12th, 2018. In addition to G Suite, Google Search and Google Analytics were affected by the outage.
  • A BGP leak occurred on November 12th, 2018, affecting clients worldwide, including Google, Meta, and Amazon, among others.
  • On April 16th, 2021, an AS accidentally broadcasted more than 30,000 BGP prefixes by mistake. Their network saw a 13-fold increase in traffic as a result of this.



View all Courses

Keep Exploring