Route Redistribution Basic
When you redistribute one protocol into another, remember that the metrics of each protocol play an important role in redistribution. Each protocol uses different metrics. For example, the Routing Information Protocol (RIP) metric is based on hop count, but Interior Gateway Routing Protocol (IGRP) and Enhanced Interior Gateway Routing Protocol (EIGRP) use a composite metric based on bandwidth, delay, reliability, load, and maximum transmission unit (MTU), where bandwidth and delay are the only parameters used by default. When routes are redistributed, you must define a metric that is understandable to the receiving protocol. There are two methods to define metrics when redistributing routes.
You can define the metric for that specific redistribution only:
redistribute static metric 1
redistribute ospf 1 metric 1
Or you can use the same metric as a default for all redistribution (Using the default-metric command saves work because it eliminates the need for defining the metric separately for each redistribution.):
This output shows an IGRP/EIGRP router redistributing static, Open Shortest Path First (OSPF), RIP, and Intermediate System-to-Intermediate System (IS-IS) routes.
router igrp/eigrp 1
redistribute ospf 1
default-metric 10000 100 255 1 1500
In the above topology, if R1 is running RIP, and R2 and R5 are running both RIP and IGRP and redistributing RIP into IGRP, then there is a potential problem. For example, R2 and R5 are both learning about network 192.168.1.0 from R1 using RIP. This knowledge is redistributed into IGRP. R2 learns about network 192.168.1.0 through R3, and R5 learns about it from R4 using IGRP. IGRP has a lower administrative distance than RIP (100 versus 120); therefore, the IGRP route is what is used in the routing table. Now there is a potential routing loop. Even if split horizon, or any other feature meant to help prevent routing loops comes into play, there is still a convergence problem.
If R2 and R5 are also redistributing IGRP into RIP (otherwise known as mutual redistribution) and the network, 192.168.1.0, is not directly connected to R1 (R1 is learning from another router upstream from it), then there is a potential problem that R1 will learn the network from R2 or R5 with a better metric than from the original source.Then Avoiding these types of problems is really quite simple—never announce the information originally received from routing process X back into routing process X .
if you go on router 5 and you do a traceroute for R2 interfaces you will see that instead of going for the best route R1-R2 it will go R4-R3-R2 so to correct this behavior we have some options :
Distribution list should be done on r2 and r5
(config)#access-list 1 deny 192.168.1.0
(config)#access-list 1 permit any
(config)#router ei 100
(config-router)#distribute-list 1 in fa 0/1 for router 2 and fa 0/0 for router 5
Static Route should be done is this example on r5
ip route 192.168.2.0 255.255.255.0 fa 0/1
Route-map will do this one later 🙂