Soru

Zorluk: ZorRouter Forwarding Decision Logic

Examine the following Cisco IPv4 routing table snippet:

text
Codes: C - connected, S - static, R - RIP, B - BGP, D - EIGRP, O - OSPF
Gateway of last resort is 10.1.1.254 to network 0.0.0.0

S 192.168.100.0/24 [1/0] via 10.1.1.1
D 192.168.100.160/27 [90/2170112] via 10.1.1.2
O 192.168.100.176/28 [110/40] via 10.1.1.3, GigabitEthernet0/0/2
S 192.168.100.180/30 [1/0] via 10.1.1.4
S* 0.0.0.0/0 [1/0] via 10.1.1.254

Which next-hop IP address will the router select to forward an incoming packet destined for host 192.168.100.178?

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

Cevap

10.1.1.3
When a router receives a packet, it first evaluates all matching routes in the routing table using the Longest Prefix Match (LPM) rule. The destination address 192.168.100.178 matches four routes in the table: 0.0.0.0/0, 192.168.100.0/24, 192.168.100.160/27 (range .160–.191), and 192.168.100.176/28 (range .176–.191). Among these valid matches, 192.168.100.176/28 has the longest subnet mask (/28 = 28 matching bits). Therefore, the router selects this route and forwards the packet to next-hop IP 10.1.1.3.

Adım Adım Çözüm

1
Identify all matching candidate routes for destination IP 192.168.100.178.
Candidate matching routes are 0.0.0.0/0, 192.168.100.0/24, 192.168.100.160/27, and 192.168.100.176/28.
Route 192.168.100.180/30 covers range .180-.183 and does NOT match IP .178.
2
Compare the prefix lengths of all valid matching candidate routes.
Prefix lengths are /0, /24, /27, and /28.
Router forwarding logic relies on Longest Prefix Match (LPM) as the primary criteria before Administrative Distance or Metric are evaluated.
3
Select the route with the longest prefix mask.
The route for 192.168.100.176/28 has the longest matching prefix (/28).
192.168.100.176/28 matches 28 bits, which is longer than /27, /24, or /0.
4
Determine the next-hop IP associated with the winning route.
The next-hop IP is 10.1.1.3.
The routing entry specifies 'O 192.168.100.176/28 [110/40] via 10.1.1.3'.

Anahtar Kavram

Router Forwarding Decision Logic (Longest Prefix Match precedence over Administrative Distance and Metric)
Bu soruyu puanla