Cisco CCNA (200-301)IP ConnectivityHard

A router's routing table shows two entries for destination network 192.168.50.0/24: one static route with administrative distance 1 and one OSPF-learned route with administrative distance 110. A separate OSPF route also exists for 192.168.50.0/25 learned via a different path. Which route does the router use to forward a packet destined for 192.168.50.10?

  1. ABoth /24 routes are installed and load-balanced since they share the same prefix length
  2. BThe OSPF route to 192.168.50.0/25, because it is the longest matching prefix
  3. CThe OSPF route to 192.168.50.0/24, because OSPF is more scalable
  4. DThe static route to 192.168.50.0/24, because static routes always win regardless of prefix length
Show answer & explanation

Correct answer: B. The OSPF route to 192.168.50.0/25, because it is the longest matching prefix

Longest prefix match takes priority over administrative distance. Even though the static /24 route has a lower AD than the competing /24 OSPF route, the separate /25 OSPF route is more specific for 192.168.50.10 and is chosen regardless of AD comparisons among the /24 entries.

Why the other options are wrong

  • A. Load balancing requires identical prefix length and equal cost from the same protocol; a /24 and /25 are not equal.
  • C. Scalability of a protocol has no bearing on route selection; prefix length does.
  • D. AD only decides between routes of the SAME prefix length; it does not override a longer, more specific prefix.

Prefix Length vs Administrative Distance

Routers first select the most specific (longest) matching prefix for a destination; administrative distance is only used to break ties between sources advertising the identical prefix length.

  • Longest prefix match is evaluated first, always
  • AD comparison happens only among routes with the same prefix length
  • A /25 route always beats a /24 route for an address within the /25 range

Memory trick: Specificity beats trust: the sharpest match wins first.

More IP Connectivity questions