cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1982
Views
5
Helpful
25
Replies

Routing table routes with different administrative distance

irealwaseemrana
Level 1
Level 1

When a router receives two routes from the same routing protocol to the same destination network, it uses the Metric to decide which one to add to the routing table, so if Metric was different it will add only one of them (The one with the lowest Metric) and if both have the same Metric then it will load balance between them .

Now if the router receives two routes from two different routing protocols (Example: RIP and OSPF) for the same destination network, does the router adds both of them to the routing table (adds the second as backup route maybe and uses the route with lowest AD to route packets) or will only add the one with the lowest Administrative Distance to the routing table ?

Regards

25 Replies 25


@Giuseppe Larosa wrote:

Hello @Joseph W. Doherty ,

thanks for correction.

We learn something new everyday here in Cisco forums

Hope to help

Giuseppe


Your welcome!  Yes, I too didn't "get" @Elliot Dierksen's Ghostbusters' quotation.  I didn't get it until he mentioned the specific movie and I then noticed "streams".

BTW, the above is in jest.  I'm pretty certain you're referencing the "correction" to your suggestion about possibly a routing protocol's internal metric might be a tie breaker.  (Which, incidentally, I thought plausible.)

Personally, I cannot say I've actually learned something new every day from these forums, but I will say, I've learned a huge amount from these forums, this thread being a case in point.

alisha_rascon01
Level 1
Level 1

When a router receives two routes to the same destination network from two different routing protocols, it uses the Administrative Distance (AD) to determine which route to add to the routing table. The route with the lowest Administrative Distance will be added to the routing table, and the other route will not be added.

Administrative Distance is a value assigned to each routing protocol that indicates the trustworthiness or reliability of routes from that protocol. The router uses Administrative Distance to prioritize routes from different sources. Generally, a lower Administrative Distance value indicates a more reliable source.

In this scenario:

- If the route from one routing protocol has a lower Administrative Distance than the other, the router will add the route with the lower Administrative Distance to the routing table.

- If the routes from both routing protocols have the same Administrative Distance, the router might choose to use both routes for load balancing or redundancy, but this depends on the router's configuration. Some routers can be configured to use both routes, while others might choose only one route based on additional metrics (like the Metric you mentioned) or other factors.

Remember that the behavior of routers can vary based on their configuration and the specific routing protocols being used. However, the fundamental principle is that the route with the lowest Administrative Distance will be preferred and added to the routing table, and other routes might be considered for backup or load balancing based on additional criteria.

I may be splitting hairs, but there are a couple things to remember for clarification. There is a difference between the active routing table (router's operational routing paths from all sources), and the information for each routing protocol. Longest match is the first criteria for what gets installed in the routing table. If there is a tie in longest match, admin distance is the next tie breaker. If there is a tie in admin distance, then the routing protocol metric applies. Multi-path is a separate item.

"If there is a tie in admin distance, then the routing protocol metric applies."

That appears to be incorrect for Cisco devices, according to the Cisco document referenced (which I have not read) in the Wiki reference I provided, and from @Martin L's replies.

Might you have contrary Cisco documentation or have done a lab to confirm this?

I ask because @Giuseppe Larosa, I believe, wrote the same, and I also consider him very knowledgeable too.

Personally, after Giuseppe's reply I was thinking of labbing this in CML, but if that Wiki article correctly described the Cisco documentation information, I no longer saw the need to lab this up.

"Multi-path is a separate item."

Indeed, although also from that Wiki article, multi path might not be "safe" for multi sourced same prefixes with same metric due to the possibility of creating loops.  That seemed reasonable when you consider classical mutual redistribution issues, or how easily you can create loops with static routing.

Oh, and if same prefixes from different route sources with same AD do have same metric, what's the tie breaker?


@Joseph W. Doherty wrote:

Oh, and if same prefixes from different route sources with same AD do have same metric, what's the tie breaker?


I think I stated that (If there is a tie in admin distance, then the routing protocol metric applies) poorly. I was operating on the assumption that you would not have multiple routing protocols with the same AD. What I should have said is if you have multiple routes from the same routing protocol (implying same AD), the most preferred metric wins. Tied metric would involve the routing protocol methods for ECMP.

Yup, you got it!

I believe a variation of the OP's original question (that I started) has been, if you have, for example, the same prefix from OSPF and EIGRP, but both are using the same AD, what happens?

It appears, on a Cisco device, Cisco will tie break using its default protocol AD order and only insert routes from one routing source.

Not discussed, but supposed there were two OSPF and two EIGRP routes, and within each those protocols had equal metrics (or perhaps unequal but within variance for EIGRP), all, again, same AD values, I suspect the router would drop the worse (by its default's value AD) protocol's routes, and then use whatever multi-route rules would normally apply for the winning routing protocol's routes.

Again, in "real" networks, unlikely anyone will bump into this situation and the need to know which routes will be installed in the route table.  For a CCIE level test question, this is possibly a good question, it means you even know of some very unlikely situational outcomes for making routing table prefix insertions.

BTW, I got involved in OP's question, because I didn't know, or even recall every reading about tied (inverse of OP's "would not have multiple routing protocols with the same AD") ADs, and wondered.  Laugh - of course, as I'm not a CCIE (or hold any Cisco certifications), I wasn't embarrassed I didn't know, but again, I thought what happens?

Thank you all - I, at least, learned something new.

@irealwaseemrana were your questions answered?


@Joseph W. Doherty wrote:

if you have, for example, the same prefix from OSPF and EIGRP, but both are using the same AD, what happens?

In my book, the above would fall into the "Don't cross the streams" category.


@Elliot Dierksen wrote:

In my book, the above would fall into the "Don't cross the streams" category.


Laugh.

Yes, if you're facing crossing such a stream, you might find the "truth" in "still waters run deep", unexpectedly.  Also why, some streams have "marked" "safe fording" locations.  ; )

Actually I was going for a Ghostbusters thing there. I think some of my favorite pop culture references are becoming dated... 

"Actually I was going for a Ghostbusters thing there. I think some of my favorite pop culture references are becoming dated... "

Laugh - possibly, but some of mine are even more dated.

What I missed was you were using the plural of steam.  I do recall that from the original movie, because "who you gonna call?", and at least we're not faced with dealing with Stay Puft Marshmallow Man; that would be bad, real bad.  ; )

Review Cisco Networking for a $25 gift card