Question

Difficulty: MediumIPv4 Static Routing

A Cisco router's IPv4 routing table contains four active static routes to various destination networks:

- `ip route 0.0.0.0 0.0.0.0 192.168.1.4`
- `ip route 10.10.0.0 255.255.0.0 192.168.1.1`
- `ip route 10.10.4.0 255.255.255.0 192.168.1.2`
- `ip route 10.10.4.16 255.255.255.240 192.168.1.3 110`

When the router receives an IP packet destined for 10.10.4.2510.10.4.25, which next-hop IP address will the router select to forward the packet?

  1. 192.168.1.3Answer
  2. B
    192.168.1.2
  3. C
    192.168.1.1
  4. D
    192.168.1.4

Answer

192.168.1.3 is selected because 10.10.4.16/28 provides the longest matching subnet mask for the destination address 10.10.4.25.
When a router makes a packet forwarding decision, it compares the destination IP address (10.10.4.2510.10.4.25) against all installed routes in its routing table and selects the route with the most specific match (longest subnet mask). The destination address falls into the subnet 10.10.4.16/2810.10.4.16/28 (10.10.4.1610.10.4.16 to 10.10.4.3110.10.4.31). Since /28/28 is longer than /24/24, /16/16, and /0/0, the router selects this entry and forwards the packet to next-hop 192.168.1.3192.168.1.3. Administrative Distance is irrelevant during the actual lookup phase of already-installed routes.

Step-by-Step Solution

1
Analyze the destination IPv4 address against all routing table entries
Destination 10.10.4.25 matches four routes: 0.0.0.0/0, 10.10.0.0/16, 10.10.4.0/24, and 10.10.4.16/28 (range 10.10.4.16 - 10.10.4.31).
Routing lookup evaluates all routes installed in the routing table to find candidates.
2
Apply the Longest Prefix Match (LPM) rule to select the forwarding route
The /28 subnet mask is longer and more specific than /24, /16, or /0.
Routers always forward packets based on the longest matching prefix length regardless of Administrative Distance.
3
Determine the next-hop IPv4 address associated with the selected route
The 10.10.4.16/28 route points to next-hop 192.168.1.3.
The packet is forwarded to the next-hop IP associated with the winning prefix match.

Key Concept

Longest Prefix Match forwarding decision logic in IPv4 Routing
Rate this question