02-14-2016 07:46 PM - edited 03-05-2019 03:20 AM
Hi.
If we have these two routes configured, which one takes precedence?
S 10.22.0.0/16 [1/0] via 10.18.29.18
S 10.22.128.0/23 [1/0] via 10.18.29.10
For example if we'd like to go to 10.22.128.10 where is it going to be routed from?
Can this cause an issue?
Thank you
Solved! Go to Solution.
02-15-2016 02:40 AM
The most specific prefix from the routing table is always used.
So in your example it would use the second route.
As to an issue, it depends on whether that is the correct route but there is no problem with the routing table you have as long as the next hop IPs are correct.
Jon
02-15-2016 07:29 AM
Jon is correct that a fundamental principle of IP routing is that a longer (more specific) route is always preferred over a shorter (less specific) route. As for whether this could cause an issue I would say that in a correctly designed network no it could not cause an issue. But in a poorly designed network it could cause an issue. If, for example, there is a subnet 10.22.14.0/24 which is actually reached via 10.18.29.18 then these static routes would direct traffic via 10.18.29.10 which would seem to be an issue. But the real problem here is the network design and not the routing behavior.
HTH
Rick
02-15-2016 02:40 AM
The most specific prefix from the routing table is always used.
So in your example it would use the second route.
As to an issue, it depends on whether that is the correct route but there is no problem with the routing table you have as long as the next hop IPs are correct.
Jon
02-15-2016 07:29 AM
Jon is correct that a fundamental principle of IP routing is that a longer (more specific) route is always preferred over a shorter (less specific) route. As for whether this could cause an issue I would say that in a correctly designed network no it could not cause an issue. But in a poorly designed network it could cause an issue. If, for example, there is a subnet 10.22.14.0/24 which is actually reached via 10.18.29.18 then these static routes would direct traffic via 10.18.29.10 which would seem to be an issue. But the real problem here is the network design and not the routing behavior.
HTH
Rick
02-15-2016 03:29 PM
Thank you. Understood.
02-15-2016 03:35 PM
I am glad that our explanations were helpful. Thank you for using the rating system to mark this question as answered. This will help other readers in the forum to identify discussions which have helpful information.
HTH
Rick
02-15-2016 03:30 PM
Thanks Jon.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide