Route Redistribution in RIP
R2(config)#router rip
R2(config-router)#redistribute ospf 1 metric 3 match external 1
Again to remind, it is mandatory to give metric while redistributing into RIP.
If you don’t want to specify metric specifically while redistributing OSPF but a general reference value for all protocols, we can explicitly use ‘default-metric’ router configuration command to specify the metric.
R2(config)#router ripR2(config-router)#redistribute ospf 1 match external 1
R2(config-router)#default-metric 3
Another way to specify the metric is using the route map. This method is explained in route-filtering section later in this blog (step2).
While we redistribute OSPF into RIP on R2, we have used the metric value of 3. When R3 receives the redistributed routes (for example R1’s Lo0 10.10.0.1/32), it will not add an extra hop to the metric as a general behavior of a router running RIP (Metric/hop count gets increased with 1 while the update of a prefix is received on inbound interface). Kindly see the output below:
R3#show ip route 10.10.0.1 Routing entry for 10.10.0.1/32
Known via “rip”, distance 120, metric 3
Redistributing via rip Last update from 10.10.23.2 on FastEthernet1/0, 00:00:23 ago Routing Descriptor Blocks: * 10.10.23.2, from 10.10.23.2, 00:00:23 ago, via FastEthernet1/0 Route metric is 3, traffic share count is 1
While we redistribute a static or a default route (using redistribute static) or a connected route (redistribute connected) in RIP the default seed metric is 1 and not infinity. For example we have created a new loopback on R1 (10.10.1.100/32) and instead of advertising it in OSPF, we have put a static route on R2 towards R1. Below is the config on R2.
R2(config)#ip route 10.10.0.100 255.255.255.255 10.10.12.1
R2#sh run | section router rip
router rip version 2
redistribute static
redistribute ospf 1 metric 3 network 10.0.0.0 no auto-summary
Kindly note that we have not put any metric command while redistributing the static route and we have also not put the default-metric command explicitly under RIP process. Below is the output of prefix 10.10.0.100/32 learned with metric 1.
R3#show ip route 10.10.0.100Routing entry for 10.10.0.100/32
Known via “rip”, distance 120, metric 1
Redistributing via rip Last update from 10.10.23.2 on FastEthernet1/0, 00:00:03 ago Routing Descriptor Blocks: * 10.10.23.2, from 10.10.23.2, 00:00:03 ago, via FastEthernet1/0 Route metric is 1, traffic share count is 1
While we redistribute connected routes (using ‘redistribute connected’ command) in RIP on R2, the routes (for example, R2’s loopback – 10.10.0.2/32, which is advertised in OSPF and connected links) will be redistributed with metric 1.
R2(config)#router rip
R2(config-router)#redistribute connectedR3#show ip route 10.10.0.2 Routing entry for 10.10.0.2/32
Known via “rip”, distance 120, metric 1
Redistributing via rip Last update from 10.10.23.2 on FastEthernet1/0, 00:00:14 ago Routing Descriptor Blocks: * 10.10.23.2, from 10.10.23.2, 00:00:14 ago, via FastEthernet1/0 Route metric is 1, traffic share count is 1
Route Filtering with Route Redistribution in RIP
RIP also supports route filtering using ACLs, prefix-lists and route-maps. Let us now take 2 Loopbacks IP on R1 using the same topology shared above. Lo0 – 10.10.0.1/32 and Lo1 – 172.10.0.1/32. Let us filter the Lo0 and allow Lo1 while redistribution of OSPF routes into RIP on router R2 .
Step1: Mark the traffic using an ACL or Prefix-list.
ip access-list standard CLASSIFY1
permit 10.10.0.1
Step2: Create a route-map.
route-map FILTER deny 10match ip address CLASSIFY route-map FILTER permit 20
set metric 10000 100 255 1 1500
Step3: Apply the route-map in EIGRP for filtering.
R2(config)#router eigrp 10
redistribute ospf 1 route-map FILTER
Using above route-filtering configuration we wan see that prefix 10.10.0.1/32 will be blocked during redistribution of OSPF routes into RIP and prefix 172.10.0.1/32 will be allowed with the metric set in rule 20 of the route-map FILTER. Below is output from router R3.
R3#show ip route RIP 10.0.0.0/8 is variably subnetted, 7 subnets, 2 masksR 10.10.0.2/32 [120/1] via 10.10.23.2, 00:00:24, FastEthernet1/0R 10.10.12.0/24 [120/1] via 10.10.23.2, 00:00:24, FastEthernet1/0 172.10.0.0/32 is subnetted, 1 subnets
R 172.10.0.1 [120/5] via 10.10.23.2, 00:00:24, FastEthernet1/0
Imp Point: Kindly also note that you have to configure the the route-map ‘FILTER’. An empty route-map or wrong route-map name configured will not allow redistribution of routes.
Click Here for other useful Route-Redistribution articles
I hope you have found this article informative and useful and now have a fair understanding of Route Redistribution in RIP, ways to set metric the metric while redistribution in RIP and finally how to filter the routes during redistribution. For any of the related queries or feedback, kindly write to us at [email protected].
