An engineer is troubleshooting IPv4 packet forwarding on a Cisco router. The router receives a packet with a destination IP address of . The active routing table contains the following entries:
text
S 172.28.0.0/16 [1/0] via 10.1.1.1
O 172.28.64.0/20 [110/20] via 10.2.2.2
D 172.28.64.64/26 [90/307200] via 10.3.3.3
B 172.28.64.96/28 [20/0] via 10.4.4.4
Which next-hop IP address will the router use to forward the packet, and what is the primary routing logic behind this decision?
- ANext-hop 10.1.1.1, because static routes have the lowest administrative distance (1) among all matching candidate routes.
- BNext-hop 10.2.2.2, because OSPF metric 20 is lower than the metric of the longest prefix route.
- CNext-hop 10.3.3.3, because EIGRP has a lower administrative distance (90) than OSPF (110) for internal subnets.
- Next-hop 10.4.4.4, because 172.28.64.96/28 provides the longest prefix match for destination 172.28.64.99.Answer
Answer
The router forwards the packet to next-hop 10.4.4.4 because 172.28.64.96/28 provides the longest prefix match for the destination address 172.28.64.99.
When a router makes a packet forwarding decision, it compares the destination IP address against all routes in the routing table and selects the route with the most specific match (the longest subnet mask length / prefix length). Destination 172.28.64.99 falls into 172.28.64.96/28 (range 172.28.64.96 - 172.28.64.111). Because /28 is the longest matching mask (28 bits), it takes absolute priority over the /26, /20, and /16 matches, directing traffic to next-hop 10.4.4.4.
Step-by-Step Solution
Key Concept
Longest Prefix Match (LPM) in IP Routing Forwarding Decisions