eBGP peering between AS777 and AS64512
AS64512 BGP status:
3825-1#sh ip bgp summ
BGP router identifier 172.16.1.1, local AS number 64512
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.2.1 4 777 0 0 0 0 0 never Idle
AS777 BGP status:
2651-1#sh ip bgp summ
BGP router identifier 172.16.2.1, local AS number 777
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.1.1 4 64512 0 0 0 0 0 never Idle
Both in idle state, this means there’s no attempt to establish TCP connection.
eBGP peering using loopback interface
The default BGP advertising interface is the physical interface, however if physical interface is down the BGP will also fail, the recommended way to establish BGP peering is through the use of logical interface i.e. loopback interface. For this situation it does not matter, because each interface of 3825-1 in AS64512 is a single connection. However loopback interface will mean a lot if the AS64512 router has a dual link connection to AS777 or AS711.
Remote router’s loopback interface in router’s perception is not a directly connected interface, hence I will need to use the ebgp multihop command to establish neighborship between AS777 and AS64512.
As mentioned earlier the default bgp source address is the physical interface address, if use loopback interface as the bgp advertisement source, update-source keyword has to be used.
Also the loopback interfaces of both routers must be reachable. I have used a static route from AS64512 to AS777.
Loopback interface is not considered a directly connected link in router’s perception, if 3825-1 cannot reach the loopback 10 interface of 2651-1 the BGP state will remain Active and no neighborship will be established. A debug was run on 3825-1:
3825-1(config-router)#
*Jan 27 15:55:32.699: BGP: 172.16.2.1 active open failed – no route to peer, open active delayed 29434ms (35000ms max, 28% jitter)
Here it said the attempt to establish TCP 3 way handshake (Connect state) has failed because there’s no route to the peer.
ebgp multihop
2651-1(config)#router bgp 777
2651-1(config-router)#neighbor 172.16.1.1 ebgp-multihop 2
2651-1(config-router)#neighbor 172.16.1.1 update-source lo10
2651-1#
ip route 172.16.1.1 255.255.255.255 100.10.10.1
3825-1(config)#router bgp 64512
3825-1(config-router)#neighbor 172.16.2.1 ebgp-multihop 2
3825-1(config-router)#neighbor 172.16.2.1 update-source loopback 1
3825-1#
ip route 172.16.2.1 255.255.255.255 100.10.10.2
eBGP events
3825-1(config)#
*Jan 27 16:00:39.591: BGP: 172.16.2.1 passive open to 172.16.1.1
*Jan 27 16:00:39.591: BGP: 172.16.2.1 went from Active to Idle
*Jan 27 16:00:39.591: BGP: 172.16.2.1 went from Idle to Connect
*Jan 27 16:00:39.595: BGP: 172.16.2.1 rcv message type 1, length (excl. header) 26
*Jan 27 16:00:39.595: BGP: 172.16.2.1 rcv OPEN, version 4, holdtime 180 seconds
*Jan 27 16:00:39.595: BGP: 172.16.2.1 went from Connect to OpenSent
*Jan 27 16:00:39.595: BGP: 172.16.2.1 sending OPEN, version 4, my as: 64512, holdtime 180 seconds
*Jan 27 16:00:39.595: BGP: 172.16.2.1 rcv OPEN w/ OPTION parameter len: 16
*Jan 27 16:00:39.595: BGP: 172.16.2.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
*Jan 27 16:00:39.595: BGP: 172.16.2.1 OPEN has CAPABILITY code: 1, length 4
*Jan 27 16:00:39.595: BGP: 172.16.2.1 OPEN has MP_EXT CAP for afi/safi: 1/1
*Jan 27 16:00:39.595: BGP: 172.16.2.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Jan 27 16:00:39.595: BGP: 172.16.2.1 OPEN ha
3825-1(config)#end
3825-1#s CAPABILITY code: 128, length 0
*Jan 27 16:00:39.595: BGP: 172.16.2.1 OPEN has ROUTE-REFRESH capability(old) for all address-families
*Jan 27 16:00:39.595: BGP: 172.16.2.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Jan 27 16:00:39.595: BGP: 172.16.2.1 OPEN has CAPABILITY code: 2, length 0
*Jan 27 16:00:39.595: BGP: 172.16.2.1 OPEN has ROUTE-REFRESH capability(new) for all address-families
BGP: 172.16.2.1 rcvd OPEN w/ remote AS 777
*Jan 27 16:00:39.595: BGP: 172.16.2.1 went from OpenSent to OpenConfirm
*Jan 27 16:00:39.595: BGP: 172.16.2.1 send message type 1, length (incl. header) 45
*Jan 27 16:00:39.611: BGP: 172.16.2.1 went from OpenConfirm to Established
*Jan 27 16:00:39.611: %BGP-5-ADJCHANGE: neighbor 172.16.2.1 Up
*Jan 27 16:00:40.375: %SYS-5-CONFIG_I: Configured from console by console