BGP No Route to Peer

Posted by
Facebooktwitterredditpinterestlinkedintumblr

Scenario is three routers – R1, R2 and R3; R1 and R3 are on AS100 and AS200 respectively.
R1 and R3 have default route pointing to R2. R2 knows how to reach R1 and R3’s Loopback1 network via static route.
R1 and R3 are peering to and sourcing BGP traffic from its Loopback1 IP address.

   .----------------------.                                 .---------------------.
   | AS100                |                                 |               AS200 |
   |                      |                                 |                     |
   |                      |                                 |                     |
   |     .-----------.    |          .-----------.          |     .-----------.   |
   |     |           |F0/0|      F0/0|           |F0/1      |F0/0 |           |   |
   |     |    R1     |---------------|    R2     |----------------|    R3     |   |
   |     |           |.1           .2|           |.1        |  .2 |           |   |
   |     '-----------'  12.0.0.0/30  '-----------'   23.0.0.0/30  '-----------'   |
   |                      |                                 |                     |
   | Loopback1:1.1.1.1/24 |                                 | Loopback3:3.3.3/24|
   |                      |                                 |                     |
   '----------------------'                                 '---------------------'

R1 configuration

interface Loopback1 ip address 1.1.1.1 255.255.255.0 ! interface FastEthernet0/0 ip address 12.0.0.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! router bgp 100 no synchronization bgp log-neighbor-changes neighbor 3.3.3.3 remote-as 200 neighbor 3.3.3.3 ebgp-multihop 255 neighbor 3.3.3.3 update-source Loopback1 no auto-summary ! ip route 0.0.0.0 0.0.0.0 12.0.0.2

R2 configuration

interface FastEthernet0/0 ip address 12.0.0.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 23.0.0.1 255.255.255.0 duplex auto speed auto ! ip forward-protocol nd ip route 1.1.1.0 255.255.255.0 12.0.0.1 ip route 3.3.3.0 255.255.255.0 23.0.0.2

R3 configuration

interface Loopback1 ip address 3.3.3.3 255.255.255.0 ! interface FastEthernet0/0 ip address 23.0.0.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! router bgp 200 no synchronization bgp log-neighbor-changes neighbor 1.1.1.1 remote-as 100 neighbor 1.1.1.1 ebgp-multihop 255 neighbor 1.1.1.1 update-source Loopback1 no auto-summary ! ip route 0.0.0.0 0.0.0.0 23.0.0.1

Enabling debug ip bgp ipv4 unicast on R1 reveals the error.

*Mar 1 00:15:32.467: BGP: 3.3.3.3 active open failed - no route to peer, open active delayed 31999ms (35000ms max, 28% jitter) *Mar 1 00:16:04.467: BGP: 3.3.3.3 active open failed - no route to peer, open active delayed 33351ms (35000ms max, 28% jitter)

Let’s add static route for 3.3.3.0/24 on R1 pointing to R2. The result is the same, getting BGP no route to peer error.

*Mar 1 00:28:56.095: BGP: 3.3.3.3 active open failed - no route to peer, open active delayed 29711ms (35000ms max, 28% jitter) *Mar 1 00:29:25.807: BGP: 3.3.3.3 active open failed - no route to peer, open active delayed 30178ms (35000ms max, 28% jitter)

IP BGP summary peering state is active on R1. Active state means R1 knows how to establish BGP peer to its neighbor but doesn’t mean bidirectional connectivity is working.

R1#sh ip bgp sum BGP router identifier 1.1.1.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 3.3.3.3 4 200 0 0 0 0 0 never Active

Let’s add static route for 1.1.1.0/24 on R3 pointing to R2. Immediately after that BGP peering came up!

Logs from R1.

