# Variable Length Subnet Mask (VLSM)

I see, thank you for the explanation @lagapides

1 Like

here Gabriel did not mention the free space.
After subnet 4 (size 30) . AT subnet 5(size 2) becomes 10.0.5.158 and then free space becomes 10.0.5.160

Hello Pavan

Iām not sure what you mean when you say āfree space.ā Based on his original Subnet 5 is indeed what he has stated, with the following elements:

• first host: 10.0.5.161
• last host: 10.0.5.162

In the above subnet, the network is a /30 network with four addresses. One broadcast, one network, and two host addresses, as stated.

Can you clarify what your question is? Thanks!

Laz

In Your example you mentioned free space. So I meant after size 128 you should add size 32 in subnet 5. Then size 2 becomes free space

Hello Pavan

Ah, I see what you mean. Yes, in the original post that you are referring to, the free space was not calculated. The poster only determined the subnets to be used. However, if we want to do that we can achieve it like so:

Subnet 6 (free space) has 4 addresses:

• first host: 10.0.5.165
• last host: 10.0.5.166

Subnet 7 (free space) has 8 addresses:

• first host: 10.0.5.169
• last host: 10.0.5.174

Subnet 8 (free space) has 16 addresses:

• first host: 10.0.5.177
• last host: 10.0.5.190

Subnet 9 (free space) has 32 addresses:

• first host: 10.0.5.193
• last host: 10.0.5.222

Subnet 10 (free space) has 32 addresses:

• first host: 10.0.5.225
• last host: 10.0.5.254

Of course, we can keep going because the original poster said that weāre looking at the 10.0.0.0/8 network to be subnetted. Thereās a lot of free space there, but thereās no reason to continue, since weād just be getting bigger and bigger subnets (with 512, 1024, or more hosts), which would be unusable anyway. The good thing is that we have determined the sizes of the next networks so these can be set aside for future use.

I hope this has been helpful!

Laz

Hello.

If I use CIDR, can I go below the default maskās boundary? So would for example a 196.0.0.0/6 be a possible subnet? Or does the default mask determine the lower bound in CIDR as well, and not just in classful subnetting?

Based on the output of some subnet calculators I tried, the answer should be yes, and this is what I think is implied by the materials that Iāve studied, but I just wanted to confirm if I didnāt jump to conclusions and that the calculators arenāt poorly programmed. This wasnāt explicitly stated in any material I covered, so Iām not completely sure.

The only exception seems to be Wendell Odomās book, where he heavily implies what I wrote above:
āClassless addressing: The concept that an IPv4 address has two partsāthe prefix part plus the host partāas defined by the mask, with no consideration of the class (A, B, or C)
Classful addressing: The concept that an IPv4 address has three partsānetwork, subnet, and hostāas defined by the mask and Class A, B, and C rules.ā

What he calls ānetworkā seems to be the range of the default mask, but I just want to double-check this with someone else as well.
Thanks.

EDIT: Sorry, I made a mistake! Originally, I thought you could somehow subnet networks backwards. For example, for some bizarre reason that I canāt understand, I thought that if you had, say the 192.168.0.0/16 network, you could turn it into something like a 192.0.0.0/6, based on this calculator: https://www.calculator.net/ip-subnet-calculator.html?cclass=any&csubnet=6&cip=192.168.0.0&ctype=ipv4&printit=0&x=66&y=17

But that is clearly wrong, because with 192.168.0.0/16, the very first IP in the list of all IPs that belong to that subnet IS 192.168.0.0, so the list canāt go backwards (ie I canāt subnet 192.168.0.0 into a 192.168.0.0/6, because then Iād have to use IPs that werenāt in my original list of IPs). The calculator is correct though, but what itās saying is āhypothetically speaking if you had control of every single IPv4 address in existence, hereās the /6s you could have.ā So I misunderstood its output. Itās using the 0.0.0.0/0 network, not 192.168.0.0/16.

Iāll leave this post here, for the whole world to see my mistake, in the hope that someone else might have this exact (or a similar) misunderstanding about this topic, and hopefully my mistake helps them see correctly.

Hello Attila

Yes you can. Just like the quote you stated says, classless addressing pays no regard to classful rules. So you can split the address between the network and host portions anywhere you like.
For your example, if we take 196.0.0.0/6 and change it to binary:

`11000100.00000000.00000000.00000000`

A /6 means that the first six bits define the network address like so:

`110001``00.00000000.00000000.00000000`

So we have:

• network address 196.0.0.0 (`110001``00.00000000.00000000.00000000`)
• 1st host address 196.0.0.1 (`110001``00.00000000.00000000.00000001`)
• last host address 199.255.255.254 (`110001``11.11111111.11111111.11111110`)
• broadcast address 199.255.255.255 (`110001``11.11111111.11111111.11111111`)

That gives us 67,108,863 host addresses within this subnet.

I hope this has been helpful!

Laz