About this interactive
You rarely need every subnet. More often you need one, the 24th or the 300th, and listing every subnet before it is slow and easy to get wrong. The subnets count up in binary in the borrowed bits, starting from all zeros, so the first subnet is number 0, the second is number 1, and subnet n is number n - 1. Write n - 1 in binary across the borrowed bits, fill the host bits with 0 for the network address or with 1 for the broadcast address, and convert back to decimal.
Take 172.22.0.0/21, 5 bits borrowed in the third octet. The 21st subnet is number 20, 10100 in five bits. Followed by three host bits of 0, the third octet is 10100000, 160, so the network is 172.22.160.0; with the host bits 1 it is 10100111, 167, and the broadcast is 172.22.167.255. The same shortcut, (n - 1) times the block size, gives the same answer. When the borrowed bits run across an octet boundary, as with 10 bits borrowed on a Class B, the high bits land in the third octet and the low bits at the top of the fourth: subnet 50 of 135.20.0.0/26 is number 49, 0000110001: 00001100 in the third octet is 12, and 01 at the top of the fourth is 64, so it is 135.20.12.64.
Type addresses in dotted decimal. Anything you miss shows the answer and how the binary gives it. Seven of the twenty-one questions are drawn each run.
About TechKnowSurge
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →