Answer: Router Adding Routes when VLSM Subnets Overlap

certskills
By certskills April 18, 2014 09:05

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 100, 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
certskills
By certskills April 18, 2014 09:05
Write a comment

3 Comments

  1. sharadvas March 25, 15:03

    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

    Reply to this comment
  2. Wendell Odom of Certskills Author March 28, 08:23

    Hi Sharad,
    There’s no follow-up video. The videos turned out to be a time sink, so for now, most of my posts have been text.

    However, I think I see part of the misconception you are having. AD impacts what the router chooses to put in its routing table, but it does not change the contents of the route. So, here’s the sequence:

    Router learns routes from many sources
    Router happens to learn >1 route for the exact prefix/mask combo, from >1 routing source (eg, RIP and EIGRP)
    Router choose the better route based on AD (in this case, by default, EIGRP)
    Router adds the better AD route to the routing table
    Router completely ignores AD when choosing which route in the routing table matches a particular packet destination IP address

    In short, AD impacts what the router adds to its routing table, which is an independent thought process compared to the routing (aka packet forwarding) process. In other words, the AD logic is part of the control plane logic of the router.

    You’re gonna love working on CCNP ROUTE, I can tell! There’s a lot of details like this to get into for that exam.
    Wendell

    Reply to this comment
  3. sharadvas March 28, 09:29

    Thanks for the info…

    Reply to this comment
View comments

Write a comment

Leave a Reply to sharadvas Cancel reply

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories