ICND 2 question: most specific static route

2URGSE2URGSE Member Posts: 220 ■■■□□□□□□□
Scenario:

Router B recieves a packet destined to 10.0.0.24.

The router has been configured as following:

ip route 0.0.0.0 0.0.0.0 192.168.1.4

ip route 10.0.0.0 255.255.0.0 192.168.1.3

ip route 10.0.0.0 255.255.255.0 192.168.1.2

ip route 10.0.0.0 255.255.255.224 192.168.1.1



The question asks to which next-hop IP address will the packet be forwarded?

I do understand that router will examine the routing table to find the most specific route for this packet.

What I do no understand is, what makes ip route 10.0.0.0 255.255.255.224 192.168.1.1 the most specific route? Is it the subnet mask?


A+
Network+
CCENT (formally CCNA certified)
ICE (Imprivata Certified Engineer)

Comments

  • MrBrianMrBrian Member Posts: 520
    You're right. If the destination address matches multiple routes in the routing table, the most specific match in the routing table will be used, meaning essentially longest subnet mask.

    The most extreme case where this is seen is in a default route or a host route. A default route will be to 0.0.0.0, with a mask of 0.0.0.0! That means a packet will only match this route if it doesn't hit anything else in the routing table.. whereas a host route is a route to an actual IP address and uses a 255.255.255.255 mask. So if a unicast packet came in destined for that host route, it would be used, and not a less specific, say /24, route.
    Currently reading: Internet Routing Architectures by Halabi
  • networker050184networker050184 Mod Posts: 11,962 Mod
    2URGSE wrote: »
    What I do no understand is, what makes ip route 10.0.0.0 255.255.255.224 192.168.1.1 the most specific route? Is it the subnet mask?



    The most specific match is the one with the most bits in common when written in binary. You can look at the mask and get a pretty accurate idea without using binary though.
    An expert is a man who has made all the mistakes which can be made.
  • 2URGSE2URGSE Member Posts: 220 ■■■□□□□□□□
    Much appreciated folks, preparing for that ICND 2!!:D
    A+
    Network+
    CCENT (formally CCNA certified)
    ICE (Imprivata Certified Engineer)
Sign In or Register to comment.