Google
 

Step 3: Figure Out the Subnet Mask
Now that the hardest part is over, the rest of the four tasks is easy. At this point, you now know the number of subnet bits you need. However, when dealing with networking and subnet masks, a subnet mask�s network portion contains both network and subnet bits. Here�s a reminder of the default number of networking bits for a class address: A is 8, B is 16, and C is 24.

Given this, just add the class address bits to the subnet bits, and this gives you the total number of networking bits. In our example, this would be 24 + 4 = 28. To make the remaining three steps easier, I recommend that you convert the number of bits of the subnet mask to a dotted decimal mask. However, this is not too hard of a process. First, remember that a subnet mask, just like an IP address, is represented in a dotted decimal format, where there are 8 bits in each octet. That means, for a Class C mask, the first 24 bits are set to 1. In other words, the mask at least begins with 255.255.255.

Our job is to figure out the mask in the last octet. Remember that the four highest bits are for subnetting, so just add up these decimal values: 128 + 64 + 32 + 16 = 240.

There is actually a short cut that I always like to use. If you recall from our example, the number of host bits that are used are the four lower-order bits. Add up these values: 1 + 2 + 4 + 8, which equals 15. The largest number represented by a byte is 255. Since we�re not using these bits, just subtract this value from 255, which will give us the mask value in this byte 255 - 15 = 240. I find it easier to add up the small values and subtract them from 255 than to add up the larger bit-decimal values. Eventually, you wont� have to do this mathematical trick as you become accustomed to performing IP addressing and dealing with subnetting. Going back to our example, our subnet mask for network 192.168.1.0 is 255.255.255.240, or 192.168.1.0/28.

ccnaguru.com

Step 4 >>>