Useful Articles

25/recent/ticker-posts

Route Redistribution in RIP

Route Redistribution in RIP

Route Redistribution in RIP: Redistribution is a 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 for Route Redistribution in RIP.
 

Route Redistribution in RIP - Syntax


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 the 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 the 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 we have to do any route filtering while redistribution.


Redistribute OSPF into RIP

Redistribute OSPF into RIP
 
Let us understand route redistribution of OSPF into RIP with above lab simulation. Using the above lab, we will redistribute OSPF prefix 10.10.0.1/32 which is Lo0 IP of router R1 into 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 rip
R2(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

 

Redistribute Static route into RIP

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.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 - 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 connected

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


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 10
match 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 masks
R        10.10.0.2/32 [120/1] via 10.10.23.2, 00:00:24, FastEthernet1/0
R        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.


 

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 networkurge@gmail.com. 

Post a Comment

0 Comments