How to configure Redistribution between OSPF and RIP

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?


Hi Jose,

When you only have one router that is redistributing something into RIP, it really doesn’t matter what hop count you pick. Just make sure that the hop count never exceeds 15 anywhere in your network or you will have reachability issues (16 is unreachable).

When you have two routers doing redistribution, it’s a different story. When R1 sets a hop count of 1 and R2 sets a hop count of 5 or something else, all routers will prefer the redistributed path through R1 since the hop count is lower.

Does that make sense?


hi mr rene
Sathmal June 20, 2014 at 9:24 am #
Can we redistribute OSPF one area in to OSPF different area?
and you said
Nope it’s impossible, you can’t redistribute one process into the same process

process id is local significant within a route, i dont understand you ans, plz can you help me?

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.


thank you mr RENE

mr rene could you help me the concept of prefix list(ge and le)???

Sure, here’s an example:

Do you have a lesson showing redistribution between OSPF and EIGRP?

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


1 Like

Hi ,

Thankyou for tutorial
I just want to ask when we redistribute ospf and rip then why dont at r1 we see ospf neig r3 and at r3 rip neig r1

Hello Apurva

When routing information is redistributed between two different routing protocols such as in Rene’s example, each region where each protocol functions is autonomous. This is because routers in each region only “speak” one language, either OSPF or RIP. The router on the border of the two regions “speaks” both languages and does the translation between the routers.

This means that R1, which understands OSPF, will only create a neighbour relationship with R2. As far as R1 goes, it only “knows” of R2 and nothing else. R3 is non existent.

The same goes for R3, its source of RIP routing information is R2 which speaks its language. It knows nothing of R1.

Now, R1 does LEARN the routes to R3, but it learns them from R2 and not directly from R3. Similarly, R3 does LEARN the routes to R1 but it again learns them from R2.

There is no direct interaction between R1 and R3.

I hope this has been helpful!


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.


Then they go on to say use E2 when you only have a single ASRB


I get the what they say directly if more use this if only a single use this. My question is the following:

an example from the webpage: (config-router)#redistribute eigrp 10 metric-type 1 subnets
It looks like metreic-type 1 is the portion of the command that controls E1 or E2 though E2 is the default so probably is not required to be added manually. I guess I need to stop being lazy at this point and lab it up and see what happens when I use the command to help figure it out and cement it in my brain. I will do that now lol.

Have built my GNS3 topology off theirs now adding the configuration will report back my findings soon as I get there:

So while following their configurations they first had us go into the EIGRP and change the metrics. At first this confused the hex out of me and the reason it confused me was because it was not needed. I don’t know if they are just doing some reminder of EIGRP configuration here or what. I will admit it was helpful because I had to combine EIGRP with OSPF and since I have been studying OSPF I was getting a bit forgetful on the EIGRP as I have not yet brought the two studies together.

So very informative but after identifying what was going on I decided to leave out changing the EIGRP metrics. if you want to comment on this feel free if you think they did this for a different reason than teaching and reminding.



Next I went to their command to redistribute this was very simple and since we do not specify the E1 route it uses the default which is the E2 which always has a metric of 20. See pics below which illustrate

Now something of importance and you see it noted in the picture above is the subnets key-word I had to jump ahead in Renee lessons to understand this to his Redistribution chapter which covers redistribution between OSPF and RIP see link How to configure Redistribution between OSPF and RIP In studying this forum post specifically I am coming across information I had not learned yet is all. Below is my output when I checked my WINNIPEG router which is according to my topology my furthest router in OSPF area 0. You can see sure enough it redistributed those routes as E2 the default with their metric cost of 20.

Next it was finally time to test the command to manually change this and then witness the results:
And as you can see I changed it to E1 and this was sent over to my WINNIPEG Router:

This should help me when I go over Rene lesson on Redistribution as well and reinforce the metric stuff.

That helped a lot Las.

Can you give some basic information on why they are saying in the tips to use E1 if have multiple ASBR and use E2 if you have single? I want to get into their heads to understand their strategy on why and when to use. I am guessing it has to do with this:

E1 routes will have internal area costs added to the seed metric.

its just not clicking into place on the strategy of their choice. :frowning:

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 you want to get to the other side. You can use either E2 or E1, it doesn’t matter.

Scenario 2


Here we have R3 and R4 doing redistribution. If you use E2 here, the metric for the redistributed routes is the same everywhere in the OSPF domain. That means that R1 will use R3 and R4 to get to any redistributed route. It works, but it’s not optimal…R4 is located one hop further away from R1 compared to R3. In this case, it’s better to use E1 since it metric increases throughout the domain.

Hope this helps!

1 Like

OK that definitely helped! For one adding the hop counts and E2 same cost together in visual pic really pulled it together and the logic supporting the facts was: more efficiency getting from start to finish. That was spot on you should refine that and add it to your material it was a really solid explanation that immediately had me understanding. I will also state I got it immediately in bad conditions where my brain is not working well.

