which route to take with multiple routes

odysseyeliteodysseyelite Member Posts: 504 ■■■■■□□□□□
I'm having a hard time with questions like the below. The book's explaination is a a router picks the route with the longest prefix length. I'm not sure what they mean by that statement.

What route will IP's 172.16.2.2 and 172.16.4.3 take?

172.16.0.0/22 via 172.16.25.2
172.16.0.0/16 via 172.16.25.129
Currently reading: Start with Why: How Great Leaders Inspire Everyone to Take Action

Comments

  • Chris_Chris_ Member Posts: 326
    They mean that the router will choose the most specific route.

    If a router has 2 routes:
    172.16.0.0/16
    &
    172.16.0.0/24
    And the router is trying to send packets to 172.16.0.3, then the second route is more specific as it has the longest prefix length (/24) meaning that 24 bits of this route match the destination address of the packet, versus only 16 bits in the first route. Hope this makes sense.
    Going all out for Voice. Don't worry Data; I'll never forget you
    :study: CVoice [X] CIPT 1 [ ] CIPT 2 [ ] CAPPS [ ] TVOICE [ ]
  • Chris_Chris_ Member Posts: 326
    Didn't answer your exact question Intentionally,
    See if you can get it now :)
    Going all out for Voice. Don't worry Data; I'll never forget you
    :study: CVoice [X] CIPT 1 [ ] CIPT 2 [ ] CAPPS [ ] TVOICE [ ]
  • odysseyeliteodysseyelite Member Posts: 504 ■■■■■□□□□□
    Chris_ wrote: »
    They mean that the router will choose the most specific route.

    If a router has 2 routes:
    172.16.0.0/16
    &
    172.16.0.0/24
    And the router is trying to send packets to 172.16.0.3, then the second route is more specific as it has the longest prefix length (/24) meaning that 24 bits of this route match the destination address of the packet, versus only 16 bits in the first route. Hope this makes sense.

    If that is the case, then in my original question, both routes would go to 172.16.0.0/22. The book states 172.16.2.2 would use 172.16.0.0/22 and 172.16.4.3 would use 172.16.0.0/16.
    Currently reading: Start with Why: How Great Leaders Inspire Everyone to Take Action
  • Chris_Chris_ Member Posts: 326
    Nope, 172.16.0.0/22 does not match 172.16.4.3 it only matches the range
    172.16.0.0 - 172.16.3.255
    So it would need to use the /16 route.
    Going all out for Voice. Don't worry Data; I'll never forget you
    :study: CVoice [X] CIPT 1 [ ] CIPT 2 [ ] CAPPS [ ] TVOICE [ ]
  • odysseyeliteodysseyelite Member Posts: 504 ■■■■■□□□□□
    ok, I get it now.

    Thanks!
    Currently reading: Start with Why: How Great Leaders Inspire Everyone to Take Action
Sign In or Register to comment.