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:

  • network address: 10.0.5.160/30
  • netmask: 255.255.255.252
  • first host: 10.0.5.161
  • last host: 10.0.5.162
  • broadcast address: 10.0.5.163

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:

  • network address:10.0.5.164
  • first host: 10.0.5.165
  • last host: 10.0.5.166
  • broadcast address: 10.0.5.167

Subnet 7 (free space) has 8 addresses:

  • network address:10.0.5.168
  • first host: 10.0.5.169
  • last host: 10.0.5.174
  • broadcast address: 10.0.5.175

Subnet 8 (free space) has 16 addresses:

  • network address:10.0.5.176
  • first host: 10.0.5.177
  • last host: 10.0.5.190
  • broadcast address: 10.0.5.191

Subnet 9 (free space) has 32 addresses:

  • network address:10.0.5.192
  • first host: 10.0.5.193
  • last host: 10.0.5.222
  • broadcast address: 10.0.5.223

Subnet 10 (free space) has 32 addresses:

  • network address:10.0.5.224
  • first host: 10.0.5.225
  • last host: 10.0.5.254
  • broadcast address: 10.0.5.255

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:

11000100.00000000.00000000.00000000

So we have:

  • network address 196.0.0.0 (11000100.00000000.00000000.00000000)
  • 1st host address 196.0.0.1 (11000100.00000000.00000000.00000001)
  • last host address 199.255.255.254 (11000111.11111111.11111111.11111110)
  • broadcast address 199.255.255.255 (11000111.11111111.11111111.11111111)

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

I hope this has been helpful!

Laz