Soru

Zorluk: Çok zorRouting Concepts and Dynamic Routing Protocols

A core border router receives an IP packet destined for host address 10.20.105.4210.20.105.42. The router's active routing table contains four operational candidate entries that match this target network space:

1. Static route to 10.20.96.0/1910.20.96.0/19 via next-hop 172.16.1.1172.16.1.1 (Administrative Distance: 11)
2. OSPF route to 10.20.104.0/2110.20.104.0/21 via next-hop 172.16.2.1172.16.2.1 (Administrative Distance: 110110, Metric: 2020)
3. Internal EIGRP route to 10.20.104.0/2210.20.104.0/22 via next-hop 172.16.3.1172.16.3.1 (Administrative Distance: 9090, Metric: 1515)
4. External BGP route to 10.20.0.0/1610.20.0.0/16 via next-hop 172.16.4.1172.16.4.1 (Administrative Distance: 2020, Metric: 100100)

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

  1. A
    172.16.1.1, because static routes possess the lowest administrative distance among all matching table entries
  2. 172.16.3.1, because the /22 subnet mask provides the longest matching prefix for the destination addressCevap
  3. C
    172.16.4.1, because BGP exterior gateway routes take precedence over interior routing protocols when crossing autonomous system boundaries
  4. D
    172.16.2.1, because OSPF link-state metrics are preferred over distance-vector summary calculations

Cevap

172.16.3.1, because the /22 subnet mask provides the longest matching prefix for the destination address.
The fundamental decision rule for IPv4/IPv6 packet forwarding is Longest Prefix Match (LPM). When a router consults its forwarding table, it selects the route with the most specific (longest) subnet mask that covers the target IP address. Here, host address 10.20.105.4210.20.105.42 falls within all four candidate ranges, but /22/22 (22 matching network bits) is more specific than /21/21, /19/19, or /16/16. Consequently, the router routes to next-hop 172.16.3.1172.16.3.1 without evaluating Administrative Distance or protocol metrics.

Adım Adım Çözüm

1
Determine which routing entries encompass the destination IP address 10.20.105.42
All four entries match: 10.20.0.0/16 (10.20.0.0 - 10.20.255.255), 10.20.96.0/19 (10.20.96.0 - 10.20.127.255), 10.20.104.0/21 (10.20.104.0 - 10.20.111.255), and 10.20.104.0/22 (10.20.104.0 - 10.20.107.255).
Before comparing routing metrics, all matching candidate prefixes must be identified.
2
Apply the Longest Prefix Match (LPM) rule across all valid matches
The prefix length of /22 (22 matching network bits) is the most specific subnet mask compared to /21, /19, and /16.
Routers always evaluate prefix specificity first; Administrative Distance (AD) and metric are only compared when two identical prefix lengths exist from different sources.
3
Select the next-hop associated with the longest prefix entry
The entry 10.20.104.0/22 points to next-hop 172.16.3.1.
Because /22 has the highest number of matching bits, the router immediately forwards the packet to 172.16.3.1.

Anahtar Kavram

Longest Prefix Match (LPM) Routing Precedence
Bu soruyu puanla