Refer to the following partial IPv4 routing table output from a Cisco router:
Gateway of last resort is 192.168.10.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.10.1
D 172.20.0.0/16 [90/307200] via 10.1.1.2, 02:14:10, GigabitEthernet0/0
O 172.20.100.0/24 [110/20] via 10.2.2.2, 01:45:12, GigabitEthernet0/1
R 172.20.100.32/27 [120/2] via 10.3.3.2, 00:12:05, GigabitEthernet0/2
When the router receives an IP packet with a destination address of , to which next-hop IP address and interface will the router forward the packet?
- 10.3.3.2 via GigabitEthernet0/2, because 172.20.100.32/27 provides the longest matching subnet mask for the destination IP address.Cevap
- B10.1.1.2 via GigabitEthernet0/0, because EIGRP has a lower administrative distance than OSPF and RIP.
- C10.2.2.2 via GigabitEthernet0/1, because 172.20.100.50 is outside the usable host range of the /27 subnet.
- D10.2.2.2 via GigabitEthernet0/1, because OSPF metric is lower than the metric of the RIP route.
Cevap
The router forwards the packet to next-hop 10.3.3.2 via interface GigabitEthernet0/2 because 172.20.100.32/27 is the longest prefix match.
When a router makes a forwarding decision, it evaluates all matching routes in the routing table and selects the route with the most specific (longest) subnet mask. The destination IP 172.20.100.50 matches four routes in the routing table: 0.0.0.0/0, 172.20.0.0/16, 172.20.100.0/24, and 172.20.100.32/27 (range 172.20.100.32 to 172.20.100.63). Because /27 has the highest number of matching network bits, the router selects 172.20.100.32/27 and forwards the packet to next-hop 10.3.3.2 out GigabitEthernet0/2.
Adım Adım Çözüm
Anahtar Kavram
Longest Prefix Match (LPM) Rule