Overview of BGP
Definition
The Border Gateway Protocol (BGP) is a distance vector protocol that allows devices between Autonomous Systems (ASs) to communicate and selects optimal routes. BGP-1, BGP-2, and BGP-3 are three earlier versions of BGP. BGP-4 has been used since 1994. Since 2006, unicast IPv4 networks have been using BGP-4, and other networks (such as IPv6 networks) have been using MP-BGP.
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 used to dynamically exchange routing information between ASs. EGP advertises only reachable routes but 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 routing instead of BGP is used to prevent a huge number of Internet routes from affecting the internal network of the data center.
Benefits
BGP uses authentication and Generalized TTL Security Mechanism (GTSM) to ensure network security.
BGP provides routing policies to allow for flexible route selection and routing policy-based route advertisement.
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 Tracking, and BGP GR and NSR to improve network reliability.
BGP uses the Dynamic Update Peer-Groups technology to send packets in groups when a large number of peers and routes exist and most peers share the same outbound policies, improving BGP forwarding performance.