Refer to the following routing table output 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
S 192.168.0.0/16 [1/0] via 10.1.1.1
O 192.168.10.0/24 [110/20] via 10.2.2.2, 00:05:12, GigabitEthernet0/1
D 192.168.10.32/28 [90/2170112] via 10.3.3.3, 00:12:45, GigabitEthernet0/2
When a packet destined for arrives at the router, which next-hop IP address will be selected to forward the packet?
- 10.3.3.3Cevap
- B10.1.1.1
- C10.2.2.2
- D10.0.0.1
Cevap
10.3.3.3
When forwarding an IP packet, a router first checks all entries in its routing table to find routes that match the destination IP address. If multiple matching routes exist, the router always selects the route with the longest prefix mask (most specific match). The destination 192.168.10.45 falls into the range 192.168.10.32 through 192.168.10.47 provided by the /28 route. Because /28 is longer than /24, /16, and /0, the next-hop IP 10.3.3.3 is chosen.
Adım Adım Çözüm
Anahtar Kavram
Longest Prefix Match (LPM) rule in router forwarding decision logic