Question

Difficulty: MediumRouting Table Components

An enterprise router has populated its IPv4 routing table with the following entries:

text
D 10.50.0.0/16 [90/2560512] via 10.1.1.1, 01:12:40, GigabitEthernet0/0
O 10.50.12.0/24 [110/20] via 10.1.1.2, 00:45:12, GigabitEthernet0/1
S 10.50.12.80/28 [1/0] via 10.1.1.3
S 10.50.12.80/29 [250/0] via 10.1.1.4

The router receives a packet with a destination IP address of 10.50.12.8510.50.12.85. Which next-hop IP address will the router select to forward this packet?

  1. 10.1.1.4Answer
  2. B
    10.1.1.3
  3. C
    10.1.1.1
  4. D
    10.1.1.2

Answer

10.1.1.4 via the longest prefix match route 10.50.12.80/29
When a router processes a packet destination address, it searches the routing table for all matching network prefixes and selects the route with the longest prefix length (most specific mask). The destination address 10.50.12.85 falls within the range 10.50.12.80 - 10.50.12.87 defined by 10.50.12.80/29. Because /29 is longer than /28, /24, and /16, the router forwards the packet using the next-hop 10.1.1.4 regardless of its high administrative distance value of 250.

Step-by-Step Solution

1
Determine which routing table entries match the destination IP address 10.50.12.85.
All four entries (10.50.0.0/16, 10.50.12.0/24, 10.50.12.80/28, and 10.50.12.80/29) contain the IP address 10.50.12.85 within their subnet range.
10.50.12.80/29 spans 10.50.12.80 through 10.50.12.87, which includes 10.50.12.85.
2
Compare the prefix lengths (subnet masks) of all matching entries.
/29 is longer (more specific) than /28, /24, and /16.
Cisco routers use the Longest Prefix Match (LPM) rule as the primary criteria for forwarding decisions.
3
Identify the next-hop address associated with the longest matching prefix.
The route 10.50.12.80/29 points to next-hop 10.1.1.4.
Administrative distance is only evaluated when comparing routes with identical prefix lengths from different sources, not when selecting among matching routes of varying prefix lengths.

Key Concept

Longest Prefix Match (LPM) rule in IPv4 routing decision logic
Estimated Time:1m 15s
Rate this question