Soru

Zorluk: OrtaRouter Forwarding Decision Logic

Refer to the exhibit displaying an abbreviated routing table for router R1:

text
Gateway of last resort is 192.168.4.1 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 192.168.4.1, Serial0/0/0
S 10.1.1.0/24 [1/0] via 192.168.1.1, GigabitEthernet0/0
D 10.1.1.64/26 [90/307200] via 192.168.2.1, GigabitEthernet0/1
O 10.1.1.64/28 [110/20] via 192.168.3.1, GigabitEthernet0/2

Router R1 receives an IP packet addressed to destination host 10.1.1.6710.1.1.67. Which next-hop IP address and outbound interface will R1 use to forward this packet?

  1. 192.168.3.1 via GigabitEthernet0/2Cevap
  2. B
    192.168.1.1 via GigabitEthernet0/0
  3. C
    192.168.2.1 via GigabitEthernet0/1
  4. D
    192.168.4.1 via Serial0/0/0

Cevap

192.168.3.1 via GigabitEthernet0/2
When forwarding a packet, a router first evaluates all routes in its routing table to find matches for the destination IP address. If multiple routes match, the router strictly enforces the Longest Prefix Match (LPM) rule. For destination IP 10.1.1.67, matching prefixes are /24, /26, and /28. The /28 prefix (10.1.1.64/28) is the longest match. Therefore, R1 forwards the packet to next-hop 192.168.3.1 via interface GigabitEthernet0/2, completely ignoring Administrative Distance when prefix lengths differ.

Adım Adım Çözüm

1
Determine subnet ranges for matching routes in the routing table for destination IP 10.1.1.6710.1.1.67
The IP 10.1.1.6710.1.1.67 matches three specific routes: 10.1.1.0/24 (range .0 to .255), 10.1.1.64/26 (range .64 to .127), and 10.1.1.64/28 (range .64 to .79), as well as the default route 0.0.0.0/0.
Before comparing routing protocols or metrics, a router determines which routes encompass the destination IP address.
2
Compare matching prefix lengths to apply the Longest Prefix Match (LPM) rule
Prefix lengths are /24, /26, and /28. The /28 prefix length is the longest (most specific) match.
Cisco routers always prefer the route with the longest matching subnet mask (/28 > /26 > /24 > /0) regardless of Administrative Distance or Metric.
3
Identify the next-hop IP address and egress interface for the winning /28 route
The route `10.1.1.64/28` points to next-hop IP `192.168.3.1` out interface `GigabitEthernet0/2`.
The parameters associated with the longest prefix match determine the forwarding destination for the packet.

Anahtar Kavram

Router Forwarding Decision Logic & Longest Prefix Match (LPM)
Tahmini Süre:1m 30s
Bu soruyu puanla