When you configure multipoint redistribution, it’s a good idea to use route tagging to prevent advertising something from routing protocol “A” into “B” and back into “A”. Let me give you an example:
Above you see routing protocols A and B. At the bottom, we find network 126.96.36.199 /24. Let’s say R1 redistributes this network from routing protocol A into B. R2 will learn about this network from routing protocol B and redistribute it back into Routing Protocol A. This is something you want to avoid, and we can do it with route tagging…here’s an example:
When R1 redistributes network 188.8.131.52 /24 into routing protocol B, it should tag it. When R2 is going to redistribute routing information from routing protocol B into routing protocol, A it will notice the tag and skip redistribution for network 184.108.40.206 /24.
Of course, the same thing applies to R2. I’m only showing you the example for R1:
R1#show ip route 220.127.116.11 Routing entry for 18.104.22.168/24 Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 2 Last update from 192.168.12.2 on FastEthernet0/0, 00:00:04 ago Routing Descriptor Blocks: * 192.168.12.2, from 192.168.45.4, 00:00:04 ago, via FastEthernet0/0 Route metric is 20, traffic share count is 1
You can use
show ip route to check if a route has been tagged or not. Nothing has been tagged so far. Let’s configure route tagging:
R1(config)#route-map TAG deny 10 R1(config-route-map)#match tag 1 R1(config-route-map)#exit R1(config)#route-map TAG permit 20 R1(config-route-map)#set tag 1
You can tag routes using a route-map. I created a simple route-map called TAG with two sequence numbers:
- Sequence number 10 says that when it matches tag number 1 that it should be denied.
- Sequence number 20 says that we need to set tag number 1. There’s no “match” statement, so EVERYTHING will match.
R1(config)#router rip R1(config-router)#redistribute ospf 1 metric 5 route-map TAG
R1(config)#router ospf 1 R1(config-router)#redistribute rip subnets route-map TAG
Now I need to make sure we use the route-map when redistributing. The example above is for redistributing into RIP and OSPF. At the end of your redistribution command, you need to specify the route-map. Everything that is redistributed INTO RIP or OSPF will have a tag of 1. Once again, I’m only showing R1, but you need to do this on R2 as well.
Excellent article, Rene. Is this a way to prevent what they call asymmetric routing?
It’s mostly used to prevent routing loops or sub-optimal routing paths that are caused by redistribution. Asymmetric routing doesn’t have to be a problem…when using IGPs (OSPF / EIGRP) you will mostly see symmetric routing but with BGP, asymmetric routing is likely to occur.
if the route map was writed in this way:
is the same thing?
It’s not the same thing. In the first permit 10 statement there is no “match” so it will match on everything and set the tag to 1. You will never make it to the “permit 20” statement since everything is permitted.
can you please explain this one to me please,