cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3650
Views
5
Helpful
10
Replies

redistribution and administrative distance

willowklan1
Level 1
Level 1

Hi everyone,

I`m studying for my ccna and have a real trouble in understanding the route redistribution conflict issue. I can`t seem to get the hang of it! can someone please explain this issue in simple words? 

here is what I don`t get: as I managed to understand, a router can learn about the same route from two different protocols, and needs to decide which one would implemented in his routing table.

the way I see it is (attached photo) - R1 runs eigrp and R2 runs ospf. R2 had a loopback address of 10.0.0.1. R1 learns that route through eigrp since it has a lower administrative distance, but if I want it to learn this route from ospf then I got to change the values with the distance command, and R1 will learn this loopback address from ospf. 

my question is: so what? why should I have to care if this route was learned through ospf or through eigrp? as long as it`s in my routing table - why does it make a difference? can anyone give me a simple example where it DOES matter? this loopback network is anyhow on a different AS, so why should I care who specifically teaches my router this route? an example would be most appreciated...

thanks.

1 Accepted Solution

Accepted Solutions

I give you two examples which AD comes handy in the first and not handy in the second.

A little clarification.

OSPF AD is 110.

EIGRP AD is 90.

EIGRP external route AD is 170.

Please follow my picture attached.

Example First:

1- 192.168.1.0/24 is connect to R1. AD is 0.

2- R2 learns 192.168.1.0 from R1. AD for that route is 90 in R2

3 -AD is 90 in R3 for that network. R3 redistributes that route into OSPF.

4- AD for that network is 110 in R4.

5- Since R2 AD for that network is 90, it is preferred and network coming from OSPF with higher AD will not sit inside the routing table. That is good.

Example 2:

1: R1 has learned 192.168.1.0 from another AS, so AD is 170 for that route.(192.168.1.0 for example is coming from BGP into R1)

2- R2 AD for that route is 170.

3-R3 AD is 170. R3 redistributes that route into OSPF

4-R4 AD is 110 for that route.

5-R2 current AD for that route is 170 and it receives route from ospf with lower AD. It replaces its route with the route advertised by R4 ospf. That is BAD.

6-R2 advertises that route to R1 and R3 and R1 and R3 replace the previous route. Disaster.

I hope I understood your question and could answer.

Masoud

View solution in original post

10 Replies 10

Richard Burts
Hall of Fame
Hall of Fame

Let me try to clarify a few things and hope that it will help your understanding. First you describe R1 running EIGRP and R2 running OSPF. But that will not work. If each router is running a single protocol and the protocols are different (OSPF vs EIGRP) then the routers will not become neighbors in either protocol and will not learn any routes from the other router. So at least one of the router must be running both protocols.

If these two routers were the entire network then your point would be valid that administrative distance would not matter. As long as the route is in the routing table then things work. But what if the network is larger and more complex? It might make a difference which protocol placed the route into the routing table. Perhaps there are certain features in a routing protocol that you want to use. So you might want to make sure that some route was learned via that protocol so that this feature would apply to that route.

I hope that this is helpful.

Rick

HTH

Rick

Hi Richard, thanks for your answer.

I`m sorry I forgot to mention that, but ofcourse R1 would have to run ospf and R2 would have to run eigrp, that is the whole point of mutual distribution. clearly I didn`t illustrate myself clear enough. but my question still remains the same: there is no possible way I can figure a scenario that a router from, let`s say, the eigrp network would have to choose between a path learned from his eigrp vs. a path learned from ospf. it`s not possible, R1 would not learn from R2 any routes it already has... 

the only case I can see that scenario happening is when you run 3 routing protocols. say rip learns from ospf, distribute to eigrp, and eigrp distributes back to ospf. yes, in this case a route from rip can be learned by the same router both by rip and again by ospf (who learned in from eigrp). this can never be the case when two routers are exchanging routes.

can you please give me an example where a network is learned twice when using bi-directional redistribution? 

Hello,

You only have two routers in your example. In realty, there are much more routers in each AS.

Suppose this example.

EIGRP-R3,EIGRP-R2,EIGRP-R1,------EIGRP and OSPF--OSPF-R1,OSPF-R2,OSPF-R3

EIGRP routers belongs to company1 and OSPF routers belong to compony2. Router in the middle is in charge of doing mutual redistribution. Without mutual redistribution, how EIGRP-R3 learns OSPF R3 networks and vice versa? So there must be a router in the middle to redistribute routes between different AS.

Hope it helps,

Masoud

Dear willowklan1,

In your case there is no difference  . but Consider when your network is large and some issues like convergence time and the size of your routing table and the power of your cpu  will be a big issue .so forget the use of any protocol in a simple network . it is better not to run any routing protocol.as your self mentioned no difference in learning routes via EIGRP or OSPF 

