Soru

Zorluk: ZorRouting Table Components

An engineer is troubleshooting IPv4 packet forwarding on a Cisco router. The router receives a packet with a destination IP address of 172.28.64.99172.28.64.99. The active routing table contains the following entries:

text
S 172.28.0.0/16 [1/0] via 10.1.1.1
O 172.28.64.0/20 [110/20] via 10.2.2.2
D 172.28.64.64/26 [90/307200] via 10.3.3.3
B 172.28.64.96/28 [20/0] via 10.4.4.4

Which next-hop IP address will the router use to forward the packet, and what is the primary routing logic behind this decision?

  1. A
    Next-hop 10.1.1.1, because static routes have the lowest administrative distance (1) among all matching candidate routes.
  2. B
    Next-hop 10.2.2.2, because OSPF metric 20 is lower than the metric of the longest prefix route.
  3. C
    Next-hop 10.3.3.3, because EIGRP has a lower administrative distance (90) than OSPF (110) for internal subnets.
  4. Next-hop 10.4.4.4, because 172.28.64.96/28 provides the longest prefix match for destination 172.28.64.99.Cevap

Cevap

The router forwards the packet to next-hop 10.4.4.4 because 172.28.64.96/28 provides the longest prefix match for the destination address 172.28.64.99.
When a router makes a packet forwarding decision, it compares the destination IP address against all routes in the routing table and selects the route with the most specific match (the longest subnet mask length / prefix length). Destination 172.28.64.99 falls into 172.28.64.96/28 (range 172.28.64.96 - 172.28.64.111). Because /28 is the longest matching mask (28 bits), it takes absolute priority over the /26, /20, and /16 matches, directing traffic to next-hop 10.4.4.4.

Adım Adım Çözüm

1
Determine which subnets match the destination IP address 172.28.64.99.
All four routes cover the destination address: 172.28.0.0/16 (172.28.0.0-172.28.255.255), 172.28.64.0/20 (172.28.64.0-172.28.79.255), 172.28.64.64/26 (172.28.64.64-172.28.64.127), and 172.28.64.96/28 (172.28.64.96-172.28.64.111).
Before comparing routing attributes, the router identifies candidate routes whose subnet ranges contain the target IP.
2
Apply the Longest Prefix Match (LPM) rule.
The prefix 172.28.64.96/28 has a mask length of 28 bits, which is greater than /26, /20, or /16.
Routers always prefer the most specific route (longest subnet mask / longest matching prefix) regardless of administrative distance or metric.
3
Identify the next-hop IP associated with the winning route.
The route 172.28.64.96/28 specifies next-hop 10.4.4.4.
The packet is forwarded to the next-hop IP corresponding to the most specific matching prefix entry.

Anahtar Kavram

Longest Prefix Match (LPM) in IP Routing Forwarding Decisions
Bu soruyu puanla