Son had me watch a bunch of trailers for a new game Warhammer 2 I really love visual cartoon type anime whatever you want to call it so I got really pumped up lol… So I had to load up old steam game and I played that thing last night till 3:30am in the morning. I have not played games in a very long time just to busy with work and studying but I love strategy from Chess to basically any strategy based PC game. I am not as young as I use to be and I definitely do not stay up into morning hours anymore. Oh boy did I pay the price today with a fog clouded mind working on about 1% of my brain power might as well have been out drinking all night as I felt hung over (something I have also not experienced in a very long time…I know pretty pathetic for old retired gamer lol).

So sorry about tangent but point I am making is thank you for really good explanation that was able to get through the fog and inability to focus or concentrate in like 30-60 seconds. I am impressed lol…

Hi everyone long time no see. I have been recovering from burnout and changed jobs a few times as I work my way up the chain lol… Anyway I am back at it now trying to at the very least review all the CCNP route.

Here I only had a question on what happens when you have EIGRP redistributed into OSPF. “redistribute Eigrp subnets” I ask because OSPF has a default metric of 20 it will use but that would not work with EIGRP would it since EIGRP needs all the K values. Or really it wont need the K values correct? since we are gong from EIGRP to OSPF and OSPF does not use K values it only needs values that OSPF can understand so in that case using default metric of 20 which is the default for E2 anyway would be fine?

I am at work so have not tested on my own equipment but that makes logical sense. I think I understand now.

Hello Brian,

Welcome back, hope you are feeling better…a burnout, that sucks.

When you redistribute between IGPs you can’t convert the metrics since each IGP uses its own metric.

So, when you redistribute into OSPF, you have to set a cost metric. By default, OSPF uses a cost of 20 and the E2 type. If you only have one router doing redistribution then it really doesn’t matter…there is only path to go from OSPF to EIGRP and that’s your single router.

If you have multiple routers doing redistribution then you could play with the metric and optionally change the E2 type to E1 so that other routers prefer one router over another to get from OSPF to EIGRP.

Hope this helps!


Sorry for this question as i’m just starting to study route material and i’m sure it’s stupid:

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

Why for OSPF do we have to define

R2(config-router)#network area 0

versus RIP


is this to do with no auto-summary?

Hello Daniel

The difference has to do with how each routing protocol interprets the network command. Even though the same command is used, it is dealt with differently for each routing protocol.

For OSPF, the ip-address and wildcard-mask arguments together allow you to define one or multiple interfaces to be associated with a specific OSPF area using a single command. OSPF requires both to accept the command.

For RIP, the network statements are not specifically telling RIP what prefix(es) to advertise, they tell RIP which interfaces should participate in RIP, and RIP will get the specific prefix(es) from the interface(s) which fall into the network statement.

The two network commands are simply different and require different syntax.

The no auto-summary command will cause RIP to advertise all of the routes associated with the interfaces themselves rather than creating an aggregated route that includes all interfaces.

You can find more info at the following links:

OSPF Command Reference
RIP Command Reference

I hope this has been helpful!


I’m getting a basic light understanding, a little confusing still. For RIP wouldn’t you want to use a wildcard mask in order to define multiple interfaces?

“For RIP, the network statements are not specifically telling RIP what prefix(es) to advertise, they tell RIP which interfaces should participate in RIP, and RIP will get the specific prefix(es) from the interface(s) which fall into the network statement”

this is confusing me a bit i believe.

Using this example:

R1(config)#router ospf 1
R1(config-router)#network area 0
R1(config-router)#network area 0

So for OSPF even though there are only 2 interfaces on /24, is it wise to still use

Hi Daniel

Let’s say you have a router with the following interfaces:


For RIP, in order to include all of the subnets of these interfaces in the routing exchanges, you would have to issue the following commands (remember that RIP assumes the classful address range):


This would include all of the networks of all of the interfaces, because for the first two /24 is assumed, for the third /16 is assumed, and for the fourth /8 is assumed, all of which encompass all of the networks.

You could even issue the following command for example:


This would be accepted but would actually be translated to the classful network address like so in the configuration:


And remember, auto-summary on the advertising router (by default) simply allows for the grouping of the networks of these interfaces within the same classful network into single entries in the routing tables of the RIP neighbors.

Now OSPF simply allows you to more specifically state which networks you want to participate in the routing exchanges. For the same set of interfaces, you can have the following commands for OSPF:

R1(config-router)#network area 0
R1(config-router)#network area 0
R1(config-router)#network area 0
R1(config-router)#network area 0
R1(config-router)#network area 0
R1(config-router)#network area 0

Each of the above statements corresponds exactly to each of the networks on the interfaces, including the subnet masks. This is an explicit description. However, we could have also done this:

R1(config-router)#network area 0
R1(config-router)#network area 0
R1(config-router)#network area 0

This too includes all networks on all interfaces.

But OSPF, because it is separated into areas, needs the granularity that the specific subnet masks provide in order to more explicitly state which networks (and thus interfaces) should be advertised and to which area.

Now concerning your question:

There is only one interface that corresponds with the network on R1 and that is interface Fa0/0. So if you use a wildcard mask of you are stating exactly that you want this subnet of that interface to participate in OSPF.

I hope this has been helpful!