matching ip address to router routing table using ip route rip

jalopenopopperjalopenopopper Member Posts: 7 ■□□□□□□□□□
i am using the ccent/icnd1 second edition cisco press book and i am a little stuck on this example on page 484

here is a brief summary of the example

R1#show ip route rip

172.16.0.0/16 is variably subnetted, 5 subnets, 4 masks

R 172.16.1.1/31
R 172.16.1.0/24
R 172.16.0.0/22
R 172.16.0.0/16
R 0.0.0.0/0


the example wants to know what route the router would take for an ip address of 172.16.4.3

according to the book the router matches the last two routes in the table to this address and it would take the 4th one because it has a higher prefix value. Why isn't the third route taken? It is in the same subnet number as 172.16.4.3 and it has a higher prefix value than the 4th route. Was there a typo made in the book?

Comments

  • powmiapowmia Users Awaiting Email Confirmation Posts: 322
    172.16.0.0/22 covers the range 172.16.0.0 - 172.16.3.255. 172.26.4.0/22 would be the next block that covers 172.16.4.3, but that prefix is not in your routing table. The less specific /16 prefix does cover your 172.16.4.3 address, and is more specific than the default 0.0.0.0
  • boredgameladboredgamelad Member Posts: 365 ■■■■□□□□□□
    Why isn't the third route taken? It is in the same subnet number as 172.16.4.3

    Check again! :D
  • jalopenopopperjalopenopopper Member Posts: 7 ■□□□□□□□□□
    oh that makes sense. Would i have to find the valid ip address range for each of the subnets to see if a specific address belongs in it? Is there a quicker way to do it?
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    oh that makes sense. Would i have to find the valid ip address range for each of the subnets to see if a specific address belongs in it? Is there a quicker way to do it?
    Well, as you practice with IP addressing and subnetting more, you will be able to reject silly answers more quickly. Getting in as much practice in as you can is precisely how you will develop your subnetting muscles. :)
    R 172.16.1.1/31, R 172.16.1.0/24
    For example, I couldn't imagine spending more than a few milliseconds rejecting these..
    R 0.0.0.0/0, R 172.16.0.0/16
    ..or to determine these match.
    R 172.16.0.0/22
    This is thus the only item I would calculate, and that takes 1-3 seconds. My thought process: In the third octet, that are two host bits. 2^2=4. Thus, 172.16.0-3.x is one range and 172.16.4-7.x is the next.
  • jalopenopopperjalopenopopper Member Posts: 7 ■□□□□□□□□□
    the first two were rejected quickly because there is a 1 in the third octed right?
  • powmiapowmia Users Awaiting Email Confirmation Posts: 322
    No, they were rejected, because their mask length is too long. The first one covers 172.16.1.1 -> 172.16.1.2 and the second one covers 172.16.1.0 -> 172.16.1.255. I highly recommend reading Todd Lammle's CCNA study guide, there is a pretty straight forward break down of subnetting in there. I would recommend reading that before any Cisco Press book at that level.
Sign In or Register to comment.