Overview of BGP
Definition
The Border Gateway Protocol (BGP) is a path vector protocol that allows devices between Autonomous Systems (ASs) to communicate and selects optimal routes. BGP-1 (defined in RFC 1105), BGP-2 (defined in RFC 1163), and BGP-3 (defined in RFC 1267) are three earlier versions of BGP. BGP-4 (defined in RFC 1771) has been used since 1994. Since 2006, unicast IPv4 networks have been using BGP-4 defined in RFC 4271, and other networks (such as IPv6 networks) have been using MP-BGP defined in RFC 4760.
MP-BGP is an extension of BGP-4 and applies to different networks; however, the original message exchange and routing mechanisms of BGP-4 are not changed. MP-BGP applications on IPv6 unicast and IPv4 multicast networks are called BGP4+ and Multicast BGP (MBGP) respectively.
Purpose
A network is divided into different ASs to facilitate the management over the network. In 1982, the Exterior Gateway Protocol (EGP) was developed to dynamically exchange routing information between ASs. EGP advertises only reachable routes but does not select optimal routes or prevent routing loops. Therefore, EGP cannot meet network management requirements.
BGP was designed to replace EGP. Different from EGP, BGP can select optimal routes, prevent routing loops, transmit routing information efficiently, and maintain a large number of routes.
Although BGP is used to transmit routing information between ASs, BGP is not the best choice in some scenarios. For example, on the egress connecting a data center to the Internet, static routes instead of BGP are used to prevent a huge number of Internet routes from affecting the data center internal network.
Benefits
BGP uses authentication and Generalized TTL Security Mechanism (GTSM) to ensure network security.
BGP provides routing policies to allow for flexible route selection.
BGP provides Route Summarization and Route Dampening to prevent route flapping and improve network stability.
BGP uses the Transport Control Protocol (TCP) with port number 179 as the transport layer protocol and supports BFD for BGP, BGP Auto FRR, and BGP GR and NSR to improve network reliability.