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

#CCNA study scenarios often focus on the most common and most obvious combinations of events. However, sometimes it helps to think about some more unusual scenarios just for the purpose of exercising our understanding of how these devices think. This next question does exactly that, using an admittedly bad network design to let us focus on how one router would think about the routes it learns. Details of the question below the fold. Enjoy!
For this question, router R1 runs RIP-2, and OSPF, and EIGRP. Admittedly, that’s a bit unusual for both the ICND1 and ICND2 exams, but to discuss how routers choose routes when learning those routes from multiple sources, at least one router has to run multiple routing protocols. The figure shows the subnet IDs/masks on the right, the routing protocols, and metrics.
If you look at the subnets on the right, its pretty obvious that the subnetting design is busted. Routers R2, R3, and R4 all connect to a subnet with subnet ID 10.1.2.0. Note however that each uses a different subnet mask. That, in a word, is bad.
Now to the question to ponder. Assuming all the links in the diagram work, and R1 indeed learns the routes usig RIP-2, OSPF, and EIGRP, what does R1 put in its routing table? In other words, what will the output of R1’s show ip route command look like? (Select a single answer.)
A. It will list route 10.1.2.0/25, but not routes for the other two subnets
B. It will list route 10.1.2.0/26, but not routes for the other two subnets
C. It will list route 10.1.2.0/27, but not routes for the other two subnets
D. It will list routes for 10.1.2.0/25, 10.1.2.0/26, and 10.1.2.0/27
[…] posted a new question in the CCNASkills blog today, related to the one from last week. Basically, what happens when a router learns of three subnets […]
I have used your CCNA certification books for leading study groups and classes and feel they are the best on the market. I find it marvelously fulfilling helping others launch/accelerate their IT careers, having made the journey from CCNA to CCIE myself.
– Joe
Hi Joe,
Thanks for the kind words! And yep, I agree – the chance to help others learn this stuff is a blast. Later…
Wendell
[…] posted a new video at the Certskills Youtube channel. This one’s essentially an answer to yesterday’s question, so don’t watch the video until you’re sure you’re done thinking about the […]
Hello. Don’t know why but on packet tracer the answer will be RIPv2. But why he is using that route ? Administrative distance is a higher than OSPF or EIGRP… And Network bits on mask is just 25, not 26 or even 27!
Even if I disconnect a cable from RIP network, router R1 can’t get updates from OSPF and EIGRP routers
Hi EFX,
Well, I have a couple of guesses. It could be that you don’t have OSPF and EIGRP configured correctly? (No disrespect intended.) I’d say shutdown both the RIP and OSPF link, and work on getting EIGRP alone to work first. (Packet Tracer should do that, right?) Only then add the RIP link, and see what happens.
What did you config on R1 and R4 for EIGRP?
And anytime you ask a question about doing something with a Simulator, a problem can always be the Simulator… Also, because the design is admittedly a bad idea, with the overlapped subnets, maybe Packet Tracer is not prepared to show realistic results in that case.
Thanks,
Wendell
Yes , You are right!
With GNS 3 there was no problem, just copied configs from routers on packet tracer. All three routes is in routing table 🙂
I think that R1 learned EIGRP route becouse it has the lower AD. It is correct?
Carlos,
Well, that’s part of it, but not all. Note that the advertisements are for different subnets. R1 actually learns all three routes, because they are not for the same subnet. If the masks has been the same, they would be the same subnet, and indeed, the AD would have been the determining factor.
Look to the link below, to the April 27 2011 post, and you’ll see a video on it.
Wendell
I think it would just be the EIGRP route based on the lowest AD but after reading some of your responses I’m not sure now lol. It now seems it would add all 3 but how would the router know where to send say… a packet destined to 10.1.2.1 when all 3 subnets overlap with that IP?
Either way I don’t see the link to the answer for this question. Are you able to point me in the right direction?
GJM,
There was an issue or two with the post naming, which I fixed. So, the answer post is now linked at the bottom of this question post, just above the comments section. It was linked there before, just with a different title.
But yeah, this one’s a setup to make you stop and think. It’s easy to instantly choose based on admin distance, but it requires more analysis. I’ll leave you with the answers post for some more reading.