If a router has multiple routes to a network over multiple routing protocols, it stores all routing information in the RIB. This information may not be necessarily used when determining best path to the network. To determine best path to the network, CEF uses the FIB. I understand this.
Consider a network where:
R2 ------- R1 ------- R3
R2 (10.0.0.2/24) connects to R1 (10.0.0.1/24)
R1 (192.168.0.1/24) connects to R3 (192.168.0.2/24)
On R2, R3: I have default routes pointing to R1:
R2: ip route 0.0.0.0 0.0.0.0 10.0.0.1
R3: ip route 0.0.0.0 0.0.0.0 192.168.0.1
Now, from R2, I can ping R3 fine.
R2#ping 192.168.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/39/44 ms
So, I try to see the route entry for 192.168.0.2
R2#sh ip route 192.168.0.2
% Network not in table
I don't see it. So I look at the CEF/FIB.