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 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 10.150.24.4010.150.24.40. Which two statements accurately describe how the router makes its forwarding decision for this packet?

  1. The packet is forwarded out interface GigabitEthernet0/2 because 10.150.24.32/28 has the longest prefix match for the destination address.Answer
  2. The router compares subnet mask lengths prior to evaluating Administrative Distance values across candidate routes.Answer
  3. C
    The packet is forwarded out interface GigabitEthernet0/0 because EIGRP has a lower Administrative Distance than OSPF for the 10.150.24.0 subnet.
  4. D
    The 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

1
Determine which routes match the destination IP address 10.150.24.40.
Matching routes are 10.150.24.0/24, 10.150.24.0/26, 10.150.24.32/28, and default route 0.0.0.0/0.
The destination address 10.150.24.40 falls into the address ranges of all four listed routes.
2
Apply the Longest Prefix Match (LPM) rule across all matching routes.
10.150.24.32/28 has a 28-bit mask length, which is the most specific match compared to /26, /24, and /0.
Routers always prefer the route with the highest number of matching leading network bits (longest prefix).
3
Determine the egress interface and next-hop for the winning route 10.150.24.32/28.
The packet will be forwarded to next-hop 10.3.3.2 via interface GigabitEthernet0/2.
The routing table explicitly points the static route 10.150.24.32/28 out interface GigabitEthernet0/2.

Key Concept

Router Forwarding Decision Logic and Longest Prefix Match precedence
Rate this question