Soru

Zorluk: ZorRouting Concepts and Dynamic Routing Protocols

A core router receives an IP packet destined for host address 192.168.88.77192.168.88.77. The router's routing table contains the following matching entries:

TypeDestination SubnetAdministrative Distance / MetricNext-Hop Interface
Static192.168.88.0/24192.168.88.0/24[1/0][1/0]10.0.0.110.0.0.1
BGP192.168.0.0/16192.168.0.0/16[20/100][20/100]10.0.0.210.0.0.2
OSPF192.168.88.64/26192.168.88.64/26[110/15][110/15]10.0.0.310.0.0.3
RIPv2192.168.88.72/29192.168.88.72/29[120/3][120/3]10.0.0.410.0.0.4

Based on standard Layer 3 forwarding logic, to which next-hop IP address will the router forward the packet?

  1. 10.0.0.410.0.0.4Cevap
  2. B
    10.0.0.110.0.0.1
  3. C
    10.0.0.210.0.0.2
  4. D
    10.0.0.310.0.0.3

Cevap

The router forwards the packet to next-hop 10.0.0.410.0.0.4 based on the Longest Prefix Match rule.
When a router performs a forwarding lookup for a destination IP, it evaluates the prefix length of all matching routes in the routing table. The route with the longest matching prefix mask (/29/29, 192.168.88.72/29192.168.88.72/29) is the most specific route to 192.168.88.77192.168.88.77. Longest prefix match takes precedence over administrative distance and metric values during packet forwarding decisions. Therefore, the router forwards traffic to next-hop 10.0.0.410.0.0.4.

Adım Adım Çözüm

1
Determine which subnets contain the target IP address 192.168.88.77192.168.88.77.
The target address matches all four entries: 192.168.88.0/24192.168.88.0/24, 192.168.0.0/16192.168.0.0/16, 192.168.88.64/26192.168.88.64/26 (range .64.64.127.127), and 192.168.88.72/29192.168.88.72/29 (range .72.72.79.79).
All four routing entries encompass the destination IP address.
2
Compare the prefix lengths (subnet mask specificity) of all matching routes.
The prefix lengths are /16/16, /24/24, /26/26, and /29/29. The longest (most specific) prefix match is /29/29.
Routers evaluate the Longest Prefix Match (LPM) first when selecting a path from the routing table.
3
Select the next-hop associated with the longest prefix match.
The route for 192.168.88.72/29192.168.88.72/29 points to next-hop 10.0.0.410.0.0.4.
Administrative distance and metric are only used to compare identical prefix destinations from different sources, not routes with different prefix lengths.

Anahtar Kavram

Longest Prefix Match (LPM) routing table lookup hierarchy
Tahmini Süre:2m 0s
Bu soruyu puanla