A Cisco router receives an IPv4 packet with a destination IP address of 172.16.50.170. The router inspects its routing table and finds the following route entries:
S 172.16.50.0/24 [1/0] via 10.0.0.1, GigabitEthernet0/0
D 172.16.50.128/25 [90/2560] via 10.0.0.2, GigabitEthernet0/1
O 172.16.50.160/27 [110/50] via 10.0.0.3, GigabitEthernet0/2
S 172.16.50.176/28 [1/0] via 10.0.0.4, GigabitEthernet0/3
Which next-hop IP address and outgoing interface will the router select to forward this packet?
- 10.0.0.3 via GigabitEthernet0/2Answer
- B10.0.0.1 via GigabitEthernet0/0
- C10.0.0.2 via GigabitEthernet0/1
- D10.0.0.4 via GigabitEthernet0/3
Answer
10.0.0.3 via GigabitEthernet0/2
When a router performs a forwarding lookup for destination 172.16.50.170, it checks all installed routes to find matches. The prefix 172.16.50.160/27 includes addresses from 172.16.50.160 to 172.16.50.191. Because /27 is the longest (most specific) prefix length among all matching routes, the router selects this entry (next-hop 10.0.0.3 via GigabitEthernet0/2). Administrative distance is not evaluated during lookup across routes of different prefix lengths.
Step-by-Step Solution
Key Concept
Longest Prefix Match (LPM) Routing Decision Logic