Soru

Zorluk: ZorRouting Table Components

A Cisco router's IPv4 routing table contains the following entries:

text
Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
O 10.180.0.0/14 [110/65] via 192.168.12.2, 00:04:12, GigabitEthernet0/0/1
D 10.180.0.0/16 [90/307200] via 192.168.10.2, 01:15:04, GigabitEthernet0/0/0
S 10.180.32.0/19 [1/0] via 192.168.15.1, GigabitEthernet0/0/3
O IA 10.180.40.0/22 [110/120] via 192.168.14.2, 00:10:05, GigabitEthernet0/0/2

When a packet destined for IP address 10.180.42.100 arrives at the router, which route entry will the router select to forward the packet?

  1. A
    The static route to 10.180.32.0/19 because static routes have a lower Administrative Distance (1) than OSPF or EIGRP.
  2. The OSPF inter-area route to 10.180.40.0/22 because it provides the longest prefix match for the destination address.Cevap
  3. C
    The EIGRP route to 10.180.0.0/16 because EIGRP has a lower Administrative Distance (90) than OSPF (110).
  4. D
    The OSPF intra-area route to 10.180.0.0/14 because intra-area routes are always preferred over inter-area routes regardless of mask length.

Cevap

The router will select the OSPF inter-area route to 10.180.40.0/22 because 10.180.42.100 matches that route with a /22 prefix length, which is the longest matching prefix.
The destination address 10.180.42.100 matches multiple entries in the routing table. Cisco routers evaluate forwarding decisions using the Longest Prefix Match rule, which prioritizes the route with the longest subnet mask length regardless of administrative distance or metric. The route 10.180.40.0/22 covers range 10.180.40.0 to 10.180.43.255, giving a 22-bit matching prefix, which is longer than /19, /16, or /14.

Adım Adım Çözüm

1
Determine which routing table entries match the destination IP 10.180.42.100.
Destination 10.180.42.100 falls into 10.180.0.0/14 (10.180.0.0 - 10.183.255.255), 10.180.0.0/16 (10.180.0.0 - 10.180.255.255), 10.180.32.0/19 (10.180.32.0 - 10.180.63.255), and 10.180.40.0/22 (10.180.40.0 - 10.180.43.255). All four routes are valid matches.
Before making forwarding decisions, the router identifies all routes matching the destination IP address.
2
Compare the prefix lengths of all matching routes to apply the Longest Prefix Match rule.
The prefix lengths are /14, /16, /19, and /22. The longest (most specific) prefix length is /22.
The fundamental routing lookup logic in Cisco IOS prefers the route with the most specific mask (longest subnet mask / highest number of prefix bits).
3
Select the route corresponding to the longest prefix match.
The entry 'O IA 10.180.40.0/22 [110/120] via 192.168.14.2' is selected.
Administrative Distance and metric are completely ignored when comparing routes of different prefix lengths.

Anahtar Kavram

Longest Prefix Match Rule in Cisco Routing Tables
Bu soruyu puanla