Answer to the “Which Route…” question

certskills
By certskills April 2, 2015 08:05

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
certskills
By certskills April 2, 2015 08:05
Write a comment

2 Comments

  1. jemarin June 19, 14:54

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

    Reply to this comment
    • CCENTSkills June 20, 08:59

      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

      Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

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