Routing question that has me perplexed

veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
I've looked through my Odom and Lammle books and I can't seem to find an answer to this question. I was doing a practice exam through Boson and when it came my eye brows raised in surprise. Unfortunately I didn't take a screen shot so I tried to reproduce the topology in GNS3:




The question asked me whether or not C2 to would route it's Packets through R4 or R5 to reach C1. At first I thought, oh this will be easy. I can simply look for differences like 100MBps vs. Gig, etc. Nope, everything was practically identical. I believe the correct answer was the router with the longest IP address that is the same to the destination host. I went, huh? How did I miss this in my studies?

Can someone help me figure out how I answer a question like this if it comes up in the future, and if maybe I'm just confused by the answer?

Comments

  • spd3432spd3432 Member Posts: 224
    No config information provided (addresses and masks)? Same routing protocols in use between R3<->R4 and R3<->R5? If so, I think (it's been a while mind you) it comes down to the longest matching set of network bits (x.x.x.x/16 vs x.x.x.x/24) becoming the default route.
    ----CCNP goal----
    Route [ ] Studying
    Switch [ ] Next
    Tshoot [ ] Eventually
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Longest IP address isn't going to have anything to do with where the traffic routes. All IPs are 32 bits long anyway. :D
    An expert is a man who has made all the mistakes which can be made.
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Longest IP address isn't going to have anything to do with where the traffic routes. All IPs are 32 bits long anyway. :D

    LOL, yeah, I didn't mean what I said. I just couldn't think of a better way say it, and my mind was a little hazy on how it was phrased...
    No config information provided (addresses and masks)? Same routing protocols in use between R3<->R4 and R3<->R5? If so, I think (it's been a while mind you) it comes down to the longest matching set of network bits (x.x.x.x/16 vs x.x.x.x/24) becoming the default route.

    If you are right, and I have no reason to doubt that you are, this was what I encountered with the question. I'm still kicking myself for not having taken a screenshot of the questions.
  • prtechprtech Member Posts: 163
    It's probably referring to the longest prefix match.

    If you have two routes to a destination, the router will choose the more specific route.

    Let's say you want to reach 192.168.1.0/24.

    Your routing table consists of two routes to get there:

    192.168.0.0/16 via R4
    192.168.1.0/24 via R5

    Your router will choose the route via R5 even though the route via R4 is also valid. Now if the table looked like this:

    192.168.0.0/16 via R4
    192.0.0.0/8 via R5

    Your router will choose R4 because it's the more specific route.
    If at first you do succeed, try something harder.
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    prtech wrote: »
    It's probably referring to the longest prefix match.

    If you have two routes to a destination, the router will choose the more specific route.

    Let's say you want to reach 192.168.1.0/24.

    Your routing table consists of two routes to get there:

    192.168.0.0/16 via R4
    192.168.1.0/24 via R5

    Your router will choose the route via R5 even though the route via R4 is also valid. Now if the table looked like this:

    192.168.0.0/16 via R4
    192.0.0.0/8 via R5

    Your router will choose R4 because it's the more specific route.

    Thanks for clearing this up for me.

    It's probably a real newb mistake, but I appreciate the answers you each provided me.
  • prtechprtech Member Posts: 163
    I wouldn't call it a newb mistake. I actually learned it while studying for ROUTE.
    If at first you do succeed, try something harder.
  • NotHackingYouNotHackingYou Member Posts: 1,460 ■■■■■■■■□□
    Technically C2 won't route its packets through either. It will send its packets to R3 and R3 will make the decision. From there, it's up to the routing protocol.
    When you go the extra mile, there's no traffic.
Sign In or Register to comment.