Soru

Zorluk: OrtaRouting Table Components

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

text
Gateway of last resort is not set

172.24.0.0/16 is variably subnetted, 4 subnets, 3 masks
O 172.24.32.0/21 [110/65] via 10.1.1.2, 00:12:45, GigabitEthernet0/0/1
D 172.24.32.0/22 [90/307200] via 10.1.1.6, 02:41:10, GigabitEthernet0/0/2
O IA 172.24.35.0/24 [110/120] via 10.1.1.10, 00:05:22, GigabitEthernet0/0/3
S 172.24.0.0/16 [1/0] via 10.1.1.1

Which next-hop IP address and exit interface will the router select to forward a packet destined for 172.24.35.10172.24.35.10?

  1. 10.1.1.10 via GigabitEthernet0/0/3Cevap
  2. B
    10.1.1.6 via GigabitEthernet0/0/2
  3. C
    10.1.1.1 via GigabitEthernet0/0/0
  4. D
    10.1.1.2 via GigabitEthernet0/0/1

Cevap

10.1.1.10 via GigabitEthernet0/0/3
When a router makes a forwarding decision, it evaluates all matching table entries and selects the route with the most specific match—the longest prefix length. The route entry 172.24.35.0/24 covers 172.24.35.10 with a /24 prefix length, which is longer (more specific) than /22, /21, or /16. Therefore, traffic is forwarded to next-hop 10.1.1.10 via interface GigabitEthernet0/0/3.

Adım Adım Çözüm

1
Identify all candidate routes that match the destination IP address 172.24.35.10.
The destination address falls into four matching subnet ranges: 172.24.32.0/21, 172.24.32.0/22, 172.24.35.0/24, and 172.24.0.0/16.
Before comparing routing metrics or administrative distance, a router determines which entry ranges include the destination address.
2
Determine the prefix length (subnet mask bits) for each candidate route.
Prefix lengths are /16, /21, /22, and /24.
Cisco IOS routing logic enforces the Longest Prefix Match rule above administrative distance or metric considerations.
3
Select the route with the most specific match (highest number of network prefix bits).
172.24.35.0/24 has the longest prefix match (/24). The associated next-hop is 10.1.1.10 out interface GigabitEthernet0/0/3.
A /24 mask provides a more specific route match than /22, /21, or /16.

Anahtar Kavram

Longest Prefix Match Rule in Routing Table Lookup
Bu soruyu puanla