Soru

Zorluk: OrtaRouter Forwarding Decision Logic

Refer to the following excerpt from a Cisco router's IPv4 routing table:

text
Gateway of last resort is 10.0.0.1 to network 0.0.0.0

O 192.168.10.0/24 [110/20] via 10.1.1.1, 00:05:12, GigabitEthernet0/0
D 192.168.10.32/28 [90/307200] via 10.2.2.2, 00:12:44, GigabitEthernet0/1
S 192.168.10.32/27 [1/0] via 10.3.3.3, 01:00:15, GigabitEthernet0/2
S* 0.0.0.0/0 [1/0] via 10.0.0.1, 02:15:00, GigabitEthernet0/3

Which next-hop IP address will the router select to forward a packet addressed to 192.168.10.38?

  1. 10.2.2.2Cevap
  2. B
    10.3.3.3
  3. C
    10.1.1.1
  4. D
    10.0.0.1

Cevap

10.2.2.2
When an IP packet arrives, the router compares the destination address against all routing table entries. The route with the longest matching prefix (most specific subnet mask) is selected. Here, 192.168.10.32/28 has a prefix length of 28 bits, which is longer than /27, /24, or /0. Therefore, the router forwards the packet to 10.2.2.2.

Adım Adım Çözüm

1
Identify all candidate routes that encompass the target IP address 192.168.10.38
Candidate routes are 192.168.10.0/24 (range .0 - .255), 192.168.10.32/27 (range .32 - .63), 192.168.10.32/28 (range .32 - .47), and 0.0.0.0/0.
Routing decisions are evaluated by first determining which entries contain the destination host IP.
2
Apply the Longest Prefix Match (LPM) rule among valid candidate routes
192.168.10.32/28 has the longest subnet mask length (/28 > /27 > /24 > /0).
Routers always prefer the most specific route (longest prefix length) regardless of protocol or administrative distance.
3
Determine the next-hop IP associated with the winning prefix
The entry 192.168.10.32/28 forwards via next-hop IP 10.2.2.2.
The matching routing table entry explicitly specifies 10.2.2.2 as its next-hop.

Anahtar Kavram

Longest Prefix Match (LPM)
Tahmini Süre:1m 30s
Bu soruyu puanla