13

Can someone explain the differences between a RIB and FIB a little further? I didn't see any similar questions on the site so I thought this would be a good addition. The RIB routes and the FIB forwards? Is that all there is to it?

stets
  • 1,000
  • 3
  • 8
  • 17
  • [This answer](http://networkengineering.stackexchange.com/a/18116/8499) explains it. – Ron Maupin Feb 02 '17 at 19:50
  • 1
    I don't feel that it explains it well enough. Thanks for the link, though. – stets Feb 02 '17 at 19:53
  • Then, I guess I really don't understand what you are asking. That is a pretty detailed explanation. – Ron Maupin Feb 02 '17 at 20:01
  • Did you edit the comment with a different link? The original question that was linked was very vague. This http://networkengineering.stackexchange.com/questions/18115/router-table-and-forwarding-table/18116#18116 does explain pretty well, though. – stets Feb 02 '17 at 20:27

1 Answers1

13

The forwarding information base (FIB) is the actual information that a routing/switching device uses to choose the interface that a given packet will use for egress. For example, the FIB might be programmed such that a packet bound to a destination in 192.168.1.0/24 should be sent out of physical port ethernet1/2. There may actually be multiple FIB's on a device for unicast forwarding vs multicast RPF checking, different protocols (ip vs mpls vs ipv6) but the basic function is the same - selection criteria (usually destination) mapping to output interface/encapsulation. Individual FIB's may also be partitioned to achieve concurrent independent forwarding tables (i.e. vrf's).

Each FIB is programmed by one or more routing information bases (RIB). The RIB is a selection of routing information learned via static definition or a dynamic routing protocol. The algorithms used within various RIB's will vary - so, for example, the means by which BGP or OSPF determines potential best paths vary quite a bit. The means by which multiple RIB's are programmed into a common (set) of FIB's in a box will vary by implementation but this is where concepts like administrative distance are used (e.g. identical paths are learned via eBGP and OSPF, the eBGP is usually preferred for FIB injection). Again, RIB's may also be potentially partitioned to allow for multiple vrf's, etc.

rnxrx
  • 6,094
  • 1
  • 19
  • 25