cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
422
Views
0
Helpful
7
Replies

routing path

mahesh18
Level 6
Level 6

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

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

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

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

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

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

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.

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

Yeah i see! thanks for pointing that out!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: