cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1664
Views
5
Helpful
6
Replies

Basic BGP understanding Issue

libra_ali786
Level 1
Level 1

I just create ibgp topology with 3 routers. But my R1 and R3 flapping and i can not able to ping loopback R1 to R3 vice versa also not able to ping from R3 to R1 neigbor IP 1.1.1.1 and from R1 to R3 2.2.2.2.

I am attaching GNS3 smal lab. I am not using Next-hop Self commmand because i am advertising the connected interfaces. On the debug ip bgp . you can seen the logging messages.

 

Please explain why this problem happen.

Thanks

1 Accepted Solution

Accepted Solutions

Hello @libra_ali786 ,

you need to provide to each router knowledge of the inter router links.

 

Let's take the example of R3

 

router bgp 100

 bgp log-neighbor-changes

 network 2.2.2.0 mask 255.255.255.0

 network 30.1.1.0 mask 255.255.255.0

 neighbor 1.1.1.1 remote-as 100

 neighbor 2.2.2.2 remote-as 100

 

in order to establish a stable iBGP session with 1.1.1.1 you need

 

R3:

conf t

ip route 1.1.1.0 255.255.255.255.0 2.2.2.2

 

in a similar way on R1:

R1:

conf t

ip route 2.2.2.0 255.255.255.0 1.1.1.2

 

BGP sessions are TCP sessions between specified end points but devices need to be able to send packets to remote endpoint.

 

R2 does not need static routes because it has inter router links as connected interfaces but for R1 and R3 the things are different.

 

Hope to help

Giuseppe

View solution in original post

6 Replies 6

Hello,

 

post the configs as text file attachments. 

Please see the attachement.

Hello @libra_ali786 ,

you need to provide to each router knowledge of the inter router links.

 

Let's take the example of R3

 

router bgp 100

 bgp log-neighbor-changes

 network 2.2.2.0 mask 255.255.255.0

 network 30.1.1.0 mask 255.255.255.0

 neighbor 1.1.1.1 remote-as 100

 neighbor 2.2.2.2 remote-as 100

 

in order to establish a stable iBGP session with 1.1.1.1 you need

 

R3:

conf t

ip route 1.1.1.0 255.255.255.255.0 2.2.2.2

 

in a similar way on R1:

R1:

conf t

ip route 2.2.2.0 255.255.255.0 1.1.1.2

 

BGP sessions are TCP sessions between specified end points but devices need to be able to send packets to remote endpoint.

 

R2 does not need static routes because it has inter router links as connected interfaces but for R1 and R3 the things are different.

 

Hope to help

Giuseppe

Thanks for the reply. One more thing if you enable the debug ip bgp on R1 and R3 router they give some adjacency error and also R1& R3 interface in the routing loop. Why?

R1#
*Feb 4 10:10:09.051: %IPRT-3-RIB_LOOP: Resolution loop formed by routes in RIB
*Feb 4 10:10:10.167: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Down BGP Notification sent
*Feb 4 10:10:10.171: %BGP-3-NOTIFICATION: sent to neighbor 2.2.2.2 4/0 (hold time expired) 0 bytes
R1#
*Feb 4 10:10:10.183: %BGP_SESSION-5-ADJCHANGE: neighbor 2.2.2.2 IPv4 Unicast topology base removed from session BGP Notification sent
*Feb 4 10:10:10.603: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up

 

R1#show ip route loops
->default:ipv4:base 2.2.2.0/24 -> base 2.2.2.2 bgp 00:09:28 N
R1#

 

 

R3#
*Feb 4 10:10:09.995: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification sent
*Feb 4 10:10:09.999: %BGP-3-NOTIFICATION: sent to neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes
R3#
*Feb 4 10:10:10.011: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session BGP Notification sent
R3#
*Feb 4 10:10:13.799: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R3#
R3#
*Feb 4 10:11:12.243: %IPRT-3-RIB_LOOP: Resolution loop formed by routes in RIB

R3#show ip route loops
->default:ipv4:base 1.1.1.0/24 -> base 1.1.1.1 bgp 00:10:14 N

Dear @libra_ali786 ,

in BGP a prefix cannot have a next-hop that is part of the prefix itself:

 

>> *>i 1.1.1.0/24 1.1.1.1 0 100 0 i

 

The best way to fix your issues is to use an indipendent way to provide unicast routing to BGP endpoints either using static routes either using a dynamic routing protocol like OSPF.

 

The log messages show that the iBGP session between R1 and R3 is not stable

>>*Feb 3 20:12:15.510: %BGP-3-NOTIFICATION: received from neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes
>>*Feb 3 20:12:15.514: BGP: ses global 1.1.1.1 (0x6B11740C:1) Receive NOTIFICATION 4/0 (hold time expired) 0 bytes

 

Given the simple topology the only other option is to advertise in BGP the inter router links only on R2, however this could work only for the simple topology you have a daisy chain of three routers.

In general as I have explained above you need to provide an indipendent way to reach BGP endpoints/next hops

 

Hope to help

Giuseppe

 

Why R1 forming routing loop with 2.2.2.2

R1#
*Feb 4 10:10:09.051: %IPRT-3-RIB_LOOP: Resolution loop formed by routes in RIB
*Feb 4 10:10:10.167: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Down BGP Notification sent
*Feb 4 10:10:10.171: %BGP-3-NOTIFICATION: sent to neighbor 2.2.2.2 4/0 (hold time expired) 0 bytes
R1#
*Feb 4 10:10:10.183: %BGP_SESSION-5-ADJCHANGE: neighbor 2.2.2.2 IPv4 Unicast topology base removed from session BGP Notification sent
*Feb 4 10:10:10.603: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up
R1#show ip route loops
->default:ipv4:base 2.2.2.0/24 -> base 2.2.2.2 bgp 00:09:28 N

 

 

Why R3 forming routing loop with 1.1.1.1

 

*Feb 4 10:10:09.995: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification sent
*Feb 4 10:10:09.999: %BGP-3-NOTIFICATION: sent to neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes
R3#
*Feb 4 10:10:10.011: %BGP_SESSION-5-ADJCHANGE: neighbor 1.1.1.1 IPv4 Unicast topology base removed from session BGP Notification sent
R3#
*Feb 4 10:10:13.799: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R3#
R3#
*Feb 4 10:11:12.243: %IPRT-3-RIB_LOOP: Resolution loop formed by routes in RIB

 

R3#show ip route loops
->default:ipv4:base 1.1.1.0/24 -> base 1.1.1.1 bgp 00:27:27 N

Review Cisco Networking for a $25 gift card