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 ?
- 10.1.1.10 via GigabitEthernet0/0/3Cevap
- B10.1.1.6 via GigabitEthernet0/0/2
- C10.1.1.1 via GigabitEthernet0/0/0
- D10.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
Anahtar Kavram
Longest Prefix Match Rule in Routing Table Lookup