How to configure Redistribution between OSPF and RIP

In a previous lesson I explained the basics of Redistribution. Now it’s time to actually configure some redistribution. In this lesson we’ll cover redistribution between OSPF and RIP. This is the topology that we will use:

OSPF RIP Redistribution R1 R2 R3

Let’s start with the redistribution between OSPF and RIP.

First let me show you the router configurations:

R1(config)#router ospf 1
R1(config-router)#network area 0
R1(config-router)#network area 0
R2(config)#router ospf 1
R2(config-router)#network area 0
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary 
R3(config)#router rip
R3(config-router)#version 2

Nothing special here, just OSPF and RIP advertising their networks.

R1#show ip route      

Gateway of last resort is not set

C is directly connected, FastEthernet0/0 is subnetted, 1 subnets
C is directly connected, Loopback0
R2#show ip route 

Gateway of last resort is not set

C is directly connected, FastEthernet0/0 is subnetted, 1 subnets
O [110/2] via, 00:11:05, FastEthernet0/0 is subnetted, 1 subnets
R [120/1] via, 00:00:20, FastEthernet1/0
C is directly connected, FastEthernet1/0
R3#show ip route 

Gateway of last resort is not set is subnetted, 1 subnets
C is directly connected, Loopback0
C is directly connected, FastEthernet0/0

You can see router R2 has learned RIP and OSPF information. Time for some redistribution action!

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 651 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

567 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. Hi Rene,

    I a have doubts about the command line redistribute ospf 1 metric 5, specific on the hop counts. I see you set the number to 5, why shouldn’t I put 2,3 or maybe 7,8 etc.?? Is there a rule in which indicate what number should go there? I have seen in a few textbooks and videos that instructors put “random” numbers there without explaining the implication of using a very high number or low.

    Can you please advice?


  2. Hi Emanuel,

    Redistribution is used between different routing protocols, for example EIGRP - OSPF or RIP - OSPF. When you run multi-area OSPF, you don’t need redistribution since areas already share certain LSAs.


  3. Hi Jason,

    The commands are similar.Here’s an example how you could redistribute both ways between OSPF and EIGRP:

    R1(config)#router ospf 1
    R1(config-router)#redistribute eigrp 1 subnets
    R1(config)#router eigrp 1
    R1(config-router)#redistribute ospf 1 metric 1 1 1 1 1


  4. Hi Laz,

    I need little more help in understanding. in the link you provide it says the following about E1 saying use this when you use multiple ASBR.

    NOTE: If the metric-type argument is not used, routes will be advertised by default in OSPF as E2 routes. E2 routes have a default fixed cost of 20 associated with them, but this value can be changed with the metric keyword. The metric will not change as the route is propagated throughout the OSPF area. E1 routes will have internal area costs added to the seed metric.


    ... Continue reading in our forum

  5. Hi @wilder7bc,

    If you redistribute something into OSPF, the E2 route will have a fixed metric, the E1 route will have a metric that increases throughout the network, it’s the same as with normal OSPF routes.

    So why do they use E2 vs E1? Let’s look at some examples. Let’s say the red box is OSPF and blue is some other routing protocol.

    Scenario 1


    There is only one router doing redistribution so it doesn’t matter what the metric is…you can only go through R1 if

    ... Continue reading in our forum

17 more replies! Ask a question or join the discussion by visiting our Community Forum