# Subnet calculation In this tutorial I will show how to calculate subnetting. Shoutout to my teacher Philippe Brassard from O’sullivan College for this awesome technique!

So we will use the following scenario to go through the calculations :

• Given Network IP Address : 10.0.0.0/8
• Subnet mask : 255.0.0.0 / binary : 11111111.00000000.00000000.00000000
• Number of subnets we need : 50

With this setup we can start our calculations. We need to know how many bits to take from our subnet mask. So for 50 subnets we need 6 bits which gives 64 possible subnets. 5 bits would not be enough(32).

With the needed bits we get our new subnet mask which will provide the “magic number” and “significant octet” The magic number represents the gap between two networks and increments on every new level in the significant octet. The second octet is our significant octet so that is where it increases of 4 every networks.

This should give us all the subnets we need. I think i will write a Python script that can do it for us :). Thanks for reading and stay tuned!

This site uses Akismet to reduce spam. Learn how your comment data is processed.