BGP, fully known as Border Gateway Protocol was first described in 1989 in RFC 1105, and has been in use on the Internet since 1994, and it was improved to RFC 2283 in 1998. The current version of BGP is version 4 (BGP4), which was published as RFC 4271 in 2006. RFC 4271 corrected errors, clarified ambiguities and updated the specification with common industry practices.

BGP (BGP4, RFC 4271) is an interdomain path-vector routing protocol. It designed to exchange routing information among different autonomous systems (AS) on the Internet. As networks interact with each other, they need a way to communicate. This is accomplished through peering.

BGP neighbors, called peers, are established by manual configuration among routers to create a TCP session on port 179. A BGP speaker sends 19-byte keep-alive messages every 30 seconds to maintain the connection. Among routing protocols, BGP is unique in using TCP as its transport protocol. BGP takes into consideration all the different peering options a router has and chooses the one closest to where the router is. It makes routing decisions based on paths, network policies, or rule-sets configured by a network administrator.

 

BGP protocol

 

External Border Gateway Protocol (EBGP)
EBGP is used between autonomous systems. It is used and implemented at the edge or border router that provides inter-connectivity for two or more autonomous system. It functions as the protocol responsible for interconnection of networks from different organizations or the Internet.

 

Internal Border Gateway Protocol (IBGP)
IBGP is used inside the autonomous systems. It is used to provide information to your internal routers. It requires all the devices in same autonomous systems to form full mesh topology or either of Route reflectors and Confederation for prefix learning.