Soru

Zorluk: OrtaRouter Forwarding Decision Logic

A Cisco router receives an IP packet destined for 10.20.12.15010.20.12.150. Refer to the following routing table output:

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

Gateway of last resort is 10.1.1.1 to network 0.0.0.0

D 10.20.0.0/14 [90/2172416] via 192.168.1.2, GigabitEthernet0/1
O 10.20.12.0/22 [110/20] via 192.168.1.6, GigabitEthernet0/2
S 10.20.12.0/24 [1/0] via 192.168.1.10, GigabitEthernet0/3
O 10.20.12.128/25 [110/30] via 192.168.1.14, GigabitEthernet0/4
S* 0.0.0.0/0 [1/0] via 10.1.1.1, GigabitEthernet0/0

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

  1. 192.168.1.14Cevap
  2. B
    192.168.1.10
  3. C
    192.168.1.6
  4. D
    10.1.1.1

Cevap

The router forwards the packet to next-hop IP 192.168.1.14 because the route 10.20.12.128/25 has the longest prefix match for destination 10.20.12.150.
When forwarding IP packets, a Cisco router always prioritizes the route with the Longest Prefix Match (most specific subnet mask). The destination address 10.20.12.150 falls within the range 10.20.12.128 to 10.20.12.255 defined by 10.20.12.128/25. Because /25 is more specific than /24, /22, /14, or /0, the router uses this route, which forwards to next-hop 192.168.1.14.

Adım Adım Çözüm

1
Identify all candidate routes that encompass the destination IP address 10.20.12.150.
Candidate routes are 10.20.0.0/14, 10.20.12.0/22, 10.20.12.0/24, 10.20.12.128/25, and 0.0.0.0/0.
The router evaluates destination IP bit alignment against subnet masks of all known routes.
2
Compare the prefix lengths of all matching candidate routes.
Prefix lengths are /14, /22, /24, /25, and /0. The route 10.20.12.128/25 has the longest prefix mask (/25).
Routers use the Longest Prefix Match (LPM) logic first before considering Administrative Distance or Metric.
3
Select the next-hop IP associated with the longest prefix match route.
The route 10.20.12.128/25 points to next-hop 192.168.1.14.
Longest prefix match determines the exact routing entry used for forwarding.

Anahtar Kavram

Longest Prefix Match (LPM) precedence in IP forwarding decision logic.
Bu soruyu puanla