Question

Difficulty: EasyRouter Forwarding Decision Logic

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

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

O 172.16.10.0/24 [110/20] via 10.1.1.1, GigabitEthernet0/0
D 172.16.10.64/26 [90/307200] via 10.1.1.2, GigabitEthernet0/1
S 172.16.10.64/27 [1/0] via 10.1.1.3, GigabitEthernet0/2

The router receives an IP packet with a destination IP address of 172.16.10.68. Which statements correctly describe how the router handles this forwarding decision? (Select TWO.)

  1. The router selects the static route to 172.16.10.64/27 because it has the longest prefix match for the destination address.Answer
  2. The packet is forwarded out interface GigabitEthernet0/2 toward next-hop IP address 10.1.1.3.Answer
  3. C
    The router selects the EIGRP route to 172.16.10.64/26 because EIGRP has a lower administrative distance than OSPF.
  4. D
    The router drops the packet because 172.16.10.68 is the broadcast address for the 172.16.10.64/27 subnet.

Answer

The router selects the static route to 172.16.10.64/27 because it has the longest prefix match, and forwards the packet out GigabitEthernet0/2 toward next-hop 10.1.1.3.
When forwarding a packet, a router compares the destination IP address against all known routes and chooses the entry with the longest prefix match (most specific netmask). The subnet 172.16.10.64/27 has a 27-bit mask, making it the longest match among the candidates. Consequently, the router routes the packet out GigabitEthernet0/2 to next-hop 10.1.1.3.

Step-by-Step Solution

1
Evaluate destination host IP against candidate subnet ranges in the routing table.
Destination 172.16.10.68 matches 172.16.10.0/24, 172.16.10.64/26, and 172.16.10.64/27.
All three routes encompass the target address within their subnet ranges.
2
Apply the Longest Prefix Match (LPM) rule.
172.16.10.64/27 has a 27-bit mask, which is longer than /26 and /24.
Routers always prefer the route with the most specific (longest) subnet mask first, regardless of administrative distance or metric.
3
Determine the forwarding action based on the selected route entry.
The route specifies exit interface GigabitEthernet0/2 and next-hop 10.1.1.3.
The router forwards the packet using the egress interface and next-hop associated with the winning LPM route.

Key Concept

Router Forwarding Decision Logic & Longest Prefix Match
Rate this question