A router uses the following routing table: A packet bearing a destination…
2015
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.
eth 0
- B.
eth 1
- C.
eth 2
- D.
eth 3
Attempted by 128 students.
Show answer & explanation
Correct answer: C
Longest Prefix Match (LPM) is the rule a router applies whenever more than one entry in its forwarding table matches a destination address: among all entries whose network and mask actually cover that address, the router picks the entry with the LONGEST (most specific) subnet mask -- not the first match, not the widest match.
An entry only qualifies for this comparison if the destination genuinely falls inside the address range its mask defines; an entry with a longer mask than every other row is excluded outright if the destination lies outside its own range.
Check each entry in the table against the destination address 144.16.68.117:
Interface | Mask (CIDR) | Address range covered | Matches 144.16.68.117? |
|---|---|---|---|
eth0 | 255.255.0.0 (/16) | 144.16.0.0 to 144.16.255.255 | Yes |
eth1 | 255.255.224.0 (/19) | 144.16.64.0 to 144.16.95.255 | Yes |
eth2 | 255.255.255.0 (/24) | 144.16.68.0 to 144.16.68.255 | Yes |
eth3 | 255.255.255.224 (/27) | 144.16.68.64 to 144.16.68.95 | No (117 > 95) |
Three rows match -- eth0 (/16), eth1 (/19), and eth2 (/24). Longest Prefix Match selects the entry among these with the most specific (longest) mask: eth2's /24 is longer than both /16 and /19, so eth2 wins.
Cross-check: eth3 actually carries the longest mask of all four rows (/27), longer even than eth2's /24 -- but a longer mask only matters once an entry matches. Since 144.16.68.117 lies outside eth3's 144.16.68.64 to 144.16.68.95 range, eth3 never enters the comparison at all, which is why it is excluded despite its more specific mask.
The router therefore forwards the packet out eth2.
A video solution is available for this question — log in and enroll to watch it.