Border Gateway Protocol (BGP) (Full Explanation)
Border Gateway Protocol
BGP, which stands for Border Gateway Protocol, is a standardized gateway protocol that facilitates the exchange of routing information between autonomous systems (AS). When a network router connects to other networks, it cannot independently determine the best network for data sharing.
Border Gateway Protocol evaluates all the peering partners associated with a router and directs traffic to the router that is nearest to the data's destination. This exchange is made possible because, upon booting, BGP enables peers to share their routing information, which is then stored in a Routing Information Base (RIB).
The primary objective of BGP is to identify any loop-free path to the destination. This differs from the common goals of intradomain routing protocols, which aim to find the most optimal route to a destination based on specific link metrics.
Routers that connect different ASs are referred to as border gateways. Their role is to forward packets between ASs. Each AS must have at least one BGP speaker, which is responsible for exchanging reachability information among ASs.
Path-Vector Routing
Protocols like RIP (Routing Information Protocol) and OSPF (Open Shortest Path First) are not suitable for interdomain routing. Distance vector routing allows data to be sent to each of a router's neighbors, leading each router to build its own routing database. However, routing does not recognize the identity of routers in any particular direction.
Each router communicates its connection costs to all other routers and then begins routing calculations. Two issues can arise in link-state routing. First, different independent systems may utilize various costs and face multiple challenges.
The link-state protocol allows a router to construct the topology, with metrics that can vary for each independent system. This approach makes it difficult to create a reliable routing algorithm. Second, when flood routing occurs, the application of an interdomain routing protocol across independent systems can lead to ambiguity.
Types of Border Gateway Protocol
The categories of BGP are outlined below
Internal BGP
Routes are shared, and data is sent over the Internet via external BGP, also known as eBGP. Autonomous systems may also implement an internal version of BGP to manage routing within their internal networks, referred to as internal BGP.
It is important to understand that utilizing internal BGP is NOT mandatory for the use of external BGP. Autonomous systems have the option to select from various internal protocols to link the routers within their internal network.
External BGP
External BGP can be compared to international shipping; there are specific standards and protocols that must be adhered to when sending a piece of mail across borders. Once the mail arrives in the destination country, it must be processed by the local mail service to reach its ultimate destination.
Every country operates its own internal mail service, which may not necessarily conform to the same standards as those of other nations. In the same way, each autonomous system can establish its own internal routing protocol for managing data flow within its network.