The forwarding table of a router is shown below. A packet addressed to a…
2023
The forwarding table of a router is shown below.

A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID _________ .
Attempted by 96 students.
Show answer & explanation
Correct answer: 3
Key idea: choose the routing entry with the longest matching prefix (the most specific mask) that still contains the destination address.
200.150.68.118 matches 200.150.0.0 with mask 255.255.0.0 (/16), but this is a coarse match.
It also matches 200.150.64.0 with mask 255.255.224.0 (/19), which covers 200.150.64.0–200.150.95.255.
It matches 200.150.68.0 with mask 255.255.255.0 (/24), which covers 200.150.68.0–200.150.68.255; this is more specific than /19 and /16.
It does not match 200.150.68.64 with mask 255.255.255.224 (/27), because that range is 200.150.68.64–200.150.68.95 and 118 is outside that range.
Conclusion: the longest matching prefix is 200.150.68.0/24, so forward the packet to the interface with ID 3.