cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2292
Views
0
Helpful
3
Replies

Static Route vs. Dynamic Routing

davidhuynh5
Level 1
Level 1

Please see attachments.

On sa26-man-r1, when I configure "ip route 10.4.8.0 255.255.255.0 10.0.0.1", it does not go over the correct link?

I would assume that static routes takes precedence over dynamuic routing.

Thanks in advance.

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

David

I think that I understand what is going on with your situation. Your static route is creating a prefix in your routing table with a length of /24. The other router running OSPF is advertising the loopback interfaces. And if you check your routing table you should find that OSPF is advertising the loopback addresses as /32. (advertising loopback interfaces as /32 is a behavior of IOS that may not be widely known) So if you do a show ip route on the sa26 router I believe that you will see both your /24 static route and a pair of /32 routes. And since routing decisions use the longest prefix you are routing using the /32 OSPF routes and not the /24 static.

The question of administrative distance in which a static route is preferred over a dynamic route only works on prefixes of the same length. Since the prefixes in your case are different lengths the issue of static over dynamic does not come into play.

Note that if you configure the other router loopback interfaces with the command ospf network point-to-point, then the router will advertise them as /24 and your static route should be chosen.

HTH

Rick

HTH

Rick

View solution in original post

3 Replies 3

Richard Burts
Hall of Fame
Hall of Fame

David

I think that I understand what is going on with your situation. Your static route is creating a prefix in your routing table with a length of /24. The other router running OSPF is advertising the loopback interfaces. And if you check your routing table you should find that OSPF is advertising the loopback addresses as /32. (advertising loopback interfaces as /32 is a behavior of IOS that may not be widely known) So if you do a show ip route on the sa26 router I believe that you will see both your /24 static route and a pair of /32 routes. And since routing decisions use the longest prefix you are routing using the /32 OSPF routes and not the /24 static.

The question of administrative distance in which a static route is preferred over a dynamic route only works on prefixes of the same length. Since the prefixes in your case are different lengths the issue of static over dynamic does not come into play.

Note that if you configure the other router loopback interfaces with the command ospf network point-to-point, then the router will advertise them as /24 and your static route should be chosen.

HTH

Rick

HTH

Rick

thanks Rick. You're a genius.

David

I am glad that my response helped to resolve your question. Thank you for using the rating system to indicate that your question was resolved (and thanks for the rating). It makes the forum more useful when people can read about a question and can know that they will find response that did resolve the question.

The forum is an excellent place to learn about Cisco networking. I encourage you to continue your praticipation in the forum.

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card