Examine the following Cisco IPv4 routing table snippet:
text
Codes: C - connected, S - static, R - RIP, B - BGP, D - EIGRP, O - OSPF
Gateway of last resort is 10.1.1.254 to network 0.0.0.0
S 192.168.100.0/24 [1/0] via 10.1.1.1
D 192.168.100.160/27 [90/2170112] via 10.1.1.2
O 192.168.100.176/28 [110/40] via 10.1.1.3, GigabitEthernet0/0/2
S 192.168.100.180/30 [1/0] via 10.1.1.4
S* 0.0.0.0/0 [1/0] via 10.1.1.254
Which next-hop IP address will the router select to forward an incoming packet destined for host 192.168.100.178?
- A10.1.1.1
- B10.1.1.2
- 10.1.1.3Answer
- D10.1.1.4
Answer
10.1.1.3
When a router receives a packet, it first evaluates all matching routes in the routing table using the Longest Prefix Match (LPM) rule. The destination address 192.168.100.178 matches four routes in the table: 0.0.0.0/0, 192.168.100.0/24, 192.168.100.160/27 (range .160–.191), and 192.168.100.176/28 (range .176–.191). Among these valid matches, 192.168.100.176/28 has the longest subnet mask (/28 = 28 matching bits). Therefore, the router selects this route and forwards the packet to next-hop IP 10.1.1.3.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic (Longest Prefix Match precedence over Administrative Distance and Metric)