IP forwarding by matching the most specific route!
LBC90805
Member Posts: 247
in CCNA & CCENT
Just a question here and some confusion on my behalf. I will quote from the ICND2 Odom book -the new book here-; just trying to figure stuff out here.
"When a particular destination IP adress matches more than one route in a router's routing table, the router uses the most specific route - in other words, the route with the longest prefix length."
OK that much I understand.
I have a question and would like to see if I can just jar the logical reasoning out of my skull.
What route would a router match for the following IP Addresses?
Addresses as follows:
172.16.2.3
172.16.4.3
What route for each above address would a router use from the following routes?
172.16.0.0/22
172.16.0.0/16
0.0.0.0/0
Any input and help would be greatly appreciated........
"When a particular destination IP adress matches more than one route in a router's routing table, the router uses the most specific route - in other words, the route with the longest prefix length."
OK that much I understand.
I have a question and would like to see if I can just jar the logical reasoning out of my skull.
What route would a router match for the following IP Addresses?
Addresses as follows:
172.16.2.3
172.16.4.3
What route for each above address would a router use from the following routes?
172.16.0.0/22
172.16.0.0/16
0.0.0.0/0
Any input and help would be greatly appreciated........
Comments
-
peanutnoggin Member Posts: 1,096 ■■■□□□□□□□I believe each route would go to the 172.16.0.0/22 because it is the longest matching route in the routing table.
~Peanut HeadWe cannot have a superior democracy with an inferior education system!
-Mayor Cory Booker -
srg Member Posts: 140Kinda tricky question . Since 172.16.0.0/22 ranges from 172.16.0.0 to 172.16.3.255 that will be the prefered route to get to 172.16.2.3, but 172.16.0.0/16 will be the prefered route to get to 172.16.4.3 since that's the most specific route. 0.0.0.0/0 beeing the least specific route of them all.
Hope that helps. -
LBC90805 Member Posts: 247Well this is my dilemma. Don't both routes in the rouing table match each IP? The router would use 172.16.0.0/22 instead of 172.16.0.0/16 in both cases. First 172.16.0.0/16 is not using any subnetting what so ever, 172.16.0.0/22 is! Second I don't know why 172.16.0.0/16 would be used over 172.16.0.0/22, in every instance 172.16.0.0/22 remains the most specific route. `Am I missing something here?
Thanks for everyone's input thus far -
gojericho0 Member Posts: 1,059 ■■■□□□□□□□172.16.4.3 does not fall into 172.16.0.0/22, it does however fall into 172.16.0.0/16 as well as 0.0.0.0. It will use 172.16.0.0/16 path because it is the most specific of the two options
-
srg Member Posts: 140LBC90805 wrote:Well this is my dilemma. Don't both routes in the rouing table match each IP? The router would use 172.16.0.0/22 instead of 172.16.0.0/16 in both cases. First 172.16.0.0/16 is not using any subnetting what so ever, 172.16.0.0/22 is! Second I don't know why 172.16.0.0/16 would be used over 172.16.0.0/22, in every instance 172.16.0.0/22 remains the most specific route. `Am I missing something here?
Thanks for everyone's input thus far
172.16.0.0/22 is the most specifit route to THAT net.. the 172.16.0.0/22 net, which ranges from 172.16.0.0 to 172.16.3.255.. in other words, thats not a specific route to 172.16.4.3. -
LBC90805 Member Posts: 247KRIPES, Brain Fart. That last little bit just sunk it into my thick skull for me.
Sorry, I've been very DULL these past odd days. Trying to manage to study with a Migraine just about everyday and some good and proper medicine, go ahead and imagine what I might be taking for pain because I probably `am; doctor prescribed of course!
Now if that was a /21 network then the 4.3 network would match that route? -
Markey Member Posts: 14 ■□□□□□□□□□Hello I've been really struggling with this concept and I think I understand what SRG is saying;
What I'm confused about is:
172.16.0.0/22 implies the following subnets:
172.16.0.0 range 0.1 - 3.254 (3.255 = broadcast)
172.16.4.0 range 4.1 - 7.254 (7.255 = broadcast)
172.16.8.0 range 8.1 - 11.254 (11.255 = broadcast)
.
.
172.16.252.0 range 252.1 - 255.254 (255.255 = broadcast)
Question is why does the router not consider the other subnets as valid for this route and only the first range as specific for the route; As you said 172.16.4.3 falls into the second subnet range. Is it that the router only considers the zero subnet when choosing?
Help I'm drowning! -
Paul Boz Member Posts: 2,620 ■■■■■■■■□□The router doesn't consider it because it's not in the routing table. If the routing table had a route for 172.16.4.0 /22 it would use that route for the second address. In the absence of a more specific route, however, the router uses the 172.16.0.0 /16 route.CCNP | CCIP | CCDP | CCNA, CCDA
CCNA Security | GSEC |GCFW | GCIH | GCIA
pbosworth@gmail.com
http://twitter.com/paul_bosworth
Blog: http://www.infosiege.net/ -
suffah Member Posts: 89 ■■□□□□□□□□Yo Markey,
I see you are still struggling a bit with this concept from the other thread:
http://www.techexams.net/forums/viewtopic.php?p=235259#235259Markey wrote:172.16.0.0/22 implies the following subnets:
172.16.0.0 range 0.1 - 3.254 (3.255 = broadcast)
172.16.4.0 range 4.1 - 7.254 (7.255 = broadcast)
172.16.8.0 range 8.1 - 11.254 (11.255 = broadcast)
.
.
172.16.252.0 range 252.1 - 255.254 (255.255 = broadcast)
No, 172.160.0.0/22 is one specific subnet. It does not imply every possible subnet out there that fits under the /22 netmask.
For example, 172.160.4.0/22 is a different subnet.
The router table would need 172.160.4.0/22 if you wanted that subnet and so on.Cisco Fun http://ciscofun.wordpress.com -
Markey Member Posts: 14 ■□□□□□□□□□yep I understand now. The part that was confusing me was the /22 in regards to subnetting. The router doesn't make it's decision based on all the subnets listed with that classful network (172.16.0.0) and mask. As you say 172.16.4.0/22 would match 172.16.4.1-172.16.7.254 range. 172.16.8.0/22 would match an address range of 172.16.8.1-172.16.11.254, 172.16.16.0/22 would match 172.16.16.1 - 172.16.19.254 etc. etc.... Thanks for the response.
-
suffah Member Posts: 89 ■■□□□□□□□□Bingo, you got it!
By chance, did you learn subnetting via CBT nuggets? I can see how you could get confused because in his teaching examples he always listed the possible subnets for each subnet mask.Cisco Fun http://ciscofun.wordpress.com -
Markey Member Posts: 14 ■□□□□□□□□□Hi Suffah thanks for your support. No I've been using the Odom books and the free Boson test environment that came with it.
Thanks again!