5

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

4

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.

128.92.128.0/18 will be installed but so will 128.92.128.0/17 as the /18 doesn't cover all of the /17.

If you had static routes configured like this...

128.92.128.0/18 VIA x.x.x.x
128.92.128.0/17 VIA z.z.z.z

You would have the following results in the active table.

128.92.128.0 - 128.92.191.255 will be routed via x.x.x.x
128.92.192.0 - 128.92.255.255 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.

128.92.128.0/18 VIA x.x.x.x
128.92.192.0/18 VIA y.y.y.y
128.92.128.0/17 VIA z.z.z.z

Your active table would look like this.

128.92.128.0 - 128.92.191.255 will be routed via x.x.x.x
128.92.192.0 - 128.92.255.255 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.

| improve this answer | |
6

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 128.92.128.0/17 would contain the mtrie entries for 128.92.128.0/18... 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 128.92.128.0/17...

128.92.128.0/17 mtrie

This is a simplified view of an mtrie for 128.92.128.0/18 (which is contained inside 128.92.128.0/17)...

128.92.128.0/18 mtrie

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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