Answer to the “Which Route…” question

 In 200-301 V1 BBB Not in new books, CCENT-OLD, Q&A

Last post I posed a question related to how a router chooses among multiple routes to reach the same subnet, when the routes were learned from different sources. The literal answer is lited below the fold. I’ll post a related question by tomorrow!

Router R1 will use the route learned from R4 based on the administrative distance. When a router learns multiple routes to the same subnet, but with a single routing protocol, that router bases its choice on the metric associated with each route. For example, if EIGRP had been used on all four routers, R1 would have learned 3 routes to subnet 10.1.2.0/24. R1 would have used the route with the lowest metric.

When a router learns routes for the exact same subnet, but through different means (eg, RIP and OSPF and EIGRP), then the metrics cannot be meaningfully compared. In this case, the RIP metric was only 1, the OSF metric 65, and the EIGRP metric into the millions. Because each routing protocol calculates its metric based on different information, there is no context in which you can compare the numbers to figure out which is best.

Cisco routers base their choice of best route on the administrative distance setting in such cases. It’s essentially a “believability” measurement: which routing protocol is more believable? Which does the router trust more than the other? (Unsurprisingly, the defaults make the Cisco proprietary EIGRP the lowest/best.)

The administrative distance values for these protocols are:

  • EIGRP: 90
  • OSPF: 110
  • RIP: 120

As a result, when R1 learned all three routes, even though EIGRP’s metric was the largest value, R1 would choose the EIGRP route through R4 as the best route, based on administrative distance.

The second part of the question asked what would happen if an engineer then configured a static route on R1, pointing to “some other router”. That is, since we know that R1 chose the EIGRP route through R4, what happens if R1 configures a static route for 10.1.2.0/24 that points to R2 as the next-hop route? Router IOS defaults to assign static routes an administrative distance of 1, making it better than any of the IP routing protocols. In that case, R1 would indeed replace the route pointing towards R4 with the static route that forwards packets to R2.

Choosing Between Three Routes to Same Subnet
Switch Forwarding and What Happens Next
Subscribe
Notify of
guest

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
jemarin

Hi wendell its posible change the administrative distance values to the protocols?

lyjo

Hi Jemarin,
Short answer is… long! Yes, you can change each routing protocol’s default AD. Additionally, you can apply matching logic to change each router’s view of the AD for one or more routes. That’s a feature that may be of help when redistributing routes between routing protocols, and is a topic of some importance in the CCNP ROUTE and TSHOOT exams (as well as CCIE R/S).
Wendell

Aaron Tremblay

Hi Wendell,
Is there a particular reason R2 was selected as the static route router vs R3?

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