If you have been in an IT field or attended a certification class such as CCNA you will definitely come across some annoying subnetting scenarios. From your favorite IT book and/or networking website, I am sure you already understand why we need subnetting. When networks grow larger it makes sense to subdivide it into smaller groups of networks that will improve performance, provide better handling of security and easy address management. Subnetting allows us to divide a larger network into logical broadcast domains called subnets. If you are planning to take CCNA certification, you have to be prepared to answer subnet questions quickly while under time pressure. The quickest approach is to practice a diverse set of subnet questions multiple times. Once you understand the math behind the subnetting then memorize this table; you should be able to answer any subnet question within seconds. If you practice enough problems, this number chart will remain in your mind for a long time! Forget one minute solutions when subnetting can be done within few seconds… Now, let’s understand the numbers behind this table.
Table A has three rows:
1) Bit #: This row is the bit number of the 8 bit binary number
2) Power: This row shows the placement value of the corresponding bit number as a 2 to the power value.
3) Value: This row shows the decimal value of the corresponding bit.
Table B has three rows:
1) No. Bits: This row shows number of bits.
2. Mask: This rows shows the subnet mask. For an example if all the 8 bits are ones, 11111111 then the mask is 255. If 7 bits are ones, 11111110 then the mask is 254. If 6 bits are ones, 11111100, then the mask is 252 etc.
3) The Magic #: This row shows the magic number. This number is the value when subtracts mask vale from 256. Ex 256-255 =1; 256-254=2; 256-4=252 etc. (you could further refine this to remember the smaller purple colored numbers as those are the only numbers that makes sense for subnetting) You can combine these two tables if you like or make any other variations so you can easily memorize it. Another important thing that you need to remember is the classes.
Class A: 1-126 Class B: 128-191 Class C: 192-223
Class A: NHHH Class B: NNHH Class C: NNNH (N= Network Bits; H = Host Bits)
Now lets put all this into action by tackling a subnet problem. I assume you have the understanding of CIDR notation. Ex1. 192.168.40.0/27 What can you see from this?
192 is a Class C address therefore we have borrowed (27-24), 3, network bits. Using table B, bit 3, mask shows as 224 and the magic number is 32. 2*3 shows (table A) 8 which represents 8 subnets.
This tells you the 1st subnet address is 192.168.20.32 and second subnet is 192.168.20.64 and the 3rd subnet is 192.168.20.96 and so on. So the subnets are counting by (32s); .32, .64, .96, .128, .. Lets look at the second subnet address: 192.168.40.64. The 1st usable host IP address would be 192.168.40.65; just add a one to the network address. The broadcast address for this subnet would be 192.168.40.95. We got 95 by subtracting a one from the next network address 96. Once we know the broadcast address, we can figure out the highest usable IP which is just subtracting one from the broadcast address: 192.168.40.94.
If you practice this enough you can answer most subnet problems just by looking at them. Then not only can you surprise your colleagues and friends but you can complete your CCNA certification exam with confidence.
Happy subnetting!