For example, can and be contained in one forwarding table together? Or the first one must be changed to Because the other half will go to the second prefix?

2 Answers 2


Both routes would be installed into the active routing table and the more specific route would win if it was relevant to the packet being routed. will be installed but so will as the /18 doesn't cover all of the /17.

If you had static routes configured like this... VIA x.x.x.x VIA z.z.z.z

You would have the following results in the active table. - will be routed via x.x.x.x - will be routed via z.z.z.z

The only way the /17 route wouldn't show up in your routing table is if you had something like this going on for static routes. VIA x.x.x.x VIA y.y.y.y VIA z.z.z.z

Your active table would look like this. - will be routed via x.x.x.x - will be routed via y.y.y.y

Since you have all of the /17 covered by more specific /18 routes the /17 drops out of the active routing table.


IP forwarding tables are commonly stored in an m-trie, which is a 256-way trie.

If the forwarding table was implemented as a 256-way m-trie, then would contain the mtrie entries for although these two routes could easily go to different IPv4 next-hops, since IP routing works on the principle of longest-prefix-match wins.

This is a simplified view of an mtrie for mtrie

This is a simplified view of an mtrie for (which is contained inside mtrie

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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