A router uses the following routing table: A packet bearing a destination…
2006
A router uses the following routing table:
A packet bearing a destination address 144.16.68.117 arrives at the router. On which interface will it be forwarded?
- A.
eth0
- B.
eth1
- C.
eth2
- D.
eth3
Attempted by 165 students.
Show answer & explanation
Correct answer: C
Answer: eth2. The router forwards the packet to eth2 because it is the longest-prefix match.
144.16.0.0/16 (mask 255.255.0.0): matches (covers 144.16.0.0–144.16.255.255).
144.16.64.0/19 (mask 255.255.224.0): matches (covers 144.16.64.0–144.16.95.255), but is less specific than /24.
144.16.68.0/24 (mask 255.255.255.0): matches (covers 144.16.68.0–144.16.68.255) and is the most specific matching entry.
144.16.68.64/27 (mask 255.255.255.224): does not match because it covers 144.16.68.64–144.16.68.95; the destination .117 is outside this range.
Therefore, by applying the longest-prefix (most specific) rule among the matching routes, forward the packet to eth2.
A video solution is available for this question — log in and enroll to watch it.