Hi Gareth,
Each routing protocol has its own “RIB”. The OSPF LSDB can be called the OSPF RIB and the EIGRP topology table is the EIGRP RIB.
The routing table can be considered the “main” RIB of the router.
The FIB is your forwarding table, on Cisco routers, this is the CEF table. It doesn’t only contain L3 information like the RIB does but also L2 information (needed to reach the next hop).
Here’s the main RIB of a router:
R1#show ip route
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/1
L 192.168.12.1/32 is directly connected, GigabitEthernet0/1
It only has directly connected subnets. Here is the CEF table of this router:
R1#show ip cef
Prefix Next Hop Interface
0.0.0.0/0 no route
0.0.0.0/8 drop
0.0.0.0/32 receive
127.0.0.0/8 drop
192.168.12.0/24 attached GigabitEthernet0/1
192.168.12.0/32 receive GigabitEthernet0/1
192.168.12.1/32 receive GigabitEthernet0/1
192.168.12.2/32 attached GigabitEthernet0/1
192.168.12.255/32 receive GigabitEthernet0/1
224.0.0.0/4 drop
224.0.0.0/24 receive
240.0.0.0/4 drop
255.255.255.255/32 receive
As you can see, there are some additional entries here (for example, 224.0.0.0/4 for multicast traffic). This router knows how to reach 192.168.12.2, a host on the 192.168.12.0/24 subnet:
R1#show ip cef 192.168.12.0 255.255.255.0 longer-prefixes
Prefix Next Hop Interface
192.168.12.1/32 receive GigabitEthernet0/1
192.168.12.0/32 receive GigabitEthernet0/1
192.168.12.255/32 receive GigabitEthernet0/1
192.168.12.2/32 attached GigabitEthernet0/1
Here you can see the IP address and the interface, but there’s more. The MAC address to reach 192.168.12.2 is in the ARP table:
R1#show ip arp 192.168.12.2
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.12.2 46 fa16.3ec1.417c ARPA GigabitEthernet0/1
The FIB also has a section where L2 information is stored, the adjacency table:
R1#show adjacency 192.168.12.2 detail
Protocol Interface Address
IP GigabitEthernet0/1 192.168.12.2(7)
0 packets, 0 bytes
epoch 0
sourced in sev-epoch 0
Encap length 14
FA163EC1417CFA163E7A27560800
ARP
Above you can see the IP, interface, and the MAC address (FA163EC1417C).
To answer your question, the routes from the main RIB are copied to the FIB but the FIB has additional information that is needed for forwarding (like the L2 information).
I hope this helps!
Rene