Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So I understand that to forward a packet, a router needs 3 pieces of information: next hop, egress interface and Adjacency (L2 information). On a Cisco router, this will be stored in FIB and CEF.

What confuses me is that it appears next hop is needed only for finding out adjacency info (by ARP), because really only L2 info is necessary when forwarding a IP packet to the next router.

So my question is why there is this indirection between next hop -> adjacency? Why can't this adjacency information be collected directly? And how is this egress interface decided inside a router?

Or it would be more helpful if someone could explain how are the two tables (FIB and CEF) populated?

Edit:

I guess my question itself is very confusing. So here I am trying to make it more specific/clear.

I am aware that there are many different routing protocols. However, my question isn't really about how the routes are received or calculated. It's more in line with what happens in a router after these information is received. To be more specific, in a router, adjacency is usually inserted by ARP instance. And next hop information are the ones inserted by routing instances. So here I am assuming that next hop is already known/calculated by the routing instance.

share|improve this question

1 Answer 1

There are plenty of routing protocols which exist for the sole purpose of helping routers exchange routes between them and populate their routing tables.

Which ones are actually used and which informations do they convey depends on the configuration of the routers and the network topology.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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