How does a router organize its routing table?

How does the router organize its routing table to quickly serve incoming packets? This is more of a programming issue, and I'm looking for:

  • algorithm and data structure for storing routing table entries for quick search (hash? trie?)
  • algorithm optimization (for example, the use of caches)
  • bonus: the historical evolution of these algorithms (based on the fact that memory has become cheaper, etc.).

Note: the actual creation of the routing table (via routing protocols such as RIP, OSPF or manual entries) does not matter.

+5
source share
1 answer

trie . . , Linux ip_route_input() ( ) ip_route_input_slow() ( , trie).

+1

All Articles