Redistribute Question - Route Map

Unanswered Question
Jan 25th, 2009

Hello All,

Trying to make sure I understand the use of route-map to redistribute routes from one routing protocol to another. See the attached diag to reference the configs below. I am trying to redistribute routes, cut out feedback, and adjust metric for optimal routing. Below are relevant config for border routers. Let me know where I am wrong so I can better understand. Thanks in advance.

Richard

Router 2

--------

!

access-list 9 permit 11.11.11.4 255.255.255.255

access-list 10 permit 10.0.0.0 0.255.255.255

access-list 11 permit 11.0.0.0 0.255.255.255

!

route-map pacific deny 10

match ip add 10

route-map pacific permit 20

match ip add 9

set metric 2

route-map pacific permit 30

!

route-map atlantic deny 10

match ip add 11

route-map atlantic permit 20

!

router rip

redistirbute ospf 10 route-map pacific

network 10.0.0.0

!

router ospf 10

redistribute rip route-map atlantic

network 11.0.0.0 0.255.255.255 area 0

!

!

Router 5

--------

!

access-list 9 permit 11.11.11.3 255.255.255.255

access-list 10 permit 10.0.0.0 0.255.255.255

access-list 11 permit 11.0.0.0 0.255.255.255

!

route-map pacific deny 10

match ip add 10

route-map pacific permit 20

match ip add 9

set metric 2

route-map pacific permit 30

!

route-map atlantic deny 10

match ip add 11

route-map atlantic permit 20

!

router rip

redistirbute ospf 10 route-map pacific

network 10.0.0.0

!

router ospf 10

redistribute rip route-map atlantic

network 11.0.0.0 0.255.255.255 area 0

!

!

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.3 (3 ratings)
Loading.
Richard Burts Sun, 01/25/2009 - 17:10

Richard

First perhaps we can clarify some terminology. In your post you say:"the use of route-map to redistribute routes". While it may be a subtle point I would like to make sure that everyone who reads this thread realizes that route maps do not redistribute routes, but they control the redistribution of routes which is done by the redistribute command under the routing protocol.

As to the specifics of your config I do have some comments:

- both route maps start with statement 10 which is a deny. there is deny logic in route maps and it gets quite tricky. My advice when I was teaching Cisco classes was to make sure that you are very comfortable with route maps using permit statements in the route map statement and then perhaps move on to the deny logic in the route map statement. If you are comfortable with it then the deny statement can work, but in general I would prefer to see route maps for redistribution which have permit in the route map statement and the deny in the access list.

- route map pacific is used to control redistibution from osps to rip. statement 10 will deny network 10.0.0.0/8, which is intended (I believe) to prevent redistribution back into rip a network that ospf learned from rip. statement 20 will permit the redistribution of a host route 11.11.11.3. If that host route is present in the table as an ospf route then it will redistribute and have a metric of 2. statement 30 is problematic. Since it has no match statement it will allow all other ofps routes to be redistributed. But since there is no default metric configured under router rip the routes that attempt to redistribute from ospf will have no default route and the redistribution will fail. Either you need a set metric under statement 30 or you need a defualt metric under router rip.

HTH

Rick

richard.m.gilbert Mon, 01/26/2009 - 10:41

Rick,

I appreciate the feedback. You are right and I should have a bit more specific in explaining I wanted to redistribute routes and filter them with a route-map.

I think I need you to explain the second paragraph another way as I am not totally understanding it very well. My goals were to cutout routes being redistributed back into the protocol they originated and adjust the metric of routes being redistributed into RIP from OSPF to better gauge their distance.

Map Pacific kept the 10.0.0.0 net from coming back into RIP and Pacific kept the 11.0.0.0 net from coming back into OSPF. Those are done in the sequence-number 10 in both pacific and atlantic. From what I understand in your first point, are you suggesting it should look like this instead?

access-list 10 deny 10.0.0.0

access-list 10 permit any

!

route-map pacific permit 10

match ip add 10

!

In your second point, I was under the impression that if you didn't use the match/set in a sequence number it would set nothing and just follow the permit instruction. Basically like saying permit any any in an ACL to override the implicit deny. By setting nothing, it would go with the default set, and I am not sure what the default is for RIP? I imagine it is 1 or infinity (16?). I guess I was assuming the default is 1 hop. Is that where I am wrong?

Richard

Richard Burts Mon, 01/26/2009 - 10:49

Richard

Yes you are wrong. There is no default metric associated with RIP. If you attempt to redistribute into RIP without a default metric the redistribution fails.

And the problem with your statement 30 is that it is essentially a permit any but there is nothing to specify any default metric.

HTH

Rick

richard.m.gilbert Mon, 01/26/2009 - 21:02

Rick,

So should the 30 sequence be this?

route-map pacific/atlantic permit 30

set metric 1

I don't have to put a match statement in do I?

Richard

Richard Burts Tue, 01/27/2009 - 04:38

Richard

Yes that is how the route map should be configured and no you do not need a match statement.

A statement in a route map can have no match and no set (as you originally configured), or it can have a match with no set (as you did in statement 10), or it can have a set with no match. If the route map statement has no match clause then it functions as permit any, and then the set clause will act on all the traffic that has been permitted.

HTH

Rick

Mohamed Sobair Mon, 01/26/2009 - 11:30

Hello,

First: In order to redistribute from any routing Protocol to Rip or Eigrp you will need a (Seed Metric) to be associated, as u Know RIP uses Hop counts as Metric, a maximum of 15 and 16 will be considerd unreachable.

Second: In order to redistribute from any routing Protocol into OSPF, you will need to add the (Subnet) Keyword. Without This Only Classful Networks will be redistributed.

Third: For Optimal Routing Design, and to prevent From routing Loop, Router (2 & 5) are acting as ASBRs (Autonomous System Boundry routers), you will need a Single point Of Redistribution as recommended, This can be achieved by having routes redistributed into R2 Tagged and denied at R5 toward RIP and Vice Versa to prevent looping.

For Optimal Path, The Direct Rip Routes should have a lesses Administrative distances on R2 & R5 than OSPF to have both routers prefer the Direct RIP routes over OSPF.

HTH

Mohamed

richard.m.gilbert Tue, 01/27/2009 - 05:24

Mohamed,

I understand now on your first point. For RIP the default metric is infinity. What is the default for EIGRP?

I already learned your second point but for some reason I forgot to add that in my example. Thanks for reminding me. It should look like this ...

router ospf 10

redistribute rip route-map atlantic subnet

network 11.0.0.0 0.255.255.255 area 0

Your third point I understand as well. Is there are a reason to use the tag way over the way I did it? It seems to me that the tag way is more lines of config and does the same things as the way I did it.

Your last point, I am not understanding. If I have blocked all RIP routes from coming back into RIP and all OSPF routes coming back into OSPF, how will there be secondary route inside RIP that come from OSPF (and vice versa)?

Richard

Actions

This Discussion