*Mar 1 00:31:20.683: BGP: 3.3.3.3 passive open to 1.1.1.1 *Mar 1 00:31:20.687: BGP: 3.3.3.3 went from Active to Idle *Mar 1 00:31:20.687: BGP: 3.3.3.3 went from Idle to Connect *Mar 1 00:31:20.707: BGP: 3.3.3.3 rcv message type 1, length (excl. header) 26 *Mar 1 00:31:20.707: BGP: 3.3.3.3 rcv OPEN, version 4, holdtime 180 seconds *Mar 1 00:31:20.707: BGP: 3.3.3.3 went from Connect to OpenSent *Mar 1 00:31:20.707: BGP: 3.3.3.3 sending OPEN, version 4, my as: 100, holdtime 180 seconds *Mar 1 00:31:20.707: BGP: 3.3.3.3 rcv OPEN w/ OPTION parameter len: 16 *Mar 1 00:31:20.707: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability) len 6 *Mar 1 00:31:20.707: BGP: 3.3.3.3 OPEN has CAPABILITY code: 1, length 4 *Mar 1 00:31:20.707: BGP: 3.3.3.3 OPEN has MP_EXT CAP for afi/safi: 1/1 *Mar 1 00:31:20.707: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability) len 2 *Mar 1 00:31:20.707: BGP: 3.3.3.3 OPEN has CAPABILITY code: 128, length 0 *Mar 1 00:31:20.707: BGP: 3.3.3.3 OPEN has ROUTE-REFRESH capability(old) for all address-families *Mar 1 00:31:20.707: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability) len 2 *Mar 1 00:31:20.707: BGP: 3.3.3.3 OPEN has CAPABILITY code: 2, length 0 *Mar 1 00:31:20.707: BGP: 3.3.3.3 OPEN has ROUTE-REFRESH capability(new) for all address-families BGP: 3.3.3.3 rcvd OPEN w/ remote AS 200 *Mar 1 00:31:20.707: BGP: 3.3.3.3 went from OpenSent to OpenConfirm *Mar 1 00:31:20.707: BGP: 3.3.3.3 send message type 1, length (incl. header) 45 *Mar 1 00:31:20.759: BGP: 3.3.3.3 went from OpenConfirm to Established *Mar 1 00:31:20.759: %BGP-5-ADJCHANGE: neighbor 3.3.3.3 Up

Logs from R3.

*Mar 1 00:31:18.095: BGP: 1.1.1.1 open active, local address 3.3.3.3 *Mar 1 00:31:18.139: BGP: 1.1.1.1 went from Active to OpenSent *Mar 1 00:31:18.143: BGP: 1.1.1.1 sending OPEN, version 4, my as: 200, holdtime 180 seconds *Mar 1 00:31:18.147: BGP: 1.1.1.1 send message type 1, length (incl. header) 45 *Mar 1 00:31:18.191: BGP: 1.1.1.1 rcv message type 1, length (excl. header) 26 *Mar 1 00:31:18.195: BGP: 1.1.1.1 rcv OPEN, version 4, holdtime 180 seconds *Mar 1 00:31:18.195: BGP: 1.1.1.1 rcv OPEN w/ OPTION parameter len: 16 *Mar 1 00:31:18.195: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 6 *Mar 1 00:31:18.195: BGP: 1.1.1.1 OPEN has CAPABILITY code: 1, length 4 *Mar 1 00:31:18.195: BGP: 1.1.1.1 OPEN has MP_EXT CAP for afi/safi: 1/1 *Mar 1 00:31:18.195: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2 *Mar 1 00:31:18.199: BGP: 1.1.1.1 OPEN has CAPABILITY code: 128, length 0 *Mar 1 00:31:18.199: BGP: 1.1.1.1 OPEN has ROUTE-REFRESH capability(old) for all address-families *Mar 1 00:31:18.199: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2 *Mar 1 00:31:18.199: BGP: 1.1.1.1 OPEN has CAPABILITY code: 2, length 0 *Mar 1 00:31:18.199: BGP: 1.1.1.1 OPEN has ROUTE-REFRESH capability(new) for all address-families BGP: 1.1.1.1 rcvd OPEN w/ remote AS 100 *Mar 1 00:31:18.203: BGP: 1.1.1.1 went from OpenSent to OpenConfirm *Mar 1 00:31:18.203: BGP: 1.1.1.1 went from OpenConfirm to Established *Mar 1 00:31:18.203: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up

In conclusion, BGP won’t establish when the routers have only default route. There must be specific route in order for the peering to be established.

Leave a Reply

Your email address will not be published. Required fields are marked *

*