×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Strange OSPF Problem

Unanswered Question
May 7th, 2003
User Badges:

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
mark-obrien Thu, 05/08/2003 - 03:06
User Badges:
  • Bronze, 100 points or more

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

kevin.hu Thu, 05/08/2003 - 04:49
User Badges:

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.

cjnwodo Thu, 05/08/2003 - 05:09
User Badges:

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

kevin.hu Thu, 05/08/2003 - 08:00
User Badges:

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?

mark-obrien Thu, 05/08/2003 - 08:09
User Badges:
  • Bronze, 100 points or more

Longest match trumps all, including admin distance and metric.


Mark

thisisshanky Thu, 05/08/2003 - 08:36
User Badges:
  • Purple, 4500 points or more

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

mark-obrien Thu, 05/08/2003 - 05:09
User Badges:
  • Bronze, 100 points or more

Kevin,


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


Mark

Actions

This Discussion