cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
396
Views
0
Helpful
7
Replies

Strange OSPF Problem

kevin.hu
Level 3
Level 3

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 7

mark-obrien
Level 4
Level 4

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

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.

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

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?

Longest match trumps all, including admin distance and metric.

Mark

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

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

Kevin,

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

Mark

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: