05-07-2003 08:33 PM - edited 03-02-2019 07:11 AM
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?
05-08-2003 03:06 AM
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
05-08-2003 04:49 AM
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.
05-08-2003 05:09 AM
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
05-08-2003 08:00 AM
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?
05-08-2003 08:09 AM
Longest match trumps all, including admin distance and metric.
Mark
05-08-2003 08:36 AM
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
05-08-2003 05:09 AM
Kevin,
Is R2 doing the redistribution as external type 1 or type 2?
Mark
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