Soru

Zorluk: OrtaRouting Table Components

A Cisco router contains the following partial output in its IPv4 routing table:

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

10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
O 10.88.0.0/16 [110/20] via 192.168.1.1, 00:14:22, GigabitEthernet0/0/0
D 10.88.12.0/22 [90/30720] via 192.168.2.1, 01:45:10, GigabitEthernet0/0/1
S 10.88.14.0/24 [1/0] via 192.168.3.1, 04:12:00, GigabitEthernet0/0/2
O 10.88.14.32/28 [110/65] via 192.168.4.1, 00:05:30, GigabitEthernet0/0/3

When the router receives a packet with the destination IP address 10.88.14.45, which next-hop IP address and outgoing interface will it use to forward the packet?

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

Cevap

192.168.4.1 via GigabitEthernet0/0/3
The router uses the Longest Prefix Match rule to make forwarding decisions. Comparing all matching subnet masks (/16, /22, /24, and /28) for destination 10.88.14.45 shows that 10.88.14.32/28 provides the longest (most specific) prefix match. Therefore, the router forwards traffic to next-hop 192.168.4.1 out interface GigabitEthernet0/0/3, regardless of administrative distance or metric values.

Adım Adım Çözüm

1
Evaluate all routes in the routing table to find matches for destination IP 10.88.14.45.
Four routes match the destination: 10.88.0.0/16, 10.88.12.0/22, 10.88.14.0/24, and 10.88.14.32/28.
The destination address 10.88.14.45 resides inside all four subnet boundaries.
2
Apply the Longest Prefix Match (LPM) rule by comparing prefix lengths of all matching routes.
The subnet 10.88.14.32/28 has a 28-bit mask, which is longer than /24, /22, and /16.
Routers always prefer the most specific route (longest subnet mask) first when making forwarding decisions.
3
Identify the next-hop IP and exit interface for the winning route 10.88.14.32/28.
The routing entry specifies 'via 192.168.4.1, GigabitEthernet0/0/3'.
Administrative distance and metric are only evaluated when comparing candidate routes with identical prefix lengths.

Anahtar Kavram

Longest Prefix Match (LPM) rule in Cisco IPv4 packet forwarding logic
Bu soruyu puanla