Networking Foundations: Subnetting Based on Host Requirements

Subnetting Based on Host Requirements

Hello everyone! I hope you are having a great day so far. Today, instead of caring about networks we are going to talk about subnetting based on host requirements as promised in my first article about subnetting. Just like in the previous articles we will jump right into the examples because that's the best way to learn.

The examples we will be talking about will look and feel the same as the ones we did in the last articles but there is a major twist that makes it different. Let's get right into it!

Let's assume a company has purchased the class C address with the subnet mask and we are asked to break that address into 30 hosts per network.The good news is that the process is almost exactly the same with the one based on network requirements. Let me define "almost";

  • Convert the number of hosts to binary

The difference here is that instead of converting the desired number of networks, we convert the number of hosts we want per network back to binary.

  • Reserve bits in the subnet mask and find the increment

This is where it can get kind of tricky if we are not focused enough. In the previous articles we were after networks, thus 1s, but this time we are after hosts, hence 0s. Remember;

1s represent the network and 0s represent the hosts

In this case, all changes now. Keep in mind we are still subnetting. However, our main focus this time is not how many networks I get but how many hosts I get per network. 30's binary representation takes up to 5 bits, right?

Our new subnet mask is or /27. Do you see what I did there? 30 needs 5 bits so we need to save 5 host bits. Did you also notice how I "saved" those bits? Instead of going from left to right like we did with the network requirements, I went from right to left because that's where my 0s exist, that's where the client bits are at. So as long as we have 5 host bits, we know that we can get 30 hosts per network and I will prove it to you. The rest of the unsaved bits become 1s, thus the "11100000", because I don't need them for the clients. We meet our requirements and we are good to go. The rest ones can go to the network side because guess what, I'm still subnetting and I just want to make sure that each subnet has 30 hosts per network.

  • Use the increment in order to find the network ranges

Everything else is the same. That's the main story of it. Our focus is just on the 0s. So let's figure out our network ranges. Our increment is 32 because the lowest network bit converted back to a decimal number is 32 in our case. Let me give you a tip. If the increment's number is less than the hosts number, be concerned, something may got messed up on the way.

The first and the last address of each range aren't usable so we actually have exactly 30 usable hosts per network. Isn't that awesome?

So the small tweak is at the 1st and 2nd step where we aren't primarily focused on adding 1s, we are focused on saving 0s. "Save the hosts!" That's the sentence I have in my mind while I subnet based on host requirements.

Let's have a look at another example, shall we?

This time we are dealing with a class B address and the subnet mask and we want to have 500 hosts per network. As you may have thought, 500 can't be represented with the 8 bits we have available so that's why I added one more power of 2, thus the 256 decimal value. Do you see that I haven't completely written the full binary representation of 500? I think by now you understand that we just care about the number of bits and in our case it's 9. All you need to do is find the decimal value to start with and then stop and count how many bits would that take. Step 1 incoming!

  • Convert the number of hosts to binary
  • Reserve bits in the subnet mask and find the increment

Remember! Are we creating more networks, meaning focusing on the 1s or are we saving the hosts? "Save the hosts!", the Null Byte community says. We have to save 9 host bits because we can't get the number 500 with any less than 9 bits. So;

As promised, we saved the hosts! Our increment is 2. Remember, each octet restarts the increment.

  • Use the increment in order to find the network ranges

Be careful! As we said, the increment is added at the octer where it's at. Now you may be asking yourselves "how many hosts does that actually give us?". Very good question and you have the skills to do it but just in case you are feeling lazy let me remind you the formula for the last time. The number of hosts per network is 2^number of 0s, thus 2^9 which equals to 512, but we have to subtract 2 because we have the network and broadcast address which are addresses we can't assign to a client. So the number of usable hosts is 510. Now you may also be asking "But we want 500 hosts, not 510, isn't that kind of a waste of addresses?" Well, the answer is yes and no. Those addresses can be useful in case we need to expand our company in terms of hosts.

Are you up for another example? I'm not. It's time to get a paper and a pencil in front of you and start practicing.

Assignment: Break the network into 100 hosts per network

That's all for now guys. With that article we finished the subnetting concept but we are not completely done with it! The next 2 articles are going to be even more interesting and more practical. I hope this article has been informative for you and thank you for taking the time to read it. Feel free to post your questions down below and as always, have an amazing day and stay awesome.


Just updated your iPhone? You'll find new features for Podcasts, News, Books, and TV, as well as important security improvements and fresh wallpapers. Find out what's new and changed on your iPhone with the iOS 17.5 update.


I love the thumbnail.


Same here, love at first sight.

Share Your Thoughts

  • Hot
  • Latest