Question

Difficulty: MediumRouting Table Components

A Cisco router displays the following output from the command `show ip route`:

text
Gateway of last resort is not set

10.45.12.0/24 is variably subnetted, 4 subnets, 4 masks
O 10.45.12.0/25 [110/20] via 192.168.1.2, 00:14:22, GigabitEthernet0/0
D 10.45.12.64/26 [90/307200] via 192.168.2.2, 00:08:15, GigabitEthernet0/1
S 10.45.12.80/28 [1/0] via 192.168.3.2
O E2 10.45.12.88/30 [110/20] via 192.168.4.2, 00:02:10, GigabitEthernet0/3

The router receives an IP packet with a destination address of 10.45.12.8910.45.12.89. Which next-hop address and exit interface will the router select to forward this packet?

  1. 192.168.4.2 via GigabitEthernet0/3 because the /30 subnet mask provides the longest prefix match for the destination address.Answer
  2. B
    192.168.3.2 because static routes have an administrative distance of 1, taking priority over dynamic routing protocols.
  3. C
    192.168.2.2 via GigabitEthernet0/1 because EIGRP has a lower administrative distance (90) than OSPF (110).
  4. D
    192.168.1.2 via GigabitEthernet0/0 because intra-area OSPF routes are preferred over external OSPF (O E2) routes.

Answer

The router forwards the packet to next-hop address 192.168.4.2 via interface GigabitEthernet0/3 because 10.45.12.88/30 provides the longest prefix match.
When a router receives a packet, it compares the destination IP address against all entries in the routing table and forwards the packet using the route with the most specific subnet mask (longest prefix match). For destination 10.45.12.89, all four table entries encompass the address, but 10.45.12.88/30 has the longest prefix length (/30), making next-hop 192.168.4.2 via GigabitEthernet0/3 the correct path.

Step-by-Step Solution

1
Evaluate candidate routes matching destination IP 10.45.12.89
Destination 10.45.12.89 falls into: 10.45.12.0/25 (.0-.127), 10.45.12.64/26 (.64-.127), 10.45.12.80/28 (.80-.95), and 10.45.12.88/30 (.88-.91). All 4 entries are valid candidate routes.
Before selecting a route, the router identifies all entries in the IPv4 routing table whose network boundaries encompass the destination address.
2
Apply Longest Prefix Match (LPM) rule
The prefix lengths are /25, /26, /28, and /30. The /30 route has the most specific mask (longest matching network prefix length of 30 bits).
Routers always prioritize prefix specificity (longest mask length) over Administrative Distance (AD) or metric when determining forwarding decisions.
3
Identify corresponding next-hop and interface
The entry 10.45.12.88/30 specifies next-hop 192.168.4.2 via interface GigabitEthernet0/3.
The forwarding table uses the next-hop IP and outgoing interface tied directly to the winning LPM route.

Key Concept

Longest Prefix Match (LPM) Rule
Estimated Time:1m 15s
Rate this question