Route Redistribution in RIP

Redistribution is technique using which the boundary routers connecting different routing domains can exchange and advertise routing information. In this article we will learn how to redistribute any routing protocol into RIP. Below syntax is followed. The command has to be configured in router configuration mode.

redistribute protocol [process-id] [match route-type] [metric metric-value] [route-map name]

Description:
  • protocol: For example the protocol you want to redistribute into RIP (i.e. EIGRP, OSPF, or BGP etc)
  • process-id: This field is specifically used while redistributing the protocols EIGRP and OSPF into RIP. The value of this field is AS number in case of EIGRP and process-id in case of OSPF.
  • match/route-type: This is an optional field and specifically used while redistributing OSPF into RIP. Three types of routes exist in OSPF namely Internal (that are internal to an OSPF domain), External type-1, External type 2, or NSSA-External.
  • metric: This field is optional. This field specifies the metric with which the route will be imported in RIP. We must specify a value because default seed metric for RIP is 0 which is considered to be infinity and route is not redistributed. We can also use 'default-metric' router configuration command to specify the reference metric used for redistribution.
  • route-map: This is again an optional field and used when when we have to do any route filtering while redistribution.
R2(config)#router rip
R2(config-router)#redistribute ospf 1 metric 3 match external 1 route-map FILTER

Or 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 rip
R2(config-router)#redistribute ospf 1 match external 1  route-map FILTER
R2(config-router)#default-metric 3

Imp Point: Kindly also note that you have to configure the the route-map 'FILTER'. An empty route-map or wrong route-map configured will not allow redistribution of routes.

Using above topology, let's try a simple redistribution of OSPF into RIP.

R2(config)#router rip
R2(config-router)#redistribute ospf 1 metric 3

Taking a reference to above topology, while we redistribute OSPF into RIP on R2, we use 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#sh 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

Imp Point: Kindly also note that there is an exception while we redistribute a static/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


We have not put any metric command while redistributing the static route, neither we have 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.100
Routing 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 and connected links) will be redistributed with metric 1 .

R2(config)#router rip
R2(config-router)#redistribute connected


Let's check the route of R2's Lo0 prefix 10.10.0.2/32 on R3

R3#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


If you understood the concept and like this article, kindly share the same with your friends.