Question

Difficulty: MediumIPv4 Static Routing

Router R1 contains the following IPv4 routing table entries for destination networks within the enterprise core:

- A static route to 10.10.4.0/2410.10.4.0/24 with a configured administrative distance of 110110
- An OSPF route to 10.10.0.0/1610.10.0.0/16 with an administrative distance of 110110
- A RIP route to 10.10.4.32/2710.10.4.32/27 with an administrative distance of 120120

When Router R1 receives an IPv4 packet destined for host 10.10.4.5010.10.4.50, which route will R1 select to forward the traffic?

  1. The RIP route to 10.10.4.32/2710.10.4.32/27 because it has the longest prefix match for the destination address.Answer
  2. B
    The static route to 10.10.4.0/2410.10.4.0/24 because static routes are preferred over dynamic routing protocols when administrative distance is equal.
  3. C
    The OSPF route to 10.10.0.0/1610.10.0.0/16 because OSPF is a link-state protocol with lower overhead than RIP.
  4. D
    Equal-cost load balancing across both the static route and the OSPF route because both have an administrative distance of 110110.

Answer

Router R1 will select the RIP route to 10.10.4.32/2710.10.4.32/27 because it represents the longest prefix match (27 bits) for the destination host address 10.10.4.5010.10.4.50.
When a router receives an IP packet, it compares the destination IP address against entries in its routing table. The fundamental rule of IP route selection is Longest Prefix Match (LPM). The destination host 10.10.4.5010.10.4.50 matches all three configured routes, but 10.10.4.32/2710.10.4.32/27 has the longest subnet mask prefix length (27 bits vs 24 bits vs 16 bits). Administrative distance is only evaluated when comparing two routes pointing to the exact same prefix and mask length. Therefore, the router forwards traffic using the RIP route despite its higher administrative distance of 120.

Step-by-Step Solution

1
Convert the destination IP and route prefixes to binary or analyze subnet ranges to find matching routes.
Host 10.10.4.5010.10.4.50 falls into all three ranges: 10.10.0.0/1610.10.0.0/16 (range 10.10.0.010.10.0.010.10.255.25510.10.255.255), 10.10.4.0/2410.10.4.0/24 (range 10.10.4.010.10.4.010.10.4.25510.10.4.255), and 10.10.4.32/2710.10.4.32/27 (range 10.10.4.3210.10.4.3210.10.4.6310.10.4.63).
Before comparing administrative distance, the router identifies all routing table entries that match the destination IP address.
2
Apply Cisco IOS forwarding decision logic rule #1: Longest Prefix Match.
The /27/27 mask (27 matching subnet bits) is longer and more specific than /24/24 (24 bits) and /16/16 (16 bits).
The router always prefers the route with the highest number of matching leading bits, regardless of administrative distance or metric.
3
Select the forwarding route.
The RIP route to 10.10.4.32/2710.10.4.32/27 is chosen for packet forwarding.
Administrative distance (120 vs 110) is ignored because the prefix lengths are not identical.

Key Concept

Cisco IPv4 Forwarding Decision Logic: Longest Prefix Match Rule
Rate this question