3.20.2013

Subnetting: Making an Exam Legal 'Cheat Sheet'


As a networking student there's one inevitability that we are all gonna have to face sooner or later: Subnets. Subnetting can be a tricky business sometimes. Especially under the pressure of an exam where no calculators or "cheat" sheets will be allowed. Initially, grasping the concept of binary is the idea. Understanding which binary bit represents which decimal number is half the battle. Putting those decimal places and relating a subnet mask to them is the war. Even after grasping that concept, however, keeping track of which bit place equals which subnet can be enough to give even a great subnetter a migraine.

In this post I'm not going explain  how to subnet correctly. I'm going to assume that you have the basic idea down, but I wanted to share something that I do every time I'm faced with any subnet problems from "Finding the first available host address" to the more complicated "Variable Length Subnet Masking."

One of the very first things I always do is write down this quick reference 'key' at the top of my scratch paper. The best time to do this is at the beginning of the exam when you are given 15-20 minutes for the tutorial. Write this down and then check and recheck it for accuracy. Once you are sure its right it will provide quick reference to most of the more simple subnetting questions.

 128           64            32             16               8              4          2          1
.128        .192         .224          .240          .248         .252          -           -
 /25           /26           /27            /28            /29           /30          -           -

These three lines, when understood correctly, will save you vast amounts of time when deciphering subnet problems. If a problem wants you to subnet using a /28 mask you can immediately look up at know that your mask is going to be 255.255.255.240. Otherwise, your going to need to know the value from memory or start adding up the 4 bits after the /24 mask. (128 + 64 + 32 + 16 = 240). This is where writing out a key like this is helpful.

Obviously jotting down the key correctly is of extreme importance here since messing that part up would effect the outcome of every problem you used it on. So be sure you fully understand exactly what you are writing out and why. If we were to analyze each line we would see that...


Line #1:

 128           64            32             16               8              4          2          1   <---
.128        .192         .224          .240          .248         .252          -           -
 /25           /26           /27            /28            /29           /30          -           -

This line represents each binary value in the 8 bit octet. By far the most important part to write out. This will provide a quick reference to the often asked "how many hosts and how many subnets will you have" questions. If you are told you need a subnet that can accommodate 14 hosts you can quickly look up see that the 16 place - (2 network and broadcast addresses)=14  can accomplish that and just count all the places to the right of the 16.  [8  4  2  1]=4 bits. You need to have 4 bits of the subnet mask reserved in the mask for the host. Or in binary terms .11110000.


Line #2:

 128           64            32             16               8              4          2          1
.128        .192         .224          .240          .248         .252          -           -  <---
 /25           /26           /27            /28            /29           /30          -           -
This line represents the decimal value for your mask. It's nothing more than adding up the bit values. For example 128 + 64 =192. It just quickly references saving you from needing to do addition over and over. So in our last example if you determined that you needed to reserve 4 bits for the hosts, that leaves you with 4 bits for the network portion. Glancing up at the second line and counting back 4 bits (from left to right) you can see that your subnet mask (assuming your working with a class C address) is going to be 255.255.255.240



Line #3:

 128           64            32             16               8              4          2          1
.128        .192         .224          .240          .248         .252          -           -
 /25           /26           /27            /28            /29           /30          -           -  <---
Finally, line 3 is nothing more than a quick reference guide to know that our .240 = /28 and vice versa. Now keep in mind that the /25 - /30 key is not going to be accurate if you are working with masks closer to the class A and class B subnet classful masks (ie. /17 & /21), so you'll have to adjust accordingly. But in my experience 90% of the subnets we work with are /24 and higher so this last line comes in handy. 

As a side note you'll notice that the 1st and 2nd bits are left blank where the /31 and /32 bits are concerned. Obviously these don't need to be filled in because they can afford no hosts on that subnet so you'll likely never use those spots. 


So there we have it. In my experience jotting down this key is an easy way to create a quick reference guide for all your subnetting problems. Just be sure to double check that the key is accurate and be sure to take your time and double check your work. There's nothing worse than VLSM'ing an entire network only to realize you've overlapped ip addresses halfway through the problem. Good luck out there, and happy subnetting...if there is such a thing.



2 comments:

  1. Most of the time I don’t make comments on websites, but I'd like to say that this article really forced me to do so. Really nice post!legal notes

    ReplyDelete