Subnetting Made Easy - written for my students at work

Unanswered Question
Oct 17th, 2007

An IP address is made up of 32 bits, split into 4 octets. Some bits are reserved for identifying the network and the other bits are left to identify the host.

There are 3 main classes of IP address that we are concerned with.

Class A Range 0 - 127 in the first octet (0 and 127 are, however, reserved)

Class B Range 128 - 191 in the first octet

Class C Range 192 - 223 in the first octet

Below shows you how, for each class, the address is split in terms of network (N) and host (H) portions.




At each dot I like to think that there is a boundary, therefore there are boundaries after bits 8, 16, 24, and 32. This is an important concept to remember.

Typical questions you may see are those asking what a host range is for a specific address or which subnet a certain address is located on. I shall run through examples of each, for each class of IP address.

What subnet does belong to?

You may wonder where to begin. Well to start with let's find the next boundary of this address.

Our mask is a /29. The next boundary is 32. So 32 - 29 = 3. Now 2^3 = 8 which gives us our block size.

We have borrowed from the last octet as the 29th bit is in the last octet. We start from zero and count up in our block size. Therefore it follows that the subnets are:-


Our address is so it must sit on the subnet.

What subnet does sit on?

Our mask is /19 and our next boundary is 24. Therefore 24 - 19 = 5. The block size is 2^5 = 32.

We have borrowed into the third octet as bit 19 is in the third octet so we count up our block size in that octet. The subnets are:-


Our address is so it must sit on the subnet. Easy eh?

What subnet does sit on?

Our mask is 12. Our next bounday is 16. Therefore 16 - 12 = 4. 2^4 = 16 which gives us our block size.

We have borrowed from the second octet as bit 12 sits in the second octet so we count up the block size in that octet. The subnets are:-


Our address is which must sit on the subnet.

We will now change the type of question so that we have to give a particular host range of a subnet.

What is the valid host range of of the 4th subnet of

Easy as pie! The block size is 16 since 32 - 28 = 4 and 2^4 = 16. We need to count up in the block size in the last octet as bit 28 is in the last octet.


Therefore the 4th subnet is and the host range must be to, remembering that the subnet and broadcast address cannot be used.

What is the valid host range of the 1st subnet of

/17 tells us that the block size is 24-17 = 7 and 2^7 = 128. We are borrowing in the 3rd octet as bit 17 is in the 3rd octet. Our subnets are:-

The first subnet is and the valid host range is to You must remember not to include the subnet address ( and the broadcast address (

What is the valid host range of the 7th subnet of address

The block size is 4, from 16 - 14 = 2 then 2^2 = 4. We are borrowing in the second octet so count in the block size from 0 seven times to get the seventh subnet.

The seventh subnet is Our valid host range must be to again remebering not to include our subnet ( and the broadcast address (


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
quantico24 Sun, 10/21/2007 - 06:45

It's seems to be easy but I don't understand the term block size...And all the time when you have for example a /15 mask you count forward to the next boundary so it's 24-15=9 and 2^9=.....right???

Do you have like a book about subnetting?

Thank you ...

LordFlasheart Sun, 10/21/2007 - 09:36


The term "block size" refers to the size of a subnet.

Your example is incorrect as the next boundary is at 16 (i.e. where is the next dot in the IP address?) For your example the boundary being at 16 means that your block size is 2^(16-15) = 2. So in the 2nd octet (remember that the 15th bit is within the 2nd octet) you have subnets at each even number:



Another example:

To which subnet does the host address reside on?

The next boundary is at 24. Your CIDR is /19 so 24-19 = 5. 2^5 = 32 which gives you the block-size. Therefore count up in blocks of 32 in the 3rd octet (bit 19 is in the third octet); 0, 32, 64, etc. Look at the IP address given. The 3rd octet is 31 so the subnet address must be

In essence though you are correct in your assumption that you count forward to the next boundary, just the excecution was flawed. Keep practicing and I promise you that if you stick to that technique you will be subnetting with your eyes shut sooner than you would believe.

Good luck!


miller811 Tue, 10/30/2007 - 05:14

I wanted to thank the original poster for this information.

I also wanted to bump it to the top to help others.

Reading this finally made it click and solved the mystery of subnetting for me and was instrumental in passing the CCNA yesterday.

LordFlasheart Tue, 10/30/2007 - 07:33

Congratulations! I'm glad you found it useful, and many thanks for bumping the thread!

Kind regards,


dale_lorenzen Fri, 11/02/2007 - 22:39

I wanted to thank you for posting this. This has got to be the most concise and least brain cell damaging explanation I've come across to figure out the subnets when using prefix notation.

LordFlasheart Mon, 11/05/2007 - 12:31

You're more than welcome. I'm glad that something that people think is hard can be made a hell of a lot easier.

Good luck!


LordFlasheart Mon, 11/12/2007 - 00:41

I'm glad I helped you to pass. Subnetting this way is guaranteed to cut down the time.

Best of luck for the future.


LordFlasheart Sun, 11/18/2007 - 10:26

Hi Sean,

What kind of help are you after? Perhaps it is better on here then we can perhaps help educate others as well?



bvsnarayana03 Sun, 11/18/2007 - 02:18

You deserve points for this post dude.

Request all who were helped by this post to Rate the author for his splendid work.

LordFlasheart Wed, 11/21/2007 - 03:11


Just to let you know that this tutorial is now available online at:

If anybody would like to link through there please PM me.

As time goes by I will be adding little bits here and there and am open to suggestions for content.

If you find the site useful please recommend to friends and colleagues.

Kind regards,


radumartin Tue, 12/04/2007 - 09:11

I just passed the CCENT test. I wanted to thank you for this post. Using your technique I'm able to answer subnetting questions in 20 sec in my head. Great job.


This Discussion