Soru

Zorluk: KolayRouting Table Components

A Cisco router receives an IPv4 packet destined for 10.25.8.1210.25.8.12. The router inspects its routing table and finds the following matching route entries:

text
S 10.25.0.0/16 [1/0] via 172.16.1.1
O 10.25.8.0/23 [110/30] via 172.16.2.1
D 10.25.8.0/27 [90/2170112] via 172.16.3.1
S* 0.0.0.0/0 [1/0] via 172.16.0.1

Which next-hop IP address will the router choose to forward this packet?

  1. 172.16.3.1Cevap
  2. B
    172.16.1.1
  3. C
    172.16.2.1
  4. D
    172.16.0.1

Cevap

The router will forward the packet to next-hop 172.16.3.1 based on the longest prefix match rule.
The destination IP address 10.25.8.12 falls within the subnet range of 10.25.8.0/27 (10.25.8.0 to 10.25.8.31). Because /27 has the largest prefix length among all matching routes (/27 > /23 > /16 > /0), the router uses this route and forwards the packet to 172.16.3.1.

Adım Adım Çözüm

1
Evaluate which subnet prefixes match the destination IP address 10.25.8.12.
The destination address 10.25.8.12 matches 10.25.0.0/16, 10.25.8.0/23 (range 10.25.8.0–10.25.9.255), 10.25.8.0/27 (range 10.25.8.0–10.25.8.31), and 0.0.0.0/0.
Before making a forwarding decision, all matching routing entries must be identified.
2
Compare the prefix lengths of all matching routes to determine the most specific route.
The prefix length of /27 is longer (more specific) than /23, /16, and /0.
Cisco routers always prefer the route with the longest prefix match (most specific subnet mask), regardless of administrative distance or routing protocol metric.
3
Identify the next-hop address associated with the longest prefix route entry.
The entry 10.25.8.0/27 specifies the next-hop address 172.16.3.1.
The forwarding engine forwards the traffic out to the next-hop specified by the winning route.

Anahtar Kavram

Longest Prefix Match (LPM) Rule
Bu soruyu puanla