Soru

Zorluk: ZorRouting Table Components

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

text
Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 4 subnets, 3 masks
O 192.168.10.0/24 [110/20] via 10.1.1.1, 00:05:12, GigabitEthernet0/0
D 192.168.10.0/26 [90/307200] via 10.1.1.2, 00:12:45, GigabitEthernet0/1
S 192.168.10.0/27 [1/0] via 10.1.1.3
O E2 192.168.10.16/28 [110/20] via 10.1.1.4, 00:01:10, GigabitEthernet0/2

Which next-hop IPv4 address will the router select to forward a packet with a destination IP address of 192.168.10.20?

  1. 10.1.1.4Cevap
  2. B
    10.1.1.3
  3. C
    10.1.1.2
  4. D
    10.1.1.1

Cevap

The router will select the next-hop address 10.1.1.4.
When a router receives a packet, it compares the destination IP address against all entries in its routing table and selects the route with the longest matching prefix (most specific subnet mask). In this scenario, the destination address 192.168.10.20 matches 192.168.10.0/24, 192.168.10.0/26, 192.168.10.0/27, and 192.168.10.16/28. The /28 route is the most specific match (28 bits), so the router uses its specified next-hop address, 10.1.1.4.

Adım Adım Çözüm

1
Determine which subnet ranges contain the destination IP address 192.168.10.20.
The destination address 192.168.10.20 falls within 192.168.10.0/24 (.0 - .255), 192.168.10.0/26 (.0 - .63), 192.168.10.0/27 (.0 - .31), and 192.168.10.16/28 (.16 - .31).
All four routes in the routing table match the destination address.
2
Compare the prefix lengths of all matching routes to apply the Longest Prefix Match rule.
The prefix length of /28 (28 subnet bits) is longer than /27, /26, and /24.
The router always prioritizes the route with the most specific match (longest subnet mask / prefix length), regardless of administrative distance or routing protocol source.
3
Identify the next-hop IPv4 address associated with the /28 matching entry.
The route for 192.168.10.16/28 specifies the next-hop address 10.1.1.4.
The router forwards packets matching this prefix to 10.1.1.4 out GigabitEthernet0/2.

Anahtar Kavram

Longest Prefix Match Rule
Bu soruyu puanla