Options
Show ip route, RIP route help please.
mikejj83
Member Posts: 25 ■□□□□□□□□□
in CCNA & CCENT
Hello,
I am studying to take the CCENT and am having difficulty determining which route a router will choose when there is more than one route. In particular with the scenario presented below.
Router output:
R1#show ip route rip
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 5 subnets, 4 masks
R 172.16.1.1/32 [120/1] via 172.16.25.2, 00:00:04, Serial0/1/1
R 172.16.1.0/24 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0
R 172.16.0.0/22 [120/1] via 172.16.25.2, 00:00:04, Serial0/1/1
R 172.16.0.0/16 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0
R 0.0.0.0/0 [120/3] via 172.16.25.129, 00:00:09, Serial0/1/0
My textbook claims this statement to be true:
“Destination address 172.16.4.3 matches the last two routes listed in R1’s routing table
in the example, with the route for 172.16.0.0/16 having the longest prefix length.”
My question is why doesn’t the R 172.16.0.0/22 [120/1] work? It has a longer /22 prefix length to it??
Any help would be greatly appreciated.
I am studying to take the CCENT and am having difficulty determining which route a router will choose when there is more than one route. In particular with the scenario presented below.
Router output:
R1#show ip route rip
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 5 subnets, 4 masks
R 172.16.1.1/32 [120/1] via 172.16.25.2, 00:00:04, Serial0/1/1
R 172.16.1.0/24 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0
R 172.16.0.0/22 [120/1] via 172.16.25.2, 00:00:04, Serial0/1/1
R 172.16.0.0/16 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0
R 0.0.0.0/0 [120/3] via 172.16.25.129, 00:00:09, Serial0/1/0
My textbook claims this statement to be true:
“Destination address 172.16.4.3 matches the last two routes listed in R1’s routing table
in the example, with the route for 172.16.0.0/16 having the longest prefix length.”
My question is why doesn’t the R 172.16.0.0/22 [120/1] work? It has a longer /22 prefix length to it??
Any help would be greatly appreciated.
Comments
-
Optionsmella060 Member Posts: 198 ■■■□□□□□□□Because 172.16.0.0 /22 includes the addresses from
172.16.0.1 - 172.16.3.255...the next subnet is 172.16.4.0 /22
172.16.4.3 is on that subnet... -
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□Thank you. So it comes down to subnetting and IP address ranges.
-
Optionsmella060 Member Posts: 198 ■■■□□□□□□□Yes pretty much. CCENT is all about mastering subnetting. Know your subnets and ranges
-
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□I still need some more help on this please. What is a quick way to determine which subnet and mask are going to include the ip address in question?
-
OptionsIT_FAN Member Posts: 88 ■■■□□□□□□□I would recommend the following websites for subnetting:
subnettingquestions.com - Free Subnetting Questions and Answers Randomly Generated Online
Calculator for subnets/cidr/wildcards
Online IP Subnet CalculatorCompTIA A+ (2009 Edition) | CompTIA Network + (2009 Edition) | CompTIA Security + (2008 Edition) | CASP | CCDA | CCNA | CCNAS | CCNAV | CCDP | CCNP | CCNP:Security | MCTS | MCP | MCSA | MCSE | MCITP:EA | ITIL v3 Foundation 8) -
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□I am able to answer all of the questions from subnettingquestions.com. For some reason with the output of show ip route command format I am having trouble. Probably just over thinking this one.
-
Optionsmella060 Member Posts: 198 ■■■□□□□□□□I still need some more help on this please. What is a quick way to determine which subnet and mask are going to include the ip address in question?
A quick way is to find the increment or block size and which octet it is in. Have you done any study on subnetting ? The subnetting chapter in Todd Lammles CCNA book is very good. Thats how i got started.
A quick way to find the increment is to note the last bit position where the value is a 1. That is your increment.
So for example, the subnet mask 255.255.255.240 /28
11111111.11111111.11111111.11110000
128 64 32 16 8 4 2 1
So increment is 16 in the last octet.
You can also do 256-240 which gives the same answer
I find the other method a lot quicker -
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□When given a IP address and a subnet I can very easily find the ranges of IP's, but in the case from a "show ip route" scenario I have a IP address and a question asking me what route it will take. I don't have a subnet given to me to go along with the provided IP.
So in essence I need to write out the ranges for the IP with both possible subnets? -
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□Because 172.16.0.0 /22 includes the addresses from
172.16.0.1 - 172.16.3.255...the next subnet is 172.16.4.0 /22
172.16.4.3 is on that subnet...
Okay, I think the Odom's book has a error. I can clearly see how 172.16.0.0 /22 contains the ip 172.16.4.3 in it's range.
I do not see how 172.16.4.3 can belong in /16's range. Am I missing something and does this IP really belong with the /16 and not /22? -
Optionsnetworker050184 Mod Posts: 11,962 ModOkay, I think the Odom's book has a error. I can clearly see how 172.16.0.0 /22 contains the ip 172.16.4.3 in it's range.
I do not see how 172.16.4.3 can belong in /16's range. Am I missing something and does this IP really belong with the /16 and not /22?
172.16.0.0/16 = 172.16.0.0 - 172.16.255.255
That range includes 172.16.4.3. It can belong to both, thats why it is important to not overlap your subnets.An expert is a man who has made all the mistakes which can be made. -
Optionskalebksp Member Posts: 1,033 ■■■■■□□□□□I can clearly see how 172.16.0.0 /22 contains the ip 172.16.4.3 in it's range.Because 172.16.0.0 /22 includes the addresses from
172.16.0.1 - 172.16.3.255...the next subnet is 172.16.4.0 /22
As mella060 said, 172.16.0.0/22 does not contain 172.16.4.3. -
Optionsmella060 Member Posts: 198 ■■■□□□□□□□but in the case from a "show ip route" scenario I have a IP address and a question asking me what route it will take. I don't have a subnet given to me to go along with the provided IP.
So in essence I need to write out the ranges for the IP with both possible subnets?
Well all the subnet information you need is in the routing table. You just need to match the IP with the network(s) that it belongs to. If it doesnt match any networks then the packet will be dropped.
After you have mastered subnetting and have done it for a while then you should be able to determine which networks a given IP matches pretty much straight away. Should be able to work out the possible ranges in your head. But when you are starting out it is probably best to write it out. -
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□We'll I think it's simply time for me to move on past this scenario. I can write out ip ranges for both 172.16.4.3 with a mask of /16 and /22. Thanks for all the help, hopefully this will become more clear to me as I continue on in my studies.
-
Optionsjoe48184 Member Posts: 83 ■■□□□□□□□□Gonna take a stab at this as well.. i'm in the learning phase also (icnd1) and "may" be able to explain.
172.16.0.0/22 has a mask of 252, which allows 4 subnets starting at zero.
so basically 172.16.0.1 - 255 ending with 172.16.3.255
Given that 172.16.4.0 is a "new" subnet it's not part of the /22 making the /16 the highest prefix.
The statment also says it matches the last 2 routes.
R 172.16.0.0/16 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0
R 0.0.0.0/0 [120/3] via 172.16.25.129, 00:00:09, Serial0/1/0
I really hope I got it right "and" it helps. -
Optionsmikejj83 Member Posts: 25 ■□□□□□□□□□Gonna take a stab at this as well.. i'm in the learning phase also (icnd1) and "may" be able to explain.
172.16.0.0/22 has a mask of 252, which allows 4 subnets starting at zero.
so basically 172.16.0.1 - 255 ending with 172.16.3.255
Given that 172.16.4.0 is a "new" subnet it's not part of the /22 making the /16 the highest prefix.
The statment also says it matches the last 2 routes.
R 172.16.0.0/16 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0
R 0.0.0.0/0 [120/3] via 172.16.25.129, 00:00:09, Serial0/1/0
I really hope I got it right "and" it helps.
Thank you joe48184. Looking at it laid out that way makes sense to me now. I'll have to try some similar problems and if I they make sense as well.