The head office of a bank has given its new Rajshahi district office the block 10.20.48.0/23 and a short list of needs: a teller LAN of 120 PCs, a back office of 60, 25 CCTV cameras, 10 PCs for the managers, and two leased lines, one to the head office and one to the disaster-recovery site. An engineer fresh from equal subnetting tries the method he knows. The biggest LAN needs a /25, so every subnet gets a /25, and the /23 gives exactly four of them. Six needs, four subnets. The block is big enough; the method is wrong.
Three floors up, at the head office, a different engineer has the opposite problem. Every one of sixty branches sends its routes to the core router, four or five networks each, and the routing table has grown to hundreds of lines that change whenever a branch link flaps. She wants each branch to send one line instead.
Both problems are solved in this lesson. The first by VLSM, which gives every need a block of its own size; the second by supernetting, or route summarization, which combines neighbouring blocks into one shorter prefix. A third idea ties them together: when a router holds a summary and a more specific route at the same time, the longest-prefix match decides which one a packet follows.
By the end you'll be able to plan a VLSM allocation for any list of departments and WAN links, write the space left over as the fewest CIDR blocks, spot a block that cannot exist (like a /23 starting at .40), summarize a set of routes, say whether the summary is exact or covers extra space, and pick the route a router will use for a given destination. We'll go in four parts: VLSM itself, VLSM in real plans, supernetting, and longest-prefix match.