Refer to the following partial IPv4 routing table output from a Cisco router:
text
Gateway of last resort is 172.16.1.1 to network 0.0.0.0
D 10.50.0.0/16 [90/2170112] via 192.168.12.2, GigabitEthernet0/0
O 10.50.10.0/24 [110/20] via 192.168.23.2, GigabitEthernet0/1
S 10.50.10.16/28 [1/0] via 192.168.34.2
O 10.50.10.16/30 [110/10] via 192.168.45.2, GigabitEthernet0/3
S* 0.0.0.0/0 [1/0] via 172.16.1.1
The router receives a packet destined for IPv4 address . Which two statements correctly describe how the router processes this packet? (Select two.)
- The router forwards the packet to next-hop 192.168.45.2 out interface GigabitEthernet0/3 because 10.50.10.16/30 has the longest matching subnet mask.Answer
- Administrative distance is not compared because the matching routes have different prefix lengths.Answer
- CThe router forwards the packet to next-hop 192.168.34.2 because the static route has a lower administrative distance (AD = 1) than the OSPF route.
- DThe router drops the packet because 10.50.10.18 is the subnet broadcast address for the 10.50.10.16/30 network.
- EThe router forwards the packet using the default route 172.16.1.1 because multiple conflicting dynamic and static routes exist in the routing table.
Answer
The router forwards the packet to next-hop 192.168.45.2 out GigabitEthernet0/3 because 10.50.10.16/30 provides the longest prefix match, and administrative distance is not evaluated across different prefix lengths.
When a router receives an IP packet, it compares the destination IP address against all entries in its routing table. The rule of Longest Prefix Match (LPM) states that the entry with the highest number of matching network bits (longest subnet mask) is selected. Here, 10.50.10.16/30 matches 30 bits of the address 10.50.10.18, making it the most specific match. Administrative Distance is only compared when identical destination prefixes are learned via different protocols; because prefix lengths differ here, AD is not evaluated.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic and Longest Prefix Match