Question

Difficulty: EasyRouter Forwarding Decision Logic

Refer to the following routing table output from a Cisco router:

text
Gateway of last resort is not set

10.0.0.0/8 is subnetted, 4 subnets
C 10.10.20.0/20 is directly connected, GigabitEthernet0/0
S 10.10.20.0/24 [1/0] via 172.16.1.1
O 10.10.20.128/25 [110/20] via 172.16.2.1
D 10.10.20.144/28 [90/307200] via 172.16.3.1

The router receives an IPv4 packet destined for host 10.10.20.150. Which two statements regarding the router forwarding decision are correct?

  1. The router forwards the packet using next-hop IP 172.16.3.1 because the /28 route provides the longest prefix match for the destination address.Answer
  2. B
    The router forwards the packet using next-hop IP 172.16.1.1 because static routes take precedence over EIGRP due to a lower administrative distance.
  3. Longest prefix match logic is evaluated before comparing administrative distance values across routing protocols.Answer
  4. D
    The router drops the packet because 10.10.20.150 is the broadcast address of the 10.10.20.144/28 subnet.

Answer

The router forwards the packet to next-hop 172.16.3.1 based on the longest prefix match rule, and prefix length evaluation strictly precedes administrative distance comparisons.
The router applies Longest Prefix Match (LPM) logic first when forwarding traffic. Among the matching entries in the routing table for 10.10.20.150, the subnet 10.10.20.144/28 has 28 matching bits, making it more specific than /25, /24, or /20. Therefore, the router forwards the packet to next-hop 172.16.3.1. Additionally, prefix length comparison occurs before comparing administrative distance or metric parameters.

Step-by-Step Solution

1
Determine which routes match the destination host IP 10.10.20.150.
The destination matches 10.10.20.0/20, 10.10.20.0/24, 10.10.20.128/25, and 10.10.20.144/28.
All four entries contain the IP address 10.10.20.150 within their subnet boundaries.
2
Compare prefix lengths among all matching routes to find the most specific match.
The /28 prefix (10.10.20.144/28) has 28 matching network bits, which is longer than /25, /24, or /20.
The longest prefix match rule requires routers to choose the route with the highest number of matching leading subnet bits.
3
Select the forwarding path according to the longest prefix match route.
The route via 172.16.3.1 is selected, regardless of the lower administrative distance of the static route.
Administrative Distance (AD) is only used to select between identical routes from different sources, not between routes of different prefix lengths.

Key Concept

Router Forwarding Decision Logic (Longest Prefix Match precedence)
Rate this question