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 192.168.4.1 to network 0.0.0.0

S 10.1.4.0/24 [1/0] via 192.168.1.1
O 10.1.4.64/27 [110/20] via 192.168.2.1, 00:12:45, GigabitEthernet0/0/2
D 10.1.0.0/16 [90/307200] via 192.168.3.1, 01:45:10, GigabitEthernet0/0/3
S* 0.0.0.0/0 [1/0] via 192.168.4.1

The router receives an IP packet destined for 10.1.4.6710.1.4.67. Which next-hop IP address will the router select to forward this packet?

  1. 192.168.2.1Cevap
  2. B
    192.168.1.1
  3. C
    192.168.3.1
  4. D
    192.168.4.1

Cevap

The router forwards the packet to next-hop IP address 192.168.2.1.
The destination IPv4 address 10.1.4.6710.1.4.67 matches multiple routes in the routing table: 10.1.4.0/2410.1.4.0/24, 10.1.4.64/2710.1.4.64/27, 10.1.0.0/1610.1.0.0/16, and 0.0.0.0/00.0.0.0/0. Router forwarding decision logic dictates that the router will ALWAYS prefer the Longest Prefix Match (most specific subnet mask). Comparing mask lengths (/27 > /24 > /16 > /0), the route 10.1.4.64/2710.1.4.64/27 has the longest match. Therefore, the router forwards the packet to next-hop 192.168.2.1192.168.2.1.

Adım Adım Çözüm

1
Evaluate all routes matching the destination IP address 10.1.4.67.
Three matching routes found: 10.1.4.0/24 (prefix length 24), 10.1.4.64/27 (prefix length 27), and 10.1.0.0/16 (prefix length 16).
The subnet 10.1.4.64/27 covers IP addresses 10.1.4.64 through 10.1.4.95, which includes 10.1.4.67.
2
Apply the Longest Prefix Match (LPM) rule.
The route 10.1.4.64/27 has a 27-bit mask, which is longer than /24, /16, and /0.
The router always prioritizes the most specific match (longest subnet mask) first before evaluating Administrative Distance.
3
Identify the next-hop IP address for the winning route 10.1.4.64/27.
The next-hop address associated with 10.1.4.64/27 is 192.168.2.1.
The routing table entry specifies 'via 192.168.2.1'.

Anahtar Kavram

Router Forwarding Decision Logic (Longest Prefix Match)
Bu soruyu puanla