Soru

Zorluk: KolayRouting Table Components

Examine the following IPv4 routing table output from a Cisco router:

text
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Gateway of last resort is not set

192.168.10.0/24 is subnetted, 3 subnets
O 192.168.10.0/24 [110/20] via 10.1.1.1, 00:05:12, GigabitEthernet0/0
D 192.168.10.0/28 [90/307200] via 10.1.1.2, 00:12:45, GigabitEthernet0/1
S 192.168.10.0/26 [1/0] via 10.1.1.3

The router receives a packet destined for IP address 192.168.10.14. Which next-hop IP address will the router use to forward this packet?

  1. 10.1.1.2Cevap
  2. B
    10.1.1.3
  3. C
    10.1.1.1
  4. D
    0.0.0.0

Cevap

The router forwards the packet to next-hop address 10.1.1.2 because 192.168.10.0/28 is the longest prefix match for destination IP address 192.168.10.14.
When a router receives a packet, it compares the destination IP address against all entries in its routing table and selects the route with the most specific match (longest subnet mask length). Destination IP 192.168.10.14 matches the /24, /26, and /28 prefixes. Because /28 is the longest prefix mask (255.255.255.240), the router uses the route pointing to next-hop 10.1.1.2.

Adım Adım Çözüm

1
Evaluate all routing table entries to determine which prefixes contain destination IP 192.168.10.14.
The IP address 192.168.10.14 falls within 192.168.10.0/24 (host range .1 to .254), 192.168.10.0/26 (host range .1 to .62), and 192.168.10.0/28 (host range .1 to .14).
Before comparing protocol metrics or administrative distance, the router must identify all candidate routes matching the destination IP.
2
Apply the Longest Prefix Match (LPM) rule by comparing the subnet mask lengths of matching routes.
The prefix length /28 is longer (more specific) than /26 and /24.
Cisco routers always prefer the route with the longest matching prefix length regardless of administrative distance or metric.
3
Identify the next-hop address associated with the chosen /28 route entry.
The entry 'D 192.168.10.0/28 ... via 10.1.1.2' specifies next-hop 10.1.1.2.
The forwarding decision uses the next-hop IP associated with the longest matching route entry.

Anahtar Kavram

Longest Prefix Match Rule
Bu soruyu puanla