cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
825
Views
5
Helpful
5
Replies

Static Route precedence

Bab L
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

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

View solution in original post

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

HTH

Rick

View solution in original post

5 Replies 5

Jon Marshall
Hall of Fame
Hall of Fame

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

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

HTH

Rick

Thank you. Understood.

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

HTH

Rick

Thanks Jon.

Review Cisco Networking for a $25 gift card