Soru

Zorluk: OrtaRouter Forwarding Decision Logic

Refer to the following partial IPv4 routing table excerpt from a Cisco router:

text
Gateway of last resort is 10.0.0.1 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 10.0.0.1
O 10.50.16.0/20 [110/20] via 10.1.1.2, GigabitEthernet0/0
O 10.50.16.32/27 [110/30] via 10.3.3.2, GigabitEthernet0/2
D 10.50.16.32/28 [90/307200] via 10.2.2.2, GigabitEthernet0/1

The router receives two separate IPv4 unicast packets with destination IP addresses 10.50.16.45 and 10.50.16.20. Which two statements accurately describe how the router forwards these packets?

  1. The packet destined for 10.50.16.45 is egressed out GigabitEthernet0/1 because the 10.50.16.32/28 entry represents the longest prefix match.Cevap
  2. B
    The packet destined for 10.50.16.45 is egressed out GigabitEthernet0/0 because static and default routes take administrative priority over EIGRP.
  3. C
    The packet destined for 10.50.16.20 is dropped because it fails to match the 10.50.16.32/27 or 10.50.16.32/28 specific subnets.
  4. The packet destined for 10.50.16.20 is egressed out GigabitEthernet0/0 because 10.50.16.0/20 is the most specific matching prefix for that destination address.Cevap

Cevap

The router forwards the packet destined for 10.50.16.45 out interface GigabitEthernet0/1 using the 10.50.16.32/28 route, and forwards the packet destined for 10.50.16.20 out interface GigabitEthernet0/0 using the 10.50.16.0/20 route.
When a router receives a packet, it compares the packet's destination IP address against all routing table entries and selects the route with the most specific subnet mask (the longest prefix length). For the destination host 10.50.16.45, the route 10.50.16.32/28 has a 28-bit mask, which is more specific than /27, /20, or /0, so it is egressed out interface GigabitEthernet0/1. For the destination host 10.50.16.20, it falls within the subnet range 10.50.16.0 to 10.50.31.255 associated with the 10.50.16.0/20 prefix. Since host address .20 does not reach the starting boundary .32 of the /27 or /28 subnets, 10.50.16.0/20 is its most specific matching route, and the packet is egressed out interface GigabitEthernet0/0.

Adım Adım Çözüm

1
Analyze matching prefix entries for destination IP address 10.50.16.45.
Destination 10.50.16.45 matches 0.0.0.0/0 (/0), 10.50.16.0/20 (/20), 10.50.16.32/27 (/27: 10.50.16.32 - 10.50.16.63), and 10.50.16.32/28 (/28: 10.50.16.32 - 10.50.16.47).
Routers compare the destination host IP against all entries in the IP routing table to find candidate matching routes.
2
Apply Longest Prefix Match (LPM) logic for destination IP address 10.50.16.45.
The prefix 10.50.16.32/28 has the longest prefix length (/28 > /27 > /20 > /0). Traffic is forwarded via 10.2.2.2 out interface GigabitEthernet0/1.
The router always selects the matching route with the highest number of network bits (most specific mask), regardless of administrative distance or metric.
3
Analyze matching prefix entries for destination IP address 10.50.16.20.
Destination 10.50.16.20 matches 0.0.0.0/0 (/0) and 10.50.16.0/20 (/20: 10.50.16.0 - 10.50.31.255). It does NOT match 10.50.16.32/27 or 10.50.16.32/28 because host value 20 is lower than subnet base address 32.
Subnet ranges must be accurately calculated to determine valid match candidacy.
4
Apply Longest Prefix Match logic for destination IP address 10.50.16.20.
The most specific matching prefix is 10.50.16.0/20 (/20 > /0). Traffic is forwarded via 10.1.1.2 out interface GigabitEthernet0/0.
Between /20 and /0, /20 is the longer prefix match.

Anahtar Kavram

Longest Prefix Match (LPM) Decision Logic
Bu soruyu puanla