BGP uses TCP as the transport protocol, on port 179. Two BGP routers form a TCP connection between oneanother. These routers are peer routers. The peer routers exchange messages to open and confirm theconnection parameters.
BGP routers exchange network reachability information. This information is mainly an indication of the fullpaths that a route must take in order to reach the destination network. The paths are BGP AS numbers. Thisinformation helps in the construction of a graph of ASs that are loop−free.
eBGP and iBGP
If an AS has multiple BGP speakers, the AS can serve as a transit service for other ASs.
In order to send the information to external ASs, there must be an assurance of the reachability for networks.
In order to assure network reachability, these processes take place:
Internal BGP (iBGP) peering between routers inside an AS
Redistribution of BGP information to IGPs that run in the AS
When BGP runs between routers that belong to two different ASs, this is called exterior BGP (eBGP). WhenBGP runs between routers in the same AS, this is called iBGP.
Two BGP routers become neighbors after the routers establish a TCP connection between each other. The TCP connection is essential in order for the two peer routers to start the exchange of routing updates.
After the TCP connection is up, the routers send open messages in order to exchange values. The values thatthe routers exchange include the AS number, the BGP version that the routers run, the BGP router ID, and thekeepalive hold time. After the confirmation and acceptance of these values, establishment of the neighbour connection occurs. Any state other than Established is an indication that the two routers did not becomeneighbors and that the routers cannot exchange BGP updates.