What is BGP (Border Gateway Protocol)?

The routing protocol that exchanges routing information between ASes (autonomous systems, the units of network run by organizations such as ISPs) on the internet. It chooses routes based on attributes attached to them, such as the sequence of ASes they have passed through (AS_PATH), and on each organization's policy. Routers connect to each other over TCP port 179 to exchange information.

Japanese name: BGP

BGP (Border Gateway Protocol) appears in 2 practice questions across 2 topics, including Computer Networking Basics, Network Design and Operations.

Field: Network Design and Operations

ASes and path vectors

The internet is made up of many interconnected ASes (autonomous systems), each run by an ISP or large organization and identified by an AS number. BGP routers connect over TCP to routers in neighboring ASes and advertise routes to each other in the form "this network can be reached through this sequence of ASes." A router that receives a route discards it as a loop if the sequence contains its own AS number. Because it conveys the path taken rather than a distance, BGP is called a path-vector protocol.

Attributes and route selection

Routes carry attributes such as the sequence of ASes passed through (AS_PATH), the next hop (NEXT_HOP), the preference within the AS (LOCAL_PREF) and the MED, which tells a neighboring AS which entrance into the AS is preferred. When there are several routes to the same destination, these attributes are compared in a defined order to choose one, and the length of the AS_PATH is only one of the criteria. The big difference from routing protocols used inside an organization is that the organization can decide, according to policies such as contracts and costs, which neighbor's routes to prefer and which routes to advertise to whom.

eBGP, iBGP and operational care

BGP between routers in different ASes is called eBGP, and BGP between routers in the same AS is called iBGP, which is used to spread routes learned from outside throughout the AS. Configuration errors in BGP have wide effects: mistakenly advertising another organization's addresses can draw traffic for those destinations from far and wide (route hijacks and leaks). Countermeasures therefore include filters that limit which routes are advertised and accepted, and RPKI, which uses digital signatures to verify the legitimate holder of addresses.

Try it: questions about BGP (Border Gateway Protocol)

Which correctly describes dynamic routing?

  1. AAn administrator configures routes on each router by hand, and the same routes stay in use after a failure until the configuration is changed
  2. BRouters exchange route information using routing protocols and automatically switch to another path when a failure makes a route unusable
  3. CA route is chosen at random for each packet to spread the load evenly over several paths
Show answer and explanation

Answer: B. Routers exchange route information using routing protocols and automatically switch to another path when a failure makes a route unusable

Static routing means an administrator configures routes by hand. It is simple and predictable, and suits small networks or the default route of a site with only one exit, but it does not switch over automatically after a failure. In dynamic routing, routers exchange information with routing protocols such as OSPF or BGP to build their routing tables automatically, and recalculate another path when a link fails. On the internet, routes between organizations' networks (autonomous systems) are exchanged with BGP. Real networks commonly combine both.

On the internet, which protocol exchanges routing information between the networks run by organizations such as ISPs (ASes, autonomous systems) and chooses routes based on attributes such as the sequence of ASes a route has passed through (AS_PATH) and on each organization's policy?

  1. AOSPF
  2. BBGP
  3. CRIP
Show answer and explanation

Answer: B. BGP

BGP (Border Gateway Protocol) is the protocol that organizations identified by AS numbers use to exchange routes, and routes on the internet are basically exchanged with BGP. Routes carry attributes such as the sequence of ASes they have passed through (AS_PATH) and the next hop (NEXT_HOP), and a router prevents loops by discarding routes that contain its own AS number. Route selection is not just a matter of the shortest AS_PATH; an organization's policies, such as which neighbor to prefer, can be expressed in attributes and applied. OSPF and RIP are routing protocols used inside a single organization (IGPs).

FAQ

Why is BGP essential to the internet?

No single organization manages the internet as a whole. Routes that reach every destination in the world are built by many independent ASes advertising routes to each other with BGP. Configuration errors or failures in BGP can therefore affect communication over a wide area.

Does BGP choose the shortest route?

Not necessarily. BGP gives priority to an organization's policy, expressed in attributes such as LOCAL_PREF, over the length of the AS_PATH alone. For example, a route through a cheaper neighbor can be preferred even if it passes through more ASes.

BGP (Border Gateway Protocol) in the explanations

Questions that mention BGP (Border Gateway Protocol) (2)

  1. Which correctly describes dynamic routing?
  2. On the internet, which protocol exchanges routing information between the networks run by organizations such as ISPs (ASes, autonomous systems) and chooses routes based on attributes such as the sequence of ASes a route has passed through (AS_PATH) and on each organization's policy?

Books on Network Design and Operations Ad

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

Related terms

IP routing Router OSPF (Open Shortest Path First) ACL (access control list) Administrative distance Broadcast domain Link aggregation Longest prefix match Path MTU discovery QoS (Quality of Service)

Back to the glossary