Refer to the following partial IPv4 routing table output from a Cisco router:
text
Gateway of last resort is 10.10.10.1 to network 0.0.0.0
D 10.150.24.0/26 [90/307200] via 10.1.1.2, 00:15:10, GigabitEthernet0/0
O 10.150.24.0/24 [110/20] via 10.2.2.2, 01:20:45, GigabitEthernet0/1
S 10.150.24.32/28 [1/0] via 10.3.3.2, 02:04:12, GigabitEthernet0/2
S* 0.0.0.0/0 [1/0] via 10.10.10.1, 12:00:00, GigabitEthernet0/3
The router receives an IPv4 packet destined for host . Which two statements accurately describe how the router makes its forwarding decision for this packet?
- The packet is forwarded out interface GigabitEthernet0/2 because 10.150.24.32/28 has the longest prefix match for the destination address.Answer
- The router compares subnet mask lengths prior to evaluating Administrative Distance values across candidate routes.Answer
- CThe packet is forwarded out interface GigabitEthernet0/0 because EIGRP has a lower Administrative Distance than OSPF for the 10.150.24.0 subnet.
- DThe packet is dropped because 10.150.24.40 is the broadcast address of the 10.150.24.32/28 subnet and cannot be used as a unicast destination.
Answer
The router forwards the packet out interface GigabitEthernet0/2 because 10.150.24.32/28 represents the longest matching prefix for host 10.150.24.40, and prefix length evaluation strictly precedes Administrative Distance comparison.
When a router receives a packet, it searches its routing table for all matching prefixes and selects the route with the longest prefix length (most specific mask). The destination address 10.150.24.40 matches 10.150.24.32/28 (/28), 10.150.24.0/26 (/26), 10.150.24.0/24 (/24), and 0.0.0.0/0 (/0). Since /28 is the longest mask, the route via GigabitEthernet0/2 is chosen. The router checks prefix length before Administrative Distance or metric values.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic and Longest Prefix Match precedence