DEV Community

Rocky
Rocky

Posted on

The Subnetting Question That Ends Interviews Early

A network engineer candidate is thirty minutes into a technical screen when the interviewer stops the small talk and writes one line on the shared screen: 172.16.34.87/21. Give me the network address, the broadcast address, and the usable host range. Out loud, no calculator, whenever you're ready.

The candidate knows subnetting. They passed it in a course, they've drawn the binary out on paper before. But paper isn't in front of them now, and the version of subnetting that only works with a pen and five minutes of longhand binary conversion is not a version that survives a live interview. Thirty seconds of silence turns into ninety, the interviewer's next question is gentler than the first but the moment has already passed, and the callback doesn't come. Nobody fails this because they don't understand subnetting. They fail it because the only method they know is too slow for the room they're in.

There's a faster method, and it doesn't require memorizing anything beyond one number per prefix length. It's usually called the "magic number" or block size method, and the entire idea is this: a /21 mask is 255.255.248.0. The interesting octet, the one where the mask stops being all 1s or all 0s, is the third octet, 248. Block size is just 256 minus that number: 256 − 248 = 8. That's the only subtraction in the whole method.

From there, every subnet in that /21 network is a multiple of 8 in the third octet: 0, 8, 16, 24, 32, 40, and so on. The address in question has 34 in its third octet. Find the multiple of 8 at or just below 34, that's 32, and that's the network address: 172.16.32.0. The broadcast address is one less than the next multiple, 40 − 1 = 39, so 172.16.39.255. Usable hosts run from 172.16.32.1 to 172.16.39.254.

Read that back: identify the interesting octet, subtract from 256 to get the block size, round the given octet down to the nearest multiple of the block size, and the broadcast is one short of the next multiple. Four steps, no binary written out, and it scales to any prefix length once the block-size subtraction becomes automatic instead of something you're deriving from scratch under a clock. The candidates who answer this kind of question in under ten seconds aren't smarter, they've just done the block-size math enough times that it stopped being math and became recall.

That's the actual gap between understanding subnetting and being able to produce it on demand, and it only closes with repetition against a range of prefix lengths and starting addresses, not with rereading the same explanation once and calling it learned. Codelivly's CCNA 200-301 Study Guide is built around exactly that repetition, 324 pages, 41 hands-on labs, and over 150 subnetting problems with an answer key, plus a 140-question practical exam that's closer to a real interview whiteboard than a multiple-choice quiz. If subnetting theory is solid but the speed isn't there yet, the free Routing & Switching Fundamentals learning path on codelivly.com is a good place to firm up the OSI and TCP/IP groundwork the block-size method sits on top of.

Top comments (0)