Answer: Choosing the Best Route, Same Subnet ID, Different Mask

 In 200-301 V1 Appendices, Q&A

What happens when a router happens to learn three separate routes for the same subnet ID – but with different masks, and with different routing protocols? What should you be thinking about when predicting how a router acts? These questions are the key to understanding the multi-choice question posed in the previous post. Today’s post walks through the answer to the question and the reasons.

Answer

D

Disclaimer

First, for emphasis, the design used for this question is poor and not recommended. I just used it as a way to make one router receive routing updates for three subnets that have the same subnet ID but different masks, as learned with three different routing protocols, just as an exercise. Don’t use a similar design in a real network! The goal of the question is to let us focus on how a router thinks about adding routes to its IP routing table.

Background

CCNA discussed two related concepts to a fairly deep level.

First, when using one routing protocol only, when one router learns multiple routes for the same subnet, the routing protocol chooses the best route based on the metric. Simple enough.

Second, CCNA does discusses how a router chooses between two routes to the same subnet when learning those routes using different routing protocols. Routers use the administrative distance (AD) of the routing protocol. For example, by default, EIGRP’s AD is set to 90, OSPF’s is set to 110, and RIP’s is set to 120, with lowest being best. A router learning routes for the same subnet with all three routing protocols would ignore the metrics, use the AD, and choose the EIGRP route.

However, none of the above rules apply to this question, because the subnets are different subnets. not only are the real subnets in three different locations in the design, they each have different masks, so they are similar subnets, overlapping subnets, but not the same subnet.

The Core Reasons for Choosing Answer D

A subnet is defined (identified) by the subnet ID and the mask. In the scenario shown for this question, R1 learns about three different subnets. They all happen to have the same subnet ID, but they all have different mask. R1 thinks like this:

  • I learned only one route to the subnet defined as 10.1.2.0/25, with RIP-2. I learned of only one route to 10.1.2.0/25, so there is no competition from within RIP-2 or from another routing information source. Put that one route in the routing table.
  • I learned a route to subnet 10.1.2.0/26 with OSPF. I learned of only one route to 10.1.2.0/26, so there is no competition from within OSPF or from another routing information source. Put that one route in the routing table.
  • I learned a route to subnet 10.1.2.0/27 with EIGRP. I learned of only one route to 10.1.2.0/27, so there is no competition from within EIGRP or from another routing information source. Put that one route in the routing table.

As a result, R1 adds a route for all three subnets to the routing table, making answer D correct.

 

 

 

Question: Choosing the Best Route, Same Subnet ID, Different Mask
Question: Overlapping Connected and Routing Protocol Routes
Subscribe
Notify of
guest

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
sharadvas

Hi Wendell,

Is follow-up of this video available, where-in you have explained about what happens when router has to make routing decision.
My thinking is that router wlll use longest prefix match logic for the dest addr, but will it also uses AD in deciding next hop, is my doubt.
If yes, what will happen if same routes are learned by protocols but with diff masks (i mean eigrp route with/25, rip with /27) etc.
Looking forward to know more.

Thanks

sharadvas

Thanks for the info…

Morgan

I understand how and why all 3 routes get added to the routing table, but, my question is, would the same explanation hold true if all three were learned from the same routing protocol, for instance OSPF. My understanding makes me want to say yes?

Raed

Hello
My question at logic of making routing decision (after added 3 routes to same subnet with diffrenet prefix length) ignoring routing sources, in this scenario above ,router will always choose (match) 10.1.2.0/27 route considered it has a longest prefix mask length ,so am I true?
And If I am true so Why the router added 2 not useful routes? Considered it never use them?

thanks

Tewa

Hello Wendell,

Which is correct? As per CCNA study guide Admin distance for OSPF ois 110 but here you stated”OSPF’s is set to 100″. Could this be a typo?

Wendell Odom

Hi Tewa,
It was a typo or just a mistake. Regardless… I changed it to 110, which is the correct default admin distance. Thanks for the assist!

7
0
Would love your thoughts, please comment.x
()
x