Wednesday, October 24, 2012

BGP Neighbors with physical interfaces



BGP is an external gateway protocol that is used between autonomous systems. Normally these are seen inside of an ISP network or between an enterprise network with multiple ISPs.  Unlike EIGRP the  AS number doesn't have to match to become a peer but it is classified differently. An IBGP is a peer between two spokes with the same AS number and an EBGP is a peer between two spokes with different AS numbers. BGP doesn't automatically detect a neighbor so a neighbor command is used along with the remote as number. In the example below I configured a peers using the connected interfaces.


R1(config)#router bgp 100
R1(config-router)#neighbor 172.12.123.2 remote-as 100
R1(config-router)#neighbor 172.12.123.3 remote-as 200

R2(config)#router bgp 100
R2(config-router)#neighbor 172.12.123.1 remote-as 100
*Mar  1 00:49:35.068: %BGP-5-ADJCHANGE: neighbor 172.12.123.21Up 

R3(config)#router bgp 200
R3(config-router)#neighbor 172.12.123.1 remote-as 100
R3(config-router)#
*Mar  1 00:53:12.084: %BGP-5-ADJCHANGE: neighbor 172.12.123.1 Up 

Using the ip BGP summary command I can see a summary of the neighbor relationships. An empty State means it's established or you can use the ip bgp neighbor command to see the state of the relationship.

R1#show ip bgp sum          
BGP router identifier 172.12.123.1, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.12.123.2    4   100      10      10        1    0    0 00:06:10        0
172.12.123.3    4   200       6       6        1    0    0 00:02:32        0

R1#show ip bgp neighbors 172.12.123.3          
BGP neighbor is 172.12.123.3,  remote AS 200, external link
  BGP version 4, remote router ID 172.12.123.3
  BGP state = Established, up for 00:02:54
  Last read 00:00:54, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received.....................

Also the type of peer is shown as internal (ibgp)or external (ebgp)

R1#show ip bgp neighbors 172.12.123.2
BGP neighbor is 172.12.123.2,  remote AS 100, internal link
  BGP version 4, remote router ID 172.12.123.2
  BGP state = Established, up for 00:06:57
  Last read 00:00:56, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received.......................................


No comments:

Post a Comment