cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3424
Views
5
Helpful
22
Replies

IBGP peering getting loop

libra_ali786
Level 1
Level 1

I have 4 routers connected each other by IBGP neighbor ship. Neighborship up with no issue but  each router form loops with indirect connected router.

 

Between R2 and R4

 

R4#
*Feb 7 13:14:52.267: %BGP-3-NOTIFICATION: received from neighbor 2.2.2.1 4/0 (hold time expired) 0 bytes
R4#
*Feb 7 13:14:52.271: %BGP-5-ADJCHANGE: neighbor 2.2.2.1 Down BGP Notification received
*Feb 7 13:14:52.279: %BGP_SESSION-5-ADJCHANGE: neighbor 2.2.2.1 IPv4 Unicast topology base removed from session BGP Notification received
*Feb 7 13:14:52.723: %BGP-5-ADJCHANGE: neighbor 2.2.2.1 Up
R4#
*Feb 7 13:15:54.107: %IPRT-3-RIB_LOOP: Resolution loop formed by routes in RIB

 

R4#show ip route loop
->default:ipv4:base 2.2.2.0/24 -> base 2.2.2.1 bgp 00:13:16 N

 

 

Between R1 and R3

 

R3#
*Feb 7 13:14:16.891: %IPRT-3-RIB_LOOP: Resolution loop formed by routes in RIB
R3#
*Feb 7 13:14:18.611: %BGP-3-NOTIFICATION: received from neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes
*Feb 7 13:14:18.611: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification received
*Feb 7 13:14:18.619: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session BGP Notification received

 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Dan Frey
Cisco Employee
Cisco Employee

R3:  I did a clear ip BGP and when BGP starts to establish BGP sessions with the directly connected neighbors network 1.1.1.0/24 has a NLRI of a directly connected subnet (2.2.2.1).   This enables the BGP establishment to the non directly connected neighor R1.

R3#sh ip bgp
BGP table version is 8, local router ID is 30.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  1.1.1.0/24       2.2.2.1                  0    100      0 i
 * i  2.2.2.0/24       2.2.2.1                  0    100      0 i
 *>                    0.0.0.0                  0         32768 i
 *>   3.3.3.0/24       0.0.0.0                  0         32768 i

Neighbor R1 comes up and changes the next hop IP to 1.1.1.1 to reach network 1.1.1.0/24.   

 

*Feb  7 14:50:05.196: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up 
R3#sh ip bgp
BGP table version is 13, local router ID is 30.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  1.1.1.0/24       1.1.1.1                  0    100      0 i
 * i                   2.2.2.1                  0    100      0 i
 * i  2.2.2.0/24       2.2.2.1                  0    100      0 i
 *>                    0.0.0.0                  0         32768 i
 *>   3.3.3.0/24       0.0.0.0                  0         32768 i

R3 does not have a connected route on 1.1.1.0/24 network so it can not maintain the BGP adj and the holdtimer expires and BGP session goes down.  

 

*Feb  7 14:53:05.410: %BGP-3-NOTIFICATION: received from neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes 
*Feb  7 14:53:05.411: %BGP-5-NBR_RESET: Neighbor 1.1.1.1 reset (BGP Notification received)
*Feb  7 14:53:05.414: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification received
*Feb  7 14:53:05.414: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session  BGP Notification received
*Feb  7 14:53:05.484: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up 
*Feb  7 14:56:10.792: %BGP-3-NOTIFICATION: received from neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes 
*Feb  7 14:56:10.793: %BGP-5-NBR_RESET: Neighbor 1.1.1.1 reset (BGP Notification received)
*Feb  7 14:56:10.795: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification received
*Feb  7 14:56:10.795: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session  BGP Notification received
*Feb  7 14:56:10.894: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up 

 

View solution in original post

bgp_path_selection.png
why flapping happened ?
R1 to R3 will use as example 
R1 will iBGP to R3 using 3.3.3.0 
R1 will use 3.3.3.0 through R4 
R1-R3 iBGP now update 3.3.3.0 <--issue here
R1 have two path to 3.3.3.0 
one through R4 
other through R3 itself <- this way BGP to BGP  is not prefer 
R1 select 3.3.3.0 through R3 BUT this same route to iBGP to R3 <-flapping flapping
Why R1 select 3.3.3.0 though the R3 ?
here I come to idea about the next-hop 
next-hop of R4 is far away than the next-hop of R3 and hence it select
so please config route-id loopback 
and try again.

