Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Strange OSPF Problem

R1

route-map OSPF permit 10

match ip add 1 2 3

router ospf 1

redistribute static route-map OSPF

default metric 110

Let's say ACL 1, 2 exist, and there is no ACL 3. How does a router treat packets against an ACL that doesn't exist in a route map?

We encounter this problem where R2 advertises a connected network with metric of 10. However, R3 will learn this network from R1 if "match ip add 3" is there, with metric of 110. If we take out 3 from the match statement, it will learn the route normally from R2. Why is that?

7 REPLIES
Bronze

Re: Strange OSPF Problem

In many cases, referring to a non-existent ACL results in a "permit all" situation. In your case, does R1 have a static route to the network that is connected to R2?

Mark

Community Member

Re: Strange OSPF Problem

Mark,

Yes, R1 has a static route to the network that is connected to R2.

However, it still does not explain why R3 learned this network from R1 (metric of 110 via redistribution) instead of from R2 (metric of 10 via direct-connected)?

Once I take out the non-existent ACL, R3 will learn normally from R2.

Community Member

Re: Strange OSPF Problem

Some more information I believe is required:

A sh ip route on R1,R2 & R3 for the prefix that ACL 3 was matching, before and after the match ip address 3 has been added and removed from R1 may help clarify. Also put in the relevant R2 OSPF configuration.

Thanks

Community Member

Re: Strange OSPF Problem

Thanks for reminding me. So OSPF will install a route with the longest prefix match even though its metric is much higher? In another word, OSPF will choose longest match over metric?

Bronze

Re: Strange OSPF Problem

Longest match trumps all, including admin distance and metric.

Mark

Re: Strange OSPF Problem

Kevin,

Longest match rule is used only for routing decisions ( how to route a packet) and not on whether to install a route or not. If two prefixes (say a /24 and /30) from the same major network comes, both of them will be installed no matter what the metric is or admin distance is.

If the same 2 prefixes are advertised by another routing protocol such as EIGRP, then the admin distance is considered for each of the prefixes.

Hope that helps

Bronze

Re: Strange OSPF Problem

Kevin,

Is R2 doing the redistribution as external type 1 or type 2?

Mark

209
Views
0
Helpful
7
Replies
CreatePlease to create content