BGP is an exterior gateway protocol (EGP), used to perform interdomain routing in TCP/IP networks. A BGP router needs to establish a connection (on TCP port 179) to each of it's BGP peers before BGP updates can be exchanged. The BGP session between two BGP peers is said to be an external BGP (eBGP) session if the BGP peers are in different autonomous systems (AS) . A BGP session between two BGP peers is said to be an internal BGP (iBGP) session if the BGP peers are in the same autonomous systems.

By default, the peer relationship is established using the IP address of the interface closest to the peer router. However, using the neighbor update-source (registered customers only) command, any operational interface, including the loopback interface, can be specified to be used for establishing TCP connections. This method of peering using a loopback interface is useful since it will not bring down the BGP session when there are multiple paths between the BGP peers, which would otherwise result in tearing down the BGP session if the physical interface used for establishing the session goes down. In addition to that, it also allows the routers running BGP with multiple links between them to load balance over the available paths.

The sample configurations in this document are for iBGP and eBGP, both with and without a loopback addresses.

Peers must be directly connected when using eBGP. If they are not directly connected, the neighbor ebgp-multihop (registered customers only) command must be used and a path through an IGP or static route to reach the peer must exist in order for the routers to establish neighbor relationship. In the configuration above, R1-AGS router belongs to AS 300 while R6-2500 router belongs to AS 400.

These sections provide information you can use to confirm your configurations are working properly. Certain show commands are supported by the Output Interpreter Tool, which allows you to view an analysis of show command output.

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer relationship has been established successfully.

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer relationship has been established successfully.

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer relationship has been established successfully.

Use the show ip bgp neighbors (registered customers only) command to display information about the TCP and Border Gateway Protocol (BGP) connections and verify if the BGP peer is established. The output of the show ip bgp neighbors command below shows the BGP state as 'Established', which indicates that the BGP peer relationship has been established successfully.