Refer to the following partial IPv4 routing table output from a Cisco router:
Codes: C - connected, S - static, O - OSPF, D - EIGRP
Gateway of last resort is not set
172.16.0.0/16 is subnetted, 3 subnets
S 172.16.0.0/16 [1/0] via 10.1.1.1
O 172.16.32.0/24 [110/20] via 10.2.2.2
D 172.16.32.32/27 [90/307200] via 10.3.3.3
If the router receives an IP packet destined for , to which next-hop IP address will the packet be forwarded?
- 10.3.3.3Cevap
- B10.1.1.1
- C10.2.2.2
- DThe packet will be dropped because no default route or host route exists.
Cevap
The router will forward the packet to next-hop IP address 10.3.3.3 because 172.16.32.32/27 is the longest matching prefix for destination IP 172.16.32.45.
When a router performs a forwarding lookup for destination IP address 172.16.32.45, it checks all matching entries in its routing table. The destination address 172.16.32.45 matches 172.16.0.0/16, 172.16.32.0/24, and 172.16.32.32/27 (which covers host IP addresses from 172.16.32.33 through 172.16.32.62). The /27 route matches 27 continuous network bits, which is the longest prefix match compared to /24 or /16. Therefore, the router forwards the packet to 10.3.3.3.
Adım Adım Çözüm
Anahtar Kavram
Router Forwarding Decision Logic & Longest Prefix Match (LPM)