1

There are both routing table and forwarding table inside a router. The question is that how do these two tables connect with each other(if they do) and how does the router functions in respect to these two table.

There are a lot of things going inside a router as it directs the flow of packets throughout the network with the help of routing table, forwarding table, VC(Virtual Circuit) table and longest prefix matching.

I am interested in knowing how all things stay in sync with each other and work efficiently.

A granular view of the situation will be appreciated.

  • @SahilBabbar, perhaps if you could edit your question with more background and why you are asking this question, it would make it a better question and make it sound less like a homework question. – YLearn Apr 27 '15 at 13:49
6

In essence, RIB (Routing Information Base) is being built by various routing processes on the node, with information from routing protocols - like OSPF, IS-IS, BGP or even the static entries.

After out of all routes in RIB the best ones are selected, they are copied to FIB (Forwarding Information Base). The exact means vary from platform to platform. In general, it's either done by some IPC communication, internal network, or simply (in monolitic software solutions) as a copy (data or pointers) between tables.

So, RIB contains all the routes node is willing to keep and the information there is being used by the routing protocols. FIB is used by hardware to physically move the packets in and out of interfaces. Hardware can keep forwarding based on the FIB contents, while RIB is being updated/etc.

Take a look here for starters: http://blog.ipspace.net/2010/09/ribs-and-fibs.html and then - for example - dig deeper into http://networkstatic.net/juniper-and-cisco-comparisons-of-rib-lib-fib-and-lfib-tables/ for more detailed RIB/FIB/LFIB illustration.

Also, 'A granular view of the situation is required.' sounds a little rude. It's community portal, if you require something maybe you should look for commercial ways of gaining this knowledge.

| improve this answer | |
  • 1
    This is a great answer although reading your question I get the impression there is typically only one shared RIB that all processes put route entries into like IGP, EGP, local routing etc, but typically they all have their own RIBs that feed into a FIB. I just wanted to point out that isn't very clear from your otherwise great answer :) – jwbensley Apr 27 '15 at 11:14
  • Yes, that's true - RIB is usually per-protocol, and then either there's another, "central" RIB, or structured process of choosing best routes to be installed in FIB, or software representation of FIB. Thanks for noting! – Łukasz Bromirski Apr 27 '15 at 11:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.