Soru

Zorluk: Çok zorRouter Forwarding Decision Logic

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

text
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2

Gateway of last resort is 10.1.1.1 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 10.1.1.1
D 192.168.0.0/16 [90/307200] via 10.2.2.2, 01:45:12, GigabitEthernet0/0/1
O 192.168.4.0/24 [110/20] via 10.3.3.3, 00:12:34, GigabitEthernet0/0/2
S 192.168.4.128/26 [1/0] via 10.4.4.4
D 192.168.4.144/28 [90/281600] via 10.5.5.5, 00:05:10, GigabitEthernet0/0/3
O 192.168.4.148/30 [110/50] via 10.6.6.6, 00:01:20, GigabitEthernet0/0/4

The router receives an IP packet with a destination IP address of 192.168.4.150192.168.4.150. Which next-hop IP address will the router select to forward this packet, and for what reason?

  1. 10.6.6.6, because the 192.168.4.148/30 prefix provides the longest matching subnet mask for the destination address.Cevap
  2. B
    10.4.4.4, because static routes have the lowest administrative distance compared to dynamic routing protocols.
  3. C
    10.5.5.5, because 192.168.4.150 is evaluated under the 192.168.4.144/28 route due to EIGRP having a lower administrative distance than OSPF.
  4. D
    10.1.1.1, because 192.168.4.150 is the broadcast address of 192.168.4.148/30, forcing the packet to use the default gateway.

Cevap

The router selects next-hop 10.6.6.6 because 192.168.4.148/30 is the longest matching prefix for destination host 192.168.4.150.
When a router receives a packet, its forwarding engine determines the path by applying the Longest Prefix Match (LPM) rule. The destination address 192.168.4.150 matches multiple routes in the table (/16, /24, /26, /28, /30, and default /0). The route with prefix 192.168.4.148/30 has 30 matching bits, which is the most specific match. Administrative distance is only evaluated when a router receives routes for the exact same destination prefix length from different routing sources. Therefore, the packet is forwarded to next-hop 10.6.6.6.

Adım Adım Çözüm

1
Determine subnet boundaries for all matching routes in the routing table for IP address 192.168.4.150.
192.168.0.0/16 matches (192.168.0.0 - 192.168.255.255)
192.168.4.0/24 matches (192.168.4.0 - 192.168.4.255)
192.168.4.128/26 matches (192.168.4.128 - 192.168.4.191)
192.168.4.144/28 matches (192.168.4.144 - 192.168.4.159)
192.168.4.148/30 matches (192.168.4.148 - 192.168.4.151)
Identify all valid route entries in the Routing Information Base (RIB) that encompass the destination IP.
2
Compare prefix lengths among all matching entries.
Prefix lengths are /16, /24, /26, /28, and /30. The longest matching prefix length is /30.
Cisco routers use the Longest Prefix Match (LPM) rule to select the best route for packet forwarding.
3
Verify host IP validity within the selected /30 network.
Subnet 192.168.4.148/30 network address = 192.168.4.148, broadcast address = 192.168.4.151, usable host IP addresses = 192.168.4.149 and 192.168.4.150.
Confirming 192.168.4.150 is a valid unicast destination host IP within the /30 range.
4
Identify the next-hop IP associated with the longest matching route.
Route 192.168.4.148/30 points to next-hop IP 10.6.6.6 via interface GigabitEthernet0/0/4.
Administrative distance is only evaluated when identical prefixes are learned from multiple sources; since /30 is unique and longest, AD (110) is not compared against other prefixes.

Anahtar Kavram

Router Forwarding Decision Logic (Longest Prefix Match precedence over Administrative Distance and Metric)
Tahmini Süre:2m 0s
Bu soruyu puanla