If this not help then, 
we will do next change the seq of config, to make the OLDEST route prefer.
R1-R4-R3 
R1
router bgp 
neighbor R4
neighbor R3 
NO neighbor R2 

now we wait until the route stable then 

do 
neighbor R2.

View solution in original post

22 Replies 22

Hello,

 

your design is flawed, as iBGP requires a full mesh between all iBGP routers. You are trying to accomplish that by peering with indirect links, this won't work. You need to have a physical link between each router (meaning each router needs 3 links, one to each of the three other routers). Or use a route reflector.

Sir please look that youtube video , which i apply same topology for my understanding but i am getting routing loop.

 

https://www.youtube.com/watch?v=X9b0VtSlKwk

Hello
So you have an IGP running or have you just tried to apply ibgp on all 4 rtrs.

sh ip protocols

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Only apply IBGP on all 4 routers.

 

 

R1#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "bgp 500"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
1.1.1.2
2.2.2.2
4.4.4.1
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 200 00:00:08
1.1.1.2 200 00:00:11
4.4.4.1 200 00:00:10
Distance: external 20 internal 200 local 200

Hello

All 4 rtrs
router eigrp 100
no auto-summary
network 0.0.0.0

 

If however you not using any igp check you ibgp peerings are correct?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Sir please look that youtube video , which i apply same topology for my understanding but i am getting routing loop. Above I Mentioned the link. 

Friend It is so common issue

R1-subnetA-R2

Router ospf 100

Net subnetA

Router bgp 100

Neighbor R2 

You see we not add command net subnetA under bgp this make flap issue.

Hi

Thanks for the reply. Can you check above I Mentioned youtube video link which I trying to simulate. They did not used any IGP protocol.

Only IBGP with network commands. 

I am out now later i will check link,

But if you not use routing protocl then use static route carefully.

OK. Problem is not a reachability. When you get time please check the link and reply back. Thanks 

Hello
Please post the ouput below from each router in a file and attach to your post:

Also make sure you have advertised all interfaces in bgp and each rtr has ibgp peering to all other ibgp rtrs via their physical interfaces

sh ip int brief
sh run | sec router


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Please see attachment of  my routers configuration in my post.

Thanks 

No need direct link between each peer,

For full mesh run routing protocol like ospf, this make each router know other router ip.

Note:- do not advertise the subnet of direct link connect by bgp, ospf will do that

Dan Frey
Cisco Employee
Cisco Employee

R3:  I did a clear ip BGP and when BGP starts to establish BGP sessions with the directly connected neighbors network 1.1.1.0/24 has a NLRI of a directly connected subnet (2.2.2.1).   This enables the BGP establishment to the non directly connected neighor R1.

R3#sh ip bgp
BGP table version is 8, local router ID is 30.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  1.1.1.0/24       2.2.2.1                  0    100      0 i
 * i  2.2.2.0/24       2.2.2.1                  0    100      0 i
 *>                    0.0.0.0                  0         32768 i
 *>   3.3.3.0/24       0.0.0.0                  0         32768 i

Neighbor R1 comes up and changes the next hop IP to 1.1.1.1 to reach network 1.1.1.0/24.   

 

*Feb  7 14:50:05.196: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up 
R3#sh ip bgp
BGP table version is 13, local router ID is 30.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i  1.1.1.0/24       1.1.1.1                  0    100      0 i
 * i                   2.2.2.1                  0    100      0 i
 * i  2.2.2.0/24       2.2.2.1                  0    100      0 i
 *>                    0.0.0.0                  0         32768 i
 *>   3.3.3.0/24       0.0.0.0                  0         32768 i

R3 does not have a connected route on 1.1.1.0/24 network so it can not maintain the BGP adj and the holdtimer expires and BGP session goes down.  

 

*Feb  7 14:53:05.410: %BGP-3-NOTIFICATION: received from neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes 
*Feb  7 14:53:05.411: %BGP-5-NBR_RESET: Neighbor 1.1.1.1 reset (BGP Notification received)
*Feb  7 14:53:05.414: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification received
*Feb  7 14:53:05.414: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session  BGP Notification received
*Feb  7 14:53:05.484: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up 
*Feb  7 14:56:10.792: %BGP-3-NOTIFICATION: received from neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes 
*Feb  7 14:56:10.793: %BGP-5-NBR_RESET: Neighbor 1.1.1.1 reset (BGP Notification received)
*Feb  7 14:56:10.795: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification received
*Feb  7 14:56:10.795: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session  BGP Notification received
*Feb  7 14:56:10.894: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up 

 

Review Cisco Networking for a $25 gift card