Refer to the following partial IPv4 routing table output from a Cisco router:
text
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
O 172.16.0.0/16 [110/50] via 10.1.1.1, 01:14:22, GigabitEthernet0/0/1
D 172.16.35.0/24 [90/2172416] via 10.2.2.2, 00:42:10, GigabitEthernet0/0/2
S 172.16.35.32/27 [1/0] via 10.3.3.3
O 172.16.35.40/29 [110/30] via 10.4.4.4, 00:08:15, GigabitEthernet0/0/3
A packet with a destination IP address of arrives at the router. Which two statements correctly describe how the router makes its forwarding decision for this packet? (Select two.)
- The router forwards the packet to next-hop 10.4.4.4 because 172.16.35.40/29 provides the longest matching prefix for the destination address.Answer
- BThe router forwards the packet to next-hop 10.3.3.3 because static routes take precedence over OSPF routes regardless of subnet prefix length.
- Administrative distance is evaluated only after the router identifies all candidate routes that share the longest matching prefix length.Answer
- DThe router drops the packet because 172.16.35.42 is the direct broadcast address for the 172.16.35.40/29 subnet.
Answer
The router forwards the packet to next-hop 10.4.4.4 because 172.16.35.40/29 is the longest matching prefix, and administrative distance is evaluated only after determining candidate routes with the longest matching prefix length.
When a router receives a packet, it compares the destination IP against all entries in its routing table and selects the entry with the longest prefix match (most specific mask). Here, 172.16.35.40/29 matches 29 bits of the destination address 172.16.35.42, making it more specific than the /27 static route or /24 EIGRP route. Administrative distance is only evaluated when choosing among routes with identical prefix lengths.
Step-by-Step Solution
Key Concept
Longest Prefix Match (LPM) Rule in Cisco IPv4 Forwarding Logic
Estimated Time:1m 30s