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
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.
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.