How does a router organize its routing table in order to service the incomming packets fast? This is more of a programming question, and I am looking for:
Note: the actual creation of the routing table (via routing protocols such as RIP, OSPF or manual entries) is irrelevant.
You can have a trie and cache the lookups on a hash. See for example Linux's ip_route_input()
(which tries to find the entry on a hash) and ip_route_input_slow()
(which tries to find the entry in the Forwarding Information Base, a trie).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With