let me give you an example ; in a network with more than 100 routers if a change is made in one part this network then 100 routers will run DUAL algorithm in case of EIGRP but in OSPF we have different areas so it is not necessary to run SPF algorithm in all routers . also EIGRP is Cisco Proprietary so you can not run it on the other vendors. EIGRP is a rapid protocol and more simple than OSPF in design . there are lots of pros and cons when you want to design your network based on your routing protocol selection.

I hope it was informative for your

Hossein

Hi guys,

again, I think perhaps you understood my question wrong. I KNOW there is a different AS and a router between them running both protocols, I KNOW the network would be larger than two routers and I know the metric systems of each one is different. but that is not what I wanted to know.

my question regards the situation when the administrative distance table would have to come into play. that is a scenario when a router learns a route via BOTH protocols, say it`s in EIGRP so the router learns the route from EIGRP and than again it learns it from OSPF as well. in this case it would choose to follow the EIGRP route because of the administrative distance values (110:90).

so my question was: how could any router learn about his routes from a different protocol ? in other words: can you give me a case where the administrative distance would come in handy?  (in the topic of redistribution, ofcourse).

the way I see it. the ONLY time that can happen is when you got three routing protocols, #2 learns it from #1 and teaches #3, than #2 redistribute it back to #1. than there is a possibility a route would be learned twice.

the only other case this could happen is when 2 routers simultaneously redistribute routes with another AS. so #1 teaches the AS who teaches it back to #2, but this scenario is solved by a different Router ID, not via administrative distance.

can you tell me if a route can be learned from one protocol to another in any other case? like when I got 1000 EIGRP routers and 1000 OSPF routers and a router between including both - is there a possibility the same route can be learned and taught by one of them? I think not, but I`m not sure. hope this time it`s clearer... :)

thanks 

I give you two examples which AD comes handy in the first and not handy in the second.

A little clarification.

OSPF AD is 110.

EIGRP AD is 90.

EIGRP external route AD is 170.

Please follow my picture attached.

Example First:

1- 192.168.1.0/24 is connect to R1. AD is 0.

2- R2 learns 192.168.1.0 from R1. AD for that route is 90 in R2

3 -AD is 90 in R3 for that network. R3 redistributes that route into OSPF.

4- AD for that network is 110 in R4.

5- Since R2 AD for that network is 90, it is preferred and network coming from OSPF with higher AD will not sit inside the routing table. That is good.

Example 2:

1: R1 has learned 192.168.1.0 from another AS, so AD is 170 for that route.(192.168.1.0 for example is coming from BGP into R1)

2- R2 AD for that route is 170.

3-R3 AD is 170. R3 redistributes that route into OSPF

4-R4 AD is 110 for that route.

5-R2 current AD for that route is 170 and it receives route from ospf with lower AD. It replaces its route with the route advertised by R4 ospf. That is BAD.

6-R2 advertises that route to R1 and R3 and R1 and R3 replace the previous route. Disaster.

I hope I understood your question and could answer.

Masoud

Hello Masoud,

so if I get it right, the scenario happens when there is a loop: a router (like r2) who advertises the network in one protocol and gets it back through a different interface from another protocol. yes, that was exactly what I asked. if R4 never would have been connected to R2 all this would not have happened, if I understand it correctly. as usual, you have been a great source of help. thanks alot for your patience! 

Yes, that is correct. My design was a bad design which caused that problem in my example.

Even if your topology is good, some other cases may happen.

Your private IP addresses may be overridden by other AS private IP addresses. Both may use the same private IP addresses.

Other case is misconfiguration of IP addresses.

You might receive internet route by redistribution, which override your IBGP routes.

and so on

When you receive some routes from other AS, you need to use filter to avoid these kinds of problems because other AS is under different management system.

You are able to filter routers by route-map when you redistribute. You may accept only certain routes or exclude your own routes.

Masoud

Hi Masoud

Really good example (+5) but just wanted to clarify one thing.

It would indeed create a routing loop because R2 will point to R4 for that subnet as you say.

But I'm not sure about step 6 ie. R2 would not advertise that route it learnt from R4 to either R1 or R3 because the route learnt was OSPF and R2 is using EIGRP between R1 and R3 and you are not redistributing on R2.

Have I misunderstood (quite likely !).

Jon

Hello Jon,

Thanks for the rating. I missed one thing in my picture. There is OSPF to EIGRP redistribution on R2 as OP asked in his picture. The question was redistribution in both protocol. I tried to come up with an example to be similar to OP's question and I confessed that my design was disaster . I hope I did not miss anything else.

Masoud