cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4360
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

 

 

 

 

 

22 Replies 22

Sir I  trying to simulate that youtube BGP traning videos. They did not used any IGP protocol. He used only IBGP without any routing loop.

 

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

I watched the video and did not use an IGP either so I could simulate your lab.  The first BGP session comes up in the video at the 9min mark and the video ends 95 seconds later.    The default holdtimer for BGP is 180 seconds so the video is not long enough to see the BGP session go down.   

Sir its mean after 180 sec the neighbourship will go down. That point is valid.

 

But why R3 got loop with R1 and R4 with R2 after neighbourship down? 

Please explain. Thanks 

 

It is a recursive routing loop that can not be resolved.   Look on R1 when the R3 neighbor is up.  Network 30.0.0.0/24 has a next hop ip of 2.2.2.2.   This next hop is not a connected route so it has to do a recursive search and find how to get to 2.2.2.2.   Network 2.0.0.0 is available via next hop 1.1.1.2 and this is a connected route so the router has an arp entry for this ip address and the network reachability is resolved.    This happens because R2 who is a directly connected neighbor has a lower router-id (compared to R3) and therefore a more preferred route.  

 

R1    
2.0.0.0/24 is subnetted, 1 subnets B 2.2.2.0 [200/0] via 1.1.1.2, 00:07:58
3.0.0.0/24 is subnetted, 1 subnets B 3.3.3.0 [200/0] via 2.2.2.2, 00:01:39 4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 4.4.4.0/24 is directly connected, GigabitEthernet2 L 4.4.4.2/32 is directly connected, GigabitEthernet2 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.1.1.0/24 is directly connected, Loopback1 L 10.1.1.1/32 is directly connected, Loopback1 C 10.10.32.0/24 is directly connected, GigabitEthernet3 L 10.10.32.8/32 is directly connected, GigabitEthernet3 C 10.10.33.0/24 is directly connected, GigabitEthernet4 L 10.10.33.8/32 is directly connected, GigabitEthernet4 20.0.0.0/24 is subnetted, 1 subnets B 20.1.1.0 [200/0] via 1.1.1.2, 00:07:58 30.0.0.0/24 is subnetted, 1 subnets B 30.1.1.0 [200/0] via 2.2.2.2, 00:01:39 40.0.0.0/24 is subnetted, 1 subnets B 40.1.1.0 [200/0] via 4.4.4.1, 00:08:07 R1# sh arp Protocol Address Age (min) Hardware Addr Type Interface Internet 1.1.1.1 - 5254.002c.9242 ARPA GigabitEthernet1 Internet 1.1.1.2 9 5254.008e.508e ARPA GigabitEthernet1 Internet 4.4.4.1 9 5254.00bd.5995 ARPA GigabitEthernet2 Internet 4.4.4.2 - 5254.009b.5476 ARPA GigabitEthernet2 Internet 10.10.32.8 - 5254.0096.beab ARPA GigabitEthernet3 Internet 10.10.33.8 - 5254.00a0.3540 ARPA GigabitEthernet4 R1#

   

R3 is not so fortunate as it has a next hop ip of 1.1.1.1 for network 10.0.0.0/24.  R3 does a recursive search for 1.1.1.1 since it is not a connected route and finds to reach 1.1.1.1 send it to 1.1.1.1.     Well 1.1.1.1 is not a connected route and does not have an arp entry so packets can not be sent so the BGP neighbor and the holdtimer pops and the BGP session goes down.  

 

 

    1.0.0.0/24 is subnetted, 1 subnets

B        1.1.1.0 [200/0] via 1.1.1.1, 00:00:44

      10.0.0.0/24 is subnetted, 1 subnets

B        10.1.1.0 [200/0] via 1.1.1.1, 00:00:05



R3#  sh arp

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  2.2.2.1                17   5254.0091.9fdb  ARPA   GigabitEthernet1

Internet  2.2.2.2                 -   5254.00de.2aea  ARPA   GigabitEthernet1

Internet  3.3.3.1                 -   5254.00f7.f549  ARPA   GigabitEthernet2

Internet  3.3.3.2                17   5254.0014.56e6  ARPA   GigabitEthernet2

 

I See the video

at min 7:32 mention where you wrong here 
please take look to video at this time.
you select opposite interface not same direction interface.

BUT
between me and you this config is madness using bgp for bgp
we use OSPF/EIGRP/Static for BGP neighbor reachable<- I prefer this way

I checked the configuration is correct , i think you talking about the direction of the neighborship is also correct .

I am also agreed to use IGP protocols OSPF/EIGRP/Static Route.

 

"you select opposite interface not same direction interface." Can you mention where i am wrong?

Hi
I found the topology you attach it.

 

in each router config the route-id = loopback

and do clear ip bgp 

then send to me the result.

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.