Question

Difficulty: MediumRouter Forwarding Decision Logic

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 10.50.10.1810.50.10.18. Which two statements correctly describe how the router processes this packet? (Select two.)

  1. 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
  2. Administrative distance is not compared because the matching routes have different prefix lengths.Answer
  3. C
    The 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.
  4. D
    The router drops the packet because 10.50.10.18 is the subnet broadcast address for the 10.50.10.16/30 network.
  5. E
    The 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

1
Identify all matching routes for the destination IP address 10.50.10.18.
The address matches four specific prefixes: 10.50.0.0/16, 10.50.10.0/24, 10.50.10.16/28, and 10.50.10.16/30, as well as the default route 0.0.0.0/0.
Before making a forwarding decision, a router evaluates all active entries in the routing table to find candidate routes.
2
Determine the Longest Prefix Match (LPM) among the candidate routes.
The prefix 10.50.10.16/30 has a 30-bit mask length, which is longer than /28, /24, /16, or /0.
A Cisco router always selects the route with the most specific (longest) subnet mask first, regardless of administrative distance or metric.
3
Verify if Administrative Distance (AD) comparisons are necessary.
Administrative distance comparison is bypassed because the prefix lengths of the matching routes differ.
Administrative distance is only evaluated when a router learns about the exact same destination prefix and mask length from multiple routing sources.

Key Concept

Router Forwarding Decision Logic and Longest Prefix Match
Rate this question