cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2754
Views
10
Helpful
5
Replies

BGP - RIB failure, Invalid and still a best route

jaighobahi
Level 1
Level 1

Hello All,

How is it possible for a bgp route to be in error state, invalid route and still be a best route?  What causes RIB failure?  Please, see my configuration files and the associated topology.  The output of the routing table and bgp database for one of the three routers are also shown below:

R1#show run
interface Loopback1
ip address 10.10.10.10 255.255.255.255
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.252
duplex auto
speed auto
!
router ospf 1
router-id 10.10.10.10
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65000
no synchronization
bgp router-id 10.10.10.10
bgp log-neighbor-changes
network 10.10.10.10 mask 255.255.255.255
neighbor 20.20.20.20 remote-as 65000
neighbor 20.20.20.20 update-source Loopback1
no auto-summary
!
end

R2#show run
interface Loopback2
ip address 20.20.20.20 255.255.255.255
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.252
duplex auto
speed auto
interface FastEthernet0/1
ip address 172.16.1.2 255.255.255.252
duplex auto
speed auto
!
router ospf 1
router-id 20.20.20.20
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65000
no synchronization
bgp router-id 20.20.20.20
bgp log-neighbor-changes
network 20.20.20.20 mask 255.255.255.255
network 172.16.1.0 mask 255.255.255.252
network 192.168.1.0 mask 255.255.255.252
neighbor 10.10.10.10 remote-as 65000
neighbor 10.10.10.10 update-source Loopback2
neighbor 30.30.30.30 remote-as 64000
neighbor 30.30.30.30 ebgp-multihop 2
neighbor 30.30.30.30 update-source Loopback2
no auto-summary
!
ip route 30.30.30.30 255.255.255.255 FastEthernet0/0
!
end

R2#show ip route
Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
C       20.20.20.20 is directly connected, Loopback2
     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/1
     10.0.0.0/32 is subnetted, 1 subnets
O       10.10.10.10 [110/11] via 172.16.1.1, 00:18:38, FastEthernet0/1
     192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, FastEthernet0/0
     30.0.0.0/32 is subnetted, 1 subnets
S       30.30.30.30 is directly connected, FastEthernet0/0

R2#show ip bgp
BGP table version is 8, local router ID is 20.20.20.20
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

       Network             Next Hop      Metric  LocPrf  Weight Path
r>i   10.10.10.10/32    10.10.10.10   0       100        0          i
*>    20.20.20.20/32    0.0.0.0          0                    32768   i
r>    30.30.30.30/32    30.30.30.30   0                    0          64000 i
*>   172.16.1.0/30       0.0.0.0          0                   32768    i
*     192.168.1.0/30     30.30.30.30   0                    0          64000 i
*>                             0.0.0.0          0                    32768    i
R2#

R3#show run
!
interface Loopback3
ip address 30.30.30.30 255.255.255.255
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.252
duplex auto
speed auto
!
router bgp 64000
no synchronization
bgp router-id 30.30.30.30
bgp log-neighbor-changes
network 30.30.30.30 mask 255.255.255.255
network 192.168.1.0 mask 255.255.255.252
neighbor 20.20.20.20 remote-as 65000
neighbor 20.20.20.20 ebgp-multihop 2
neighbor 20.20.20.20 update-source Loopback3
no auto-summary
!
ip route 20.20.20.20 255.255.255.255 FastEthernet0/1
!
end

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

By definition, only the best routes can be in the RIB-failure state

The RIB-failure means that the BGP selected a best path and tried to install it into your routing table but it was unable to do it because the route was already present in the routing table with a better administrative distance. Note that if the route was not selected as being the best path, it would not be attempted to be installed into the routing table in the first place. The "RIB" here refers to the global routing table, not to the BGP table.

In your case, 10.10.10.10 is learned via OSPF and 30.30.30.30 is a static route, both obviously having a lower AD than the corresponding BGP routes.

Best regards,

Peter

View solution in original post

Lei Tian
Cisco Employee
Cisco Employee

Hi,

You have 2 prefixes are in RIB failure. 10.10.10.10/32, and 30.30.30.30/32. It just tells you this router learns the same prefix from other routing protocol with better AD. In your case, this router learns 10.10.10.10/32 from OSPF and iBGP. OSPF is preferred because lower AD; it learns 30.30.30.30/32 from eBGP and static connected route, static is preferred because of lower AD.

HTH,
Lei Tian

Sent from Cisco Technical Support iPhone App

View solution in original post

5 Replies 5

Vignesh Rajendran Praveen
Cisco Employee
Cisco Employee

Hi,

R2#show ip bgp
BGP table version is 8, local router ID is 20.20.20.20
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
r>i 10.10.10.10/32 10.10.10.10 0 100 0 i
*> 20.20.20.20/32 0.0.0.0 0 32768 i
r> 30.30.30.30/32 30.30.30.30 0 0 64000 i
*> 172.16.1.0/30 0.0.0.0 0 32768 i
* 192.168.1.0/30 30.30.30.30 0 0 64000 i
*> 0.0.0.0 0 32768 i
R2#

When BGP tries to install the bestpath prefix into Routing Information Base, RIB might reject the BGP route due to any of these reasons:

1) Route with better administrative distance already present in IGP. For example, if a static route already exists in IP Routing table.

2) Memory failure.

3) The number of routes in VPN routing/forwarding (VRF) exceeds the route-limit configured under the VRF instance.

In such cases, the prefixes that are rejected for these reasons are identified by r RIB Failure in the show ip bgp command output and are not advertised to the peers.

Offcourse > denotes that it is the best route in the BGP table but r denotes it did not get into the routing information base because of one of the above said reasons.

***********Plz do rate this post if you found it helpful*************************

Thanks & Regards,

Vignesh R P

Thank you Sir!

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

By definition, only the best routes can be in the RIB-failure state

The RIB-failure means that the BGP selected a best path and tried to install it into your routing table but it was unable to do it because the route was already present in the routing table with a better administrative distance. Note that if the route was not selected as being the best path, it would not be attempted to be installed into the routing table in the first place. The "RIB" here refers to the global routing table, not to the BGP table.

In your case, 10.10.10.10 is learned via OSPF and 30.30.30.30 is a static route, both obviously having a lower AD than the corresponding BGP routes.

Best regards,

Peter

Lei Tian
Cisco Employee
Cisco Employee

Hi,

You have 2 prefixes are in RIB failure. 10.10.10.10/32, and 30.30.30.30/32. It just tells you this router learns the same prefix from other routing protocol with better AD. In your case, this router learns 10.10.10.10/32 from OSPF and iBGP. OSPF is preferred because lower AD; it learns 30.30.30.30/32 from eBGP and static connected route, static is preferred because of lower AD.

HTH,
Lei Tian

Sent from Cisco Technical Support iPhone App

Thank you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card