Question

Difficulty: HardRouter Forwarding Decision Logic

Refer to the following partial IPv4 routing table output from a Cisco router:

text
Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 4 subnets, 4 masks
O 10.88.164.32/28 [110/50] via 192.168.12.2, 00:14:22, GigabitEthernet0/0/1
D 10.88.164.0/25 [90/307200] via 192.168.23.3, 01:45:10, GigabitEthernet0/0/2
S 10.88.160.0/20 [1/0] via 192.168.34.4, 12:00:05, GigabitEthernet0/0/3
R 10.88.164.32/29 [120/2] via 192.168.45.5, 00:00:18, GigabitEthernet0/0/4

A packet with destination IP address 10.88.164.3710.88.164.37 arrives at the router. Which two statements correctly describe how the router processes and forwards this packet?

  1. The router forwards the packet via next-hop 192.168.45.5 out interface GigabitEthernet0/0/4.Answer
  2. Longest prefix match is evaluated prior to administrative distance and routing protocol metric.Answer
  3. C
    The router forwards the packet via next-hop 192.168.34.4 because static routes take precedence due to an administrative distance of 1.
  4. D
    The router forwards the packet via next-hop 192.168.23.3 because EIGRP routes are preferred over RIP and OSPF routes.

Answer

The router forwards the packet via next-hop 192.168.45.5 out GigabitEthernet0/0/4, because longest prefix match is evaluated before administrative distance and metric.
When a router receives an IP packet, it searches its routing table for routes that enclose the destination IP address. If multiple routes match, the router strictly selects the route with the longest prefix mask (most specific network mask). Here, 10.88.164.32/29 matches 10.88.164.37 with 29 bits of match, which is longer than /28, /25, or /20. Therefore, the router forwards the packet to 192.168.45.5 via GigabitEthernet0/0/4. Administrative distance and metrics are never considered across different prefix lengths.

Step-by-Step Solution

1
Determine subnet ranges for all matching candidate routes in the routing table for destination IP 10.88.164.37.
Candidate 1: 10.88.164.32/28 (10.88.164.32–10.88.164.47, prefix /28). Candidate 2: 10.88.164.0/25 (10.88.164.0–10.88.164.127, prefix /25). Candidate 3: 10.88.160.0/20 (10.88.160.0–10.88.175.255, prefix /20). Candidate 4: 10.88.164.32/29 (10.88.164.32–10.88.164.39, prefix /29). All 4 routes match destination 10.88.164.37.
A route is a candidate match if the target IP falls anywhere within its subnet block.
2
Apply the Longest Prefix Match (LPM) rule by comparing the subnet mask prefix lengths.
The prefix lengths are /20, /25, /28, and /29. The /29 route (10.88.164.32/29) has the highest number of matching network bits.
In Cisco IOS forwarding logic, the router always selects the route with the longest prefix match regardless of administrative distance or metric.
3
Identify the egress path associated with the winning route.
The 10.88.164.32/29 route points to next-hop IP 192.168.45.5 out interface GigabitEthernet0/0/4.
The packet is forwarded according to the forwarding table details bound to the longest matching route.

Key Concept

Router Forwarding Decision Logic & Longest Prefix Match (LPM)
Estimated Time:2m 0s
Rate this question