Today i thought i would talk a bit about subnetting. For all those out there in the IT industry, you know the importance of subnetting. Some may know how to calculate a proper subnet, but for those that are unsure i will explain. Subnet’s allow pc’s on a network to communicate with each other, it allows you to find other pc’s on the same network you are connected to among many other things. For those who are not sure what a subnet is i will give an example and move forward to explain how to calculate a proper subnet for your network. So what is a subnet? here is an image of what one looks like on a home network.

So what does this tell us? this says that i can use 254 ip address’. How do i get this? well here it goes.

Each octet of an ip address represents 8 bits. A bit can be a 1 for on or 0 for off. if we turned on all bits in an ip address it would look like 11111111.11111111.11111111.11111111 or 255.255.255.255 . So how do i get 255 for each octet from all bits being turned 0n?. well the short of it is that each bit represents a particular number. I won’t get into all the gory details of subnetting but I will give you the highlights and answer any questions from there. Each bit turned on represents 128 64 32 16 8 4 2 1. notice each number as it progress’ is doubled. If you added these numbers up you would get 255. so for each octet you get a max number of 255. 255 is always reserved for the last subnet and should never be used for an IP.

In this case we can use ip’s 192.168.1.1 – 192.168.1.254. With Cisco zero subnet you can now use 192.168.1.0 -254 but we will not get into that.  The last number in the subnet is always reserved for what we call a broadcast address which in this case is 255.

Lets say you only wanted 62 ip’s how do we figure out the subnet for that? well we add 2 for reserved IP’s and we get 64 subtract 64 from 256 and you get 192. this will be your subnet which will look like 255.255.255.192. So how do we figure the hosts from here? if we turn on the first 2 bits like this 11000000 for the last octet we add 128 + 64 because those bits are turned on right? this gives us 192 . It also tells us since the first 2 bits are turned on, the number of subnet’s we can use is 2^2 or 4 subnet’s. So the bits turned off gives us the block sizes that are associated with these subnet’s. Our block sizes are 2^6 because 6 bits are turned off. Most everything here is a multiple of 2, so 2^6 gives us a block size of 64.

For 255.255.255.192  subnet we can use the following

  • 192.168.1.1 – 62 with 63 reserved for the broadcast. 64 is our next subnet.
  • 192.168.1.65 – 126 with 127 reserved for broadcast. 128 is our next subnet.
  • 192.168.1.129 – 190 with 191 reserved for broadcast. 192 is our next subnet.
  • 192.168.1.193 – 254 with 255 reserved for broadcast ip.

This is the quick and albeit short explanation of how to calculate a subnet. From here you can calculate either 128 64 32 16 8 4 size subnets fairly easy, or if you feel real brave you can go on to variable length subnet mask which deals with more granular size subnet’s for segmenting your networks.

Please feel free to ask questions if you like. I certainly enjoy the feedback as well! thanks.