Soru

Zorluk: ZorRouter Forwarding Decision Logic

An administrator executes the `show ip route` command on a Cisco router and receives the following partial routing table output:

text
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Gateway of last resort is 10.5.5.5 to network 0.0.0.0

S 172.16.0.0/16 [1/0] via 10.1.1.1, GigabitEthernet0/0
D 172.16.24.0/22 [90/2170112] via 10.2.2.2, GigabitEthernet0/1
O 172.16.25.0/25 [110/20] via 10.3.3.3, GigabitEthernet0/2
D 172.16.25.96/28 [90/307200] via 10.4.4.4, GigabitEthernet0/3
S* 0.0.0.0/0 [1/0] via 10.5.5.5, GigabitEthernet0/4

When a frame containing an IPv4 packet destined for 172.16.25.100172.16.25.100 arrives at this router, which next-hop IP address and egress interface will be selected to forward the packet?

  1. 10.4.4.4 via GigabitEthernet0/3Cevap
  2. B
    10.1.1.1 via GigabitEthernet0/0
  3. C
    10.3.3.3 via GigabitEthernet0/2
  4. D
    10.2.2.2 via GigabitEthernet0/1

Cevap

10.4.4.4 via GigabitEthernet0/3
When a router makes a forwarding decision, it evaluates all matching entries in the routing table according to the Longest Prefix Match rule. Subnet 172.16.25.96/28 covers IP addresses from 172.16.25.96 to 172.16.25.111, including 172.16.25.100. Because /28 is the longest (most specific) prefix matching this destination, the router selects next-hop 10.4.4.4 via GigabitEthernet0/3 regardless of lower administrative distances on less specific routes.

Adım Adım Çözüm

1
Identify all candidate routes matching destination IP 172.16.25.100172.16.25.100
Candidate routes are 172.16.0.0/16, 172.16.24.0/22, 172.16.25.0/25, 172.16.25.96/28, and default route 0.0.0.0/0.
Before comparing administrative distance or metrics, the router finds all routing table entries that cover the destination address.
2
Determine the host range of the subnet 172.16.25.96/28
The subnet range for 172.16.25.96/28 spans from 172.16.25.96 to 172.16.25.111.
A prefix length of /28 yields a block size of 2(3228)=162^{(32-28)} = 16 IP addresses. Destination 172.16.25.100172.16.25.100 falls within 172.16.25.96172.16.25.111172.16.25.96 - 172.16.25.111.
3
Apply the Longest Prefix Match (LPM) rule
Compare subnet mask lengths: /28 > /25 > /22 > /16 > /0. The route for 172.16.25.96/28 has the longest prefix match.
Longest prefix match is the primary criterion in router forwarding logic, overriding Administrative Distance and routing protocol metrics.
4
Determine next-hop IP and egress interface
Next-hop 10.4.4.4 via GigabitEthernet0/3.
The matching /28 entry specifies next-hop IP 10.4.4.4 out interface GigabitEthernet0/3.

Anahtar Kavram

Longest Prefix Match (LPM) Rule in Forwarding Logic
Tahmini Süre:2m 0s
Bu soruyu puanla