How2pass.com Forums
Question on Routers - Printable Version

+- How2pass.com Forums (https://www.how2pass.com/forum)
+-- Forum: CCNA (https://www.how2pass.com/forum/forum-4.html)
+--- Forum: Answer this question (https://www.how2pass.com/forum/forum-11.html)
+--- Thread: Question on Routers (/thread-294.html)



Question on Routers - macky^^ - 01-26-2010

Hi all,

This is extracted from my ICND 1 text book.

I?m unclear what the 3 bullet points as below mean. Can I request some explanation how the destination IP addresses match all the routes?

Thank you in advanced.

Example 15-2 show ip route Command with Overlapping Routes

R1#show ip route rip
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

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
R1#show ip route 172.16.4.3
Routing entry for 172.16.0.0/16
Known via "rip", distance 120, metric 2
Redistributing via rip
Last update from 172.16.25.129 on Serial0/1/0, 00:00:19 ago
Routing Descriptor Blocks:
* 172.16.25.129, from 172.16.25.129, 00:00:19 ago, via Serial0/1/0
Route metric is 2, traffic share count is 1

For the exam, to find the matching route, all you need to know is the destination IP address
of the packet and the router?s IP routing table. By examining each subnet and mask in the routing table, you can determine the range of IP addresses in each subnet. Then, you can compare the packet?s destination to the ranges of addresses, and find all matching routes.
In cases where a particular destination IP address falls within the IP address range for multiple routes, then you pick the route with the longest prefix length. In this case:

■ Destination address 172.16.1.1 matches all five routes, but the host route for specific
IP address 172.16.1.1, prefix length /32, has the longest prefix length.

■ Destination address 172.16.1.2 matches four of the routes (all except the host route for
172.16.1.1), but the route to 172.16.1.0/24 has the longest prefix.

■ Destination address 172.16.2.2 matches the last three routes listed in R1?s routing table
in the example, with the route for 172.16.0.0/22 having the longest prefix length.

■ 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.

Finally, note the output of the show ip route 172.16.4.3 command at the end of Example
15-2. This command shows which route the router would match to reach IP address
172.16.4.3?a very handy command for both real life and for Sim questions on the exams.
In this case, a packet sent to IP address 172.16.4.3 would match the route for the entire
Class B network 172.16.0.0/16, as highlighted near the end of the example.