Question

Difficulty: MediumRouter Forwarding Decision Logic

An enterprise router with default settings maintains the following simplified IPv4 routing table excerpt:

text
Codes: C - connected, S - static, O - OSPF

O 10.12.0.0/16 [110/20] via 172.16.1.1, 00:15:30, GigabitEthernet0/0
S 10.12.32.0/20 [1/0] via 172.16.2.1, GigabitEthernet0/1
O 10.12.32.0/24 [110/50] via 172.16.3.1, 00:08:12, GigabitEthernet0/2
S 10.12.32.16/28 [200/0] via 172.16.4.1, GigabitEthernet0/3

The router receives an IP packet addressed to destination 10.12.32.2210.12.32.22. Which two statements correctly describe how the router processes and forwards this packet?

  1. The router forwards the packet out GigabitEthernet0/3 toward next-hop 172.16.4.1 because the /28 route provides the longest prefix match.Answer
  2. The router evaluates prefix length before administrative distance, ignoring lower administrative distance values on broader subnets.Answer
  3. C
    The router forwards the packet out GigabitEthernet0/1 because static routes with an Administrative Distance of 1 take precedence over Administrative Distance 200.
  4. D
    The packet matches 10.12.32.0/24 via GigabitEthernet0/2 because host address 10.12.32.22 is outside the valid usable host range of the /28 network.

Answer

The router forwards the packet out GigabitEthernet0/3 toward 172.16.4.1 using the longest prefix match (/28), and ignores lower administrative distance routes because prefix length comparison takes precedence over administrative distance.
When a router receives a packet, it searches its routing table for all matching prefixes and selects the route with the longest prefix match (most specific subnet mask). The destination address 10.12.32.22 matches four entries, but 10.12.32.16/28 has the longest prefix length (/28). Thus, the router forwards the packet via GigabitEthernet0/3. Administrative Distance is ignored when comparing different prefix lengths.

Step-by-Step Solution

1
Determine which routing table entries match the destination IP address 10.12.32.22.
The destination address matches four routes: 10.12.0.0/16, 10.12.32.0/20, 10.12.32.0/24, and 10.12.32.16/28 (host range 10.12.32.17 - 10.12.32.30).
All four network blocks encompass the destination IP 10.12.32.22.
2
Apply the Longest Prefix Match (LPM) rule.
The /28 prefix length is the longest (most specific) match among /16, /20, /24, and /28.
The router forwarding decision logic strictly prioritizes the route with the most matching network bits (longest subnet mask).
3
Evaluate the impact of Administrative Distance and Metric.
Administrative Distance (200 vs 1 vs 110) is not compared across different prefix lengths; the /28 route is selected regardless of AD.
Administrative Distance is only used to select between multiple routes to the exact same prefix length.

Key Concept

Router Forwarding Decision Logic (Longest Prefix Match)
Rate this question