How to configure Redistribution between OSPF and RIP

Hi Rene,

I am confused with the following redistribution command: metric-type 1 when redistribute between eigrp into ospf.

R3(config)#router ospf 1
R3(config-router)#redistribute eigrp 100 metric-type 1 subnets

Hi Rene,

Thank you for this lesson.

what exactly is the use of the ‘default-metric’ command? While redistributing routes can i use any metric in the command?
Example:

John(config-router)#redistribute ospf 1 metric

Hi Abhishek,

If you redistribute into EIGRP or RIP then the default metric is set to “infinity”. You can use the default-metric command to set a default metric globally or configure it each time when you use the “redistribute” command.

Rene

Hi Achilleas,

OSPF has two types of external prefixes…E1 and E2.

The cost of E2 remains the same within all OSPF areas (default cost 20) while the cost of E1 increases, just like any other prefix.

This command is required to choose if you want E1 or E2.

Rene

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?

Thanks

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?

Rene

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.

Rene

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

Rene

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!

Laz

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.

Capture

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

Capture

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:
Capture

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.

Capture

Capture

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
Capture

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

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

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

single-point-redistribution

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

dual-point-redistribution

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!

Rene