200-301 Question 301
Single answerA router receives a packet destined for the IP address 192.168.10.14. The routing table contains the following entries:
- 192.168.10.0/24 via 10.0.0.1
- 192.168.10.0/25 via 10.0.0.2
- 192.168.10.0/26 via 10.0.0.3
- 0.0.0.0/0 via 10.0.0.4
Which next-hop IP address will the router use to forward the packet based on the longest prefix match?
- A
10.0.0.1
- B
10.0.0.2
- C
10.0.0.3
- D
10.0.0.4
Show answer and explanation
Correct answer: C
Explanation
When forwarding a packet, a router uses the longest prefix match to determine the most specific route. In this case, the routing table entry 192.168.10.0/26 has the longest prefix length (26), making it the most specific match for the destination IP address 192.168.10.14. Therefore, the router will forward the packet to the next-hop IP address 10.0.0.3.
- A. Incorrect.
192.168.10.0/24 has a prefix length of 24, which matches the packet's destination IP address but is not the longest match.
- B. Incorrect.
192.168.10.0/25 has a prefix length of 25, which is longer than /24 but still not the longest match.
- C. Correct.
192.168.10.0/26 has a prefix length of 26, which is the longest match for the destination IP address 192.168.10.14, so this route is chosen.
- D. Incorrect.
0.0.0.0/0 is the default route and would only be used if no more specific match existed in the routing table.