Refer to the following partial IPv4 routing table output from a Cisco router:
text
Codes: C - connected, S - static, D - EIGRP, O - OSPF
Gateway of last resort is 192.168.40.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.40.1
S 172.20.0.0/16 [1/0] via 192.168.30.1
D 172.20.100.0/24 [90/2170112] via 192.168.20.1
O 172.20.100.64/26 [110/20] via 192.168.10.1
The router receives a packet destined for IP address 172.20.100.85. Which next-hop IP address will the router choose to forward this packet?
- 192.168.10.1Answer
- B192.168.30.1
- C192.168.20.1
- D192.168.40.1
Answer
192.168.10.1
When a router makes a packet forwarding decision, it evaluates matching routes using the Longest Prefix Match (LPM) rule. The destination address 172.20.100.85 matches the route 172.20.100.64/26 because the range of valid hosts for 172.20.100.64/26 spans from 172.20.100.65 to 172.20.100.126. Because /26 is more specific than /24, /16, or /0, the router chooses the next-hop address 192.168.10.1 regardless of Administrative Distance.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic (Longest Prefix Match precedence over Administrative Distance)