Soru

Zorluk: KolayRouter Forwarding Decision Logic

Refer to the following partial output from the show ip route command on a Cisco router:

text
Gateway of last resort is 10.1.1.1 to network 0.0.0.0

D 10.50.0.0/16 [90/307200] via 10.2.2.2, GigabitEthernet0/1
O 10.50.10.0/24 [110/20] via 10.3.3.3, GigabitEthernet0/2
S 10.50.10.64/26 [1/0] via 10.4.4.4, GigabitEthernet0/3
S* 0.0.0.0/0 [1/0] via 10.1.1.1, GigabitEthernet0/0

The router receives an IPv4 packet destined for host 10.50.10.75. Which next-hop IP address will the router choose to forward this packet?

  1. 10.4.4.4Cevap
  2. B
    10.3.3.3
  3. C
    10.2.2.2
  4. D
    10.1.1.1

Cevap

The router will select the next-hop IP address 10.4.4.4 associated with the longest prefix match route 10.50.10.64/26.
When a router performs a routing lookup for a packet destination IP, it checks for matching entries in the IP routing table and selects the route with the most specific match (the longest subnet mask). In this case, 10.50.10.75 matches 10.50.0.0/16, 10.50.10.0/24, and 10.50.10.64/26. The /26 prefix is the longest match, so the packet is forwarded via its next hop, 10.4.4.4.

Adım Adım Çözüm

1
Identify all routes in the routing table that match the destination IP address 10.50.10.75.
The IP address 10.50.10.75 matches three specific routes: 10.50.0.0/16, 10.50.10.0/24, and 10.50.10.64/26 (range: 10.50.10.64 to 10.50.10.127), plus the default route 0.0.0.0/0.
Routing lookup matches the destination address against all configured prefixes.
2
Compare the prefix lengths of all matching routes to determine the Longest Prefix Match (LPM).
Prefix lengths are /16, /24, /26, and /0. The longest prefix match is /26 (10.50.10.64/26).
Routers always prioritize the most specific matching route (longest subnet mask / prefix length) regardless of administrative distance or metric.
3
Determine the next-hop IP address associated with the longest matching prefix.
The route 10.50.10.64/26 points to the next hop 10.4.4.4.
The next-hop address specified by the LPM entry is used for packet forwarding.

Anahtar Kavram

Longest Prefix Match (LPM) Rule
Bu soruyu puanla