Saturday, January 18, 2014

Subnetting Tips, Tricks, and More Examples



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.

No comments:

Post a Comment