A core router receives an IP packet destined for host address . The router's routing table contains the following matching entries:
| Type | Destination Subnet | Administrative Distance / Metric | Next-Hop Interface |
|---|---|---|---|
| Static | |||
| BGP | |||
| OSPF | |||
| RIPv2 |
Based on standard Layer 3 forwarding logic, to which next-hop IP address will the router forward the packet?
- Cevap
- B
- C
- D
Cevap
The router forwards the packet to next-hop 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 (, ) is the most specific route to . Longest prefix match takes precedence over administrative distance and metric values during packet forwarding decisions. Therefore, the router forwards traffic to next-hop .
Adım Adım Çözüm
Anahtar Kavram
Longest Prefix Match (LPM) routing table lookup hierarchy
Tahmini Süre:2m 0s