subnetting.net

Subnetting Tips, Tricks, and More Examples


Have a question? Email us at:


Improve Your Speed: While playing the game, you can increase your speed by using the Enter key to submit your answer, and pressing Enter again to advance to the next question. In practice mode it works similarly except that if your answer is incorrect you can continue trying until you get it right. This functionality has been tested in Internet Explorer, Firefox, and Chrome.

Improve Your Speed Even More: Check out our Math Questions which are specifically designed to help you improve your subnetting speed. Note you must have at least a Free Account to use this feature. -Thanks to Gabriel from the San Francisco Bay Area for his suggestion and inspiring us to create these math questions.


Q: Suppose I have a block size of 8 and I'm trying to find the IP range for the number 122. Is there a faster way to get there than by starting at 0, and counting by 8 until I find 120 and 128 to know the range? During the exam this will take too long! -Asked by Esrar from San Jose, CA

A: Great question! Yes, there is a faster way. Once you know the block size, you can divide the IP number by the block size to find the multiplier: 122/8 = 15.something. In this case the division results in 15.25 but the number to the right of the decimal doesn’t matter, which is why we wrote it as "15.something". Now take the integer portion of that answer (15) and multiply it by 8, which gives you 120, which is the starting point you are looking for.

If you really hate doing division, (like if you are subnetting in your head), another helpful trick is to memorize all the multiples of 64: 0, 64, 128, 192, 256. Now you can always start at the closest number and work up or down by your block size (unless your block size happens to be 128 in which case you start at 0,128,256). For 122, that is closest to 128, so work backwards from there: 128-8 = 120, found it already! Suppose the IP number was 93, then you could start at 64: 64, 72, 80, 88, 96- found it (88). This significantly cuts down on how far you have to search.

After you’ve done this for a while, you can take it a step further and memorize all the multiples of 16 too: 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256. Once you have those numbers memorized you have much less counting to do, because you can start at any number and always be at most 16 away. For 93 with block size 8, you would start between 80 and 96, adding 8 to 80 yields 88 – found it already. However, note that if your block size is greater than 16, for example 32, you can’t use your multiples of 16 numbers. Instead you have to use the multiples of 64 numbers to start with.

With more practice, this will become second nature. As an example, if the block size is 2, you probably already figured out that every even number is a new block, and hopefully you don’t have to begin at 0 and count by 2 to find the starting number for say 105- you would instantly know that the starting number is 104 because you already know how to recognize and find the even numbers. This same recognition will happen for multiples of 64 and 16 too once you memorize them.


Q: I am struggling with answering question type 2 for Class A and B addresses. (How many subnets and hosts per subnet can you get from the network 172.18.0.0/25?) Any helpful suggestions? -Asked by various people

A: First off, it is probably helpful to realize that on our site we only use the private IP address ranges. We do this so that there is no question about what address class we are working in. The private network ranges and the corresponding default masks are as follows:

  • Class A = 10.0.0.0/8 (10.0.0.0 - 10.255.255.255), Default Mask: 255.0.0.0
  • Class B = 172.16.0.0/12 (172.16.0.0 - 172.31.255.255), Default Mask: 255.255.0.0
  • Class C = 192.168.0.0/16 (192.168.0.0 - 192.168.255.255), Default Mask: 255.255.255.0

The trick is, if the network begins with "10." then you know you have 24 bits to work with, if the network begins with "172.X" then you know have 16 bits to work with, and if the network begins with "192.168" then you know you have 8 bits to work with. Once you know the number of total bits, the rest should be easier. In the example given, 172.18.0.0/25, since it begins with 172, we know we are working with 16 bits total. "/25" translates to 255.255.255.128, which tells us there are 7 bits for hosts. (Use the cheat sheet to check this.) Now that we know there are 7 bits for hosts, there must be 16 - 7 = 9 bits for subnets. 2^9 = 512 subnets. 2^7 = 128 hosts per subnet, but remember for each subnet we always have to subtract 2 from the number of available hosts to account for the network ID and the broadcast address, so we have 128 - 2 = 126 hosts. The final answer is 512 subnets and 126 hosts per subnet.

Tip: to improve your speed, it is helpful to have the powers of 2 memorized: 2^1=2, 2^2=4, etc, up to 2^12=4096. (You rarely would need to know beyond 2^12, and even if you did you can calculate it manually.) Of course, if you use the cheat sheet we provide in the tutorial you don't need to memorize them, but ideally they will become second nature if you want to maximize your time in an exam.