A router receives a packet destined for 10.5.3.7. Its routing table has three matching entries: 10.0.0.0/8, 10.5.0.0/16, and 10.5.3.0/24. Which entry does the router use?
A10.0.0.0/8, because it is the broadest match and ensures the packet reaches the right general network
B10.5.0.0/16, as the middle-specificity entry provides a balanced forwarding decision
C10.5.3.0/24, because it is the longest (most specific) prefix that matches the destination
DThe router floods the packet on all interfaces since multiple entries match simultaneously
IP routing uses longest-prefix match: the entry with the most bits in the prefix that still matches the destination wins. All three entries match 10.5.3.7, but the /24 has 24 matching prefix bits versus /16 with 16 and /8 with 8. The router always uses the most specific matching entry. This rule is what makes Internet routing scalable — routers aggregate millions of addresses into short-prefix entries and only maintain longer, more specific entries where finer-grained routing is needed.
Question 2 Multiple Choice
A packet is traveling from New York to Tokyo across the Internet, passing through a router in Los Angeles. What does the LA router know about the complete path to Tokyo?
AIt has a full routing map showing all 10–15 hops to Tokyo, which it uses to select the optimal complete path
BIt knows only the best next hop toward Tokyo — which neighboring router to forward the packet to — and nothing about the path beyond that
CIt broadcasts the packet to all connected neighbors and lets them compete to determine the next hop
DIt must first query Tokyo to establish the full path before forwarding any packets
IP routing is hop-by-hop: each router makes an independent, local decision based solely on its own routing table, forwarding to the single best next hop without knowing or storing any information about the complete path. The LA router has no global map; it simply consults its table, finds the best next-hop for the Tokyo-bound destination prefix, and forwards. That router repeats the process, and so on. This stateless, local decision-making at each hop is what makes the Internet scalable — no router needs global knowledge.
Question 3 True / False
A router's default route (0.0.0.0/0) is used only when no other routing table entry matches the destination, because it has the shortest possible prefix.
TTrue
FFalse
Answer: True
The default route has a prefix length of zero, meaning it technically matches every IP address. But because longest-prefix match always prefers more specific entries, the default route is selected only when no other entry matches. This makes it a catch-all 'last resort' entry — traffic that doesn't match any specific prefix gets forwarded toward the default gateway (typically toward the broader Internet). Home routers typically have just one real routing entry: a default route pointing to the ISP's gateway.
Question 4 True / False
Dynamic routing protocols like OSPF allow routers to compute and store the full end-to-end path to each destination network, which they then follow when forwarding packets.
TTrue
FFalse
Answer: False
Dynamic routing protocols allow routers to exchange reachability information and build routing tables — mappings from destination prefixes to next-hop addresses — but not full end-to-end paths. When forwarding a packet, each router still makes a purely local, hop-by-hop decision: 'which of my neighbors is the best next hop for this destination prefix?' The complete Internet path is an emergent property of many independent per-hop decisions. No single router knows or stores the full path.
Question 5 Short Answer
Why does the Internet use longest-prefix match routing rather than exact-IP-address matching, and what fundamental Internet design property does this enable?
Think about your answer, then reveal below.
Model answer: Exact-address matching would require a routing table entry for every individual IP address — billions of entries per router, which is completely infeasible. Longest-prefix match allows a single routing entry to represent an entire address block (e.g., 192.168.0.0/16 covers 65,536 addresses). Routers can aggregate many specific addresses into summarizing prefixes, maintaining only more specific entries where finer-grained routing is needed. This hierarchical aggregation is what makes Internet routing scalable: backbone routers maintain routing tables with hundreds of thousands of prefixes, not billions of individual host addresses.
Students who think routing works like a phone book (one entry per host) haven't grasped the key insight. The IP address hierarchy combined with longest-prefix match is the architectural mechanism that makes the Internet scale — without it, the routing system would collapse under the weight of billions of individual entries.