cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9435
Views
0
Helpful
6
Replies

Tag for Route-Maps

Syed.Javed68
Level 1
Level 1

I was working on CCNP Route-Maps using Tag project and had the attached design to work on. I was able to add tags on the fly while doing the following:

Right side R4 is OSPF 1 and left R2 is RIP routers while middle ones distributing.  So I was able to tag with the following:

R3#

router ospf 1

redistribute rip subnets tag 1120

route-map RIP-OSPF, deny, sequence 10
    tag 120
route-map RIP-OSPF, permit, sequence 20

R1#

router ospf 1

redistribute rip subnets tag 120

route-map RIP-OSPF, deny, sequence 10
    tag 1120
route-map RIP-OSPF, permit, sequence 20

The problem however is that when I try to tag the same in RIP, the command doesn't show any tag option:

R1#

router rip

redistribute ospf 1 metric 1 ?
  match      Redistribution of OSPF routes
  route-map  Route map reference
  <cr>

Why can't I use tag the same way as I used with ospf? I even tried with router rip, version 2, but same thing. What are my options as I round this method easiest to use tag with route maps. Any feedback is appreciated.

1 Accepted Solution

Accepted Solutions

What you have is not quite right.

So lets say the tag to use from OSPF to RIP is 3 and the tag from RIP to OSPF is 4.

On both R1 and R3 you would do this -

route-map OSPF-RIP deny 10
match tag 4
route-map OSPF-RIP permit 20
set tag 3

route-map RIP-OSPF deny 10
match tag 3
route-map RIP-OSPF permit 20
set tag 4

and then use the route maps in your redistribution commands.

The logic is basically -

you tag routes that are redistributed from OSPF to RIP with a tag of 3 on R1 and so when the routes reach R3 you want to make sure those same routes are not redistributed back into OSPF which is why you match on the tag.

Does this make sense ?

Jon

View solution in original post

6 Replies 6

acampbell
VIP Alumni
VIP Alumni

Hi,

Have a look at this link:-
http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8606-redist.html

You will a statement
 "Note that redistribution based on tags do not work with RIP version 1 or IGRP."

Should be OK if you use RIP-V2 and deploy a route-map

Regards
Alex

Regards, Alex. Please rate useful posts.

Thanks Alex. Here's what I've tried. Please share your views on this:

R1#

route-map OSPF-RIP permit 10

set tag 110

exit

router rip

redistribute ospf 1 route-map OSPF-RIP metric 1

R3#

route-map OSPF-RIP deny 10

match tag 110

route-map OSPF-RIP permit 20

exit

router rip

redistribute OSPF 1 route-map OSPF-RIP metric 1

What you have is not quite right.

So lets say the tag to use from OSPF to RIP is 3 and the tag from RIP to OSPF is 4.

On both R1 and R3 you would do this -

route-map OSPF-RIP deny 10
match tag 4
route-map OSPF-RIP permit 20
set tag 3

route-map RIP-OSPF deny 10
match tag 3
route-map RIP-OSPF permit 20
set tag 4

and then use the route maps in your redistribution commands.

The logic is basically -

you tag routes that are redistributed from OSPF to RIP with a tag of 3 on R1 and so when the routes reach R3 you want to make sure those same routes are not redistributed back into OSPF which is why you match on the tag.

Does this make sense ?

Jon

Thanks Jon. I removed all redistribute and route-map configs and put in what you suggested. All works well but only traceroute to 2.2.2.2 from R1 is going through OSPF area instead of going just next to its neighbor R2. Here's the stats:

R1# traceroute 2.2.2.2

1  1.1.2.2

2  1.1.3.1

3  1.1.4.1

Whereas it should be:

1  1.1.1.1

Is it avoidable with some config or can't? Is it because of OSPF cost or what?

It is choosing that path because OSPF has a better AD than RIP.

This is one of the issues you can face when you do mutual redistribution on multiple redistribution points in the network.

You cannot simply change the AD for all routes because then traffic would just go the other way round.

What you can do is modify the AD per route so you could use that to make sure the shortest path is always taken.

Jon

Thanks Jon. I figured that out as well. Appreciate your help.

Review Cisco Networking products for a $25 gift card