Refer to the following partial output from a Cisco router's routing table:
text
Codes: C - connected, S - static, O - OSPF, D - EIGRP
O 172.16.10.0/24 [110/20] via 10.1.1.1, GigabitEthernet0/0
D 172.16.10.64/26 [90/307200] via 10.1.1.2, GigabitEthernet0/1
S 172.16.10.64/27 [1/0] via 10.1.1.3, GigabitEthernet0/2
The router receives an IP packet with a destination IP address of 172.16.10.68. Which statements correctly describe how the router handles this forwarding decision? (Select TWO.)
- The router selects the static route to 172.16.10.64/27 because it has the longest prefix match for the destination address.Answer
- The packet is forwarded out interface GigabitEthernet0/2 toward next-hop IP address 10.1.1.3.Answer
- CThe router selects the EIGRP route to 172.16.10.64/26 because EIGRP has a lower administrative distance than OSPF.
- DThe router drops the packet because 172.16.10.68 is the broadcast address for the 172.16.10.64/27 subnet.
Answer
The router selects the static route to 172.16.10.64/27 because it has the longest prefix match, and forwards the packet out GigabitEthernet0/2 toward next-hop 10.1.1.3.
When forwarding a packet, a router compares the destination IP address against all known routes and chooses the entry with the longest prefix match (most specific netmask). The subnet 172.16.10.64/27 has a 27-bit mask, making it the longest match among the candidates. Consequently, the router routes the packet out GigabitEthernet0/2 to next-hop 10.1.1.3.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic & Longest Prefix Match