N10-009 Question 150
Single answerSubinterfaces, Administrative distance, Prefix length, MetricA network administrator is troubleshooting connectivity between VLAN 10 and a remote branch office. The router uses subinterfaces for inter-VLAN routing on a single physical interface: G0/0.10 for 192.168.10.1/24 and G0/0.20 for 192.168.20.1/24. Users in VLAN 10 can reach VLAN 20, but they cannot reliably reach the branch network 10.50.8.0/21. The administrator checks the routing table and sees two routes to that branch network:
- OSPF route: 10.50.8.0/21 via 172.16.1.2, administrative distance 110, metric 30
- Static route: 10.50.8.0/24 via 172.16.1.3, administrative distance 1
Users in VLAN 10 report that they can reach hosts in 10.50.8.10 but not 10.50.12.10. Which of the following best explains the issue?
- A
The router prefers the static route for addresses in 10.50.8.0/24 because the longer prefix length is more specific than the OSPF /21 route
- B
The router prefers the OSPF route because OSPF metrics are evaluated before prefix length and administrative distance
- C
Traffic from VLAN 10 fails because subinterfaces cannot route to networks learned through dynamic routing protocols
- D
The router ignores the static route because OSPF has a higher administrative distance value and therefore higher priority
Show answer and explanation
Correct answer: A
Explanation
This scenario tests practical route selection using subinterfaces, prefix length, administrative distance, and metric. The VLAN 10 subinterface is functioning because users can reach VLAN 20, which confirms inter-VLAN routing is working. The key issue is how the router selects between overlapping routes. Standard routing behavior uses longest prefix match first. A route to 10.50.8.0/24 is more specific than a route to 10.50.8.0/21, so any destination inside 10.50.8.0/24 uses the static route. Destinations outside that /24 but still inside the /21 use the OSPF route. Administrative distance is used to choose between competing routes to the same prefix from different sources, and metric is used within a routing protocol to choose among multiple paths. This is consistent with common routing behavior documented by major vendors such as Cisco and with general IP forwarding best practices.
- A. Correct.
Correct. Route selection first considers the most specific matching prefix, also called longest prefix match. The static route to 10.50.8.0/24 is more specific than the OSPF route to 10.50.8.0/21, so traffic to addresses within 10.50.8.0 through 10.50.8.255, such as 10.50.8.10, uses the static route. Traffic to 10.50.12.10 is not in 10.50.8.0/24, but it is in 10.50.8.0/21, so it uses the OSPF route. This behavior matches standard IP routing logic.
- B. Incorrect.
Incorrect. Prefix length is evaluated before administrative distance and metric when determining which route matches a destination. Metrics are compared only among routes learned by the same routing protocol to the same prefix. In this case, the /24 static route is chosen for 10.50.8.10 because it is more specific, regardless of the OSPF metric.
- C. Incorrect.
Incorrect. Subinterfaces are commonly used for router-on-a-stick inter-VLAN routing and can route traffic to directly connected, static, and dynamically learned remote networks. The issue is not a limitation of subinterfaces; it is the interaction between prefix length and route selection.
- D. Incorrect.
Incorrect. Lower administrative distance is preferred, not higher. Also, administrative distance is only relevant when comparing routes to the same destination prefix length. Here, the static /24 route is preferred for that subnet because it is more specific, and its lower administrative distance would also win if the prefixes were identical.