03-27-2008 09:46 PM - edited 03-03-2019 09:18 PM
i have packets destined to IP addresses
172.16.1.1,172.16.4.3,
i want to know which route this router would match
sh ip route shows
Gateway of last resort is not set
R 172.16.1.1/32
R 172.16.1.0/24
R 172.16.0.0/22
R 172.16.0.0/22
R 0.0.0.0/0
03-27-2008 09:53 PM
Mahesh
Packets destined to 172.16.1.1 will use the 172.16.1.1/32 host route in the routing table.
You have 2 entries in the routing table that are the same ie.
172.16.0.0/22 - is this intended ?
Anyway
172.16.0.0/22 = 172.16.0.0 255.255.252.0
this covers 172.16.0.0 -> 172.16.3.255.
So packets destined to 172.16.4.3 will use the default route ie. 0.0.0.0
HTH
Jon
03-27-2008 09:59 PM
sorry for 1 mistake
R 172.16.0.0 /22 is actually
R 172.16.0.0/16
Can u explain we how u figure that out?
Thanks
03-27-2008 11:01 PM
Mahesh,
R 172.16.0.0/16 is representing the routing protocol RIP, with the advertise network 172.16.0.0 and subnet musk 255.255.0.0
With more details, where the Host address ranges are 172.16.0.1 - 172.16.255.254. The Subnet ID 172.16.0.0 and the Broadcast 172.16.255.255, where the Max Subnet is 1 only with the host per subnet 64534.
Please rate if I am informative.
Thanks
Goutam
03-28-2008 01:49 AM
Mahesh
Okay, then the packet 172.16.4.3 would use the 172.16.0.0/16 route. Goutam has explained the range of addressing that 172.16.0.0/16 covers.
Is there anything else you want clarification on ?
Jon
03-28-2008 04:34 AM
Correct me if i'm wrong but 172.16.4.3 doesn't match any of the routes in the routing table apart from the default route 0.0.0.0/0.
To my knowlege if a packets destination IP does not match a route in the routing table then the packet is disagarded unless a default route is configured. In your case it is 0.0.0.0/0. The default route will be used to forward packets if destination IP does not match a specific route.
03-28-2008 04:37 AM
Have a look at the second post from the OP. There was a typo in the original post
ie.
172.16.0.0/22
172.16.0.0/22
one of these should have read
172.16.0.0/16
in which case 172.16.4.3 would use this route.
Jon
03-28-2008 04:39 AM
Yeah i see! thanks for pointing that out!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide