Variable Length Subnet Masking (VLSM) allows networks to be divided into subnets of different sizes, making far more efficient use of available IP address space than the fixed-length approach it replaced. This topic also covers CIDR notation and the concept of route summarization.
VLSM Overview
In the module we talked a lot about subnets and how to do subnetting. This was something that was created around 1985 with RFC 950, but it still had some weaknesses, and so what happened is we still outgrew that model and needed to make some changes. So that's where variable length subnet mask came into play and fixed some of the issues that we had with the earlier iteration of this.
So what is the difference between the 1985 version of subnet masks versus the 1995 version of subnet mask? Well, one is fixed length subnet masking and the other one is variable length subnet masks.
What fixed length means is, let's say I was given a 172.16.0.0. We know that the classful range of that is a slash 6 theme. Let's say I were to borrow four bits, so I'm going to go with the slash 20. That means every single subnet to this address right here is going to be a slash 20. You can't change that at all, they're all going to be the same size.
Versus VLSM means that maybe we have one network that's a slash 20, maybe the next network is slash 21, maybe the next one after that is a slash 24, maybe the next one after that is a slash 29. So I can actually have variable length within here. What this does is it frees up a lot more IP addresses, so that way we can really utilize our IP address space. So this one still has a lot of waste to it, so it uses more IP addresses.
So the configuration of this — this says that the configuration for FLSM is easy. I'm not sure that I would necessarily say subnetting is easy in itself, but it's easier than variable length subnet mask. And I don't know that I'd actually say variable length subnet mask is all that much more complex than regular subnet masking. In fact, we're going to do a visualization exercise here, and it's pretty simple and straightforward for the most part.
All right, so routing protocol — how your router operates. If you have all the same length mask, then the router is able to deal with that fairly easily. A router doesn't need to do anything special to really compensate for those different subnets when it comes to fixed length subnet masking. We're not going to get real in depth into routing; just know that it can still operate off of those old boundaries of classful addresses, and it has a way just to figure out locally what those different subnets are.
But as soon as you go to variable length subnet masks, you can't use that classful routing anymore. You have to have classless routing. And so once again, this isn't a routing course — just know that when we made this switch, it made some significant differences in how we do routing and how our routers performed. So just know that there's a difference there.
This is the visualization table that we use towards the end of the last module. So when we talk about fixed length subnet masking, or that 1985 version of this, we're going to choose how many bits we're going to borrow. So let's say we had a network that required us to have at least 55 hosts to it. I'm going to have to choose to borrow enough bits that is going to allow for that. So if I borrow two bits, that would allow for that network with 55 hosts on it — it actually gives us 62 usable hosts with it. And then every single network underneath that would be the same exact size, no matter if I needed just like two addresses; it would still have to have the whole range for that.
So what variable length subnet masking allows us to do is still allow us to use that address range that gives us 62 addresses there, but it also allows us to maybe choose a subnet that has only four addresses — or excuse me, borrowing four networks to it — and so now we have 16 addresses. So maybe this is the next network right here, and we just have this that's being utilized. And then maybe we have another network that has the same requirements, maybe it has like 12 hosts that it needs on there, so we choose another one. Maybe we have yet another network that's still that same size, so we choose that same size right there. Now we have a network that needs considerably less, so then we can choose this one right here, and maybe we've got a few of those networks as well.
So this is what it ends up looking like, where we're utilizing different size chunks of this. And as long as there's no overlap, you're good. So if I'm using this block right here, I wouldn't be able to use this block right here — those addresses are already spoken for. So that's what variable length subnet masking is.
So now, quite a few concepts all came out about the same time. There was CIDR, there was classless, there was VLSM. So all of these kind of were really closely related, and we're not going to pick this apart too much, but I did want to call this out.
Now if you do a search for what VLSM is versus CIDR, there is an understanding out there that's a little bit false. The understanding is that CIDR generally has to do with summarization and grouping up blocks into supernets, versus VLSM has a kind of breaking it down. Now if you actually technically look at it and go back and look at the RFCs, that's really not quite what the case is. CIDR is more of a bigger picture, versus VLSM is somewhat how to implement that. And then CIDR really has that summarization aspect to it. We also have CIDR notation to it. But really, the nuance between the differences of those are really not all that important.
I did want to call that out if you're reading stuff — I feel like there's a little bit of inaccurate information in there. But the way the history, or the way the industry goes, you kind of accept what the default explanation is of it. And the default explanation, or what people seem to be going towards, is that CIDR has more to do with summarization versus VLSM has to do with more of like breaking it down into smaller and smaller pieces.
Let's real briefly cover what CIDR notation is. I say briefly because we've already covered CIDR notation and we have been using it already. But CIDR notation did come around about the same time classless and VLSM came about, and it's just a different way to express the subnet mask. So where we have the subnet mask, there's a direct correlation between the subnet mask and our CIDR notation that represents how many bits that we're borrowing. So this is the CIDR notation. This chart is pretty handy, because we can quickly reference between the subnet mask and the CIDR notation.
With network summarization, really as I mentioned, this is really associated with that CIDR and supernetting, or being able to take many networks and group them together. And really this is for the purposes of advertising from routers. So when the router sends out an advertisement, it's not sending out advertisements for every single little network — it's summarizing it into one network.
Subnetting is the process of breaking these things down into smaller networks here. So maybe we have broken this into — how much is that, one, two, three, four, five, six — six different networks there. So we got these six different networks, so that is subnetting, to break that down. A summarization happens on a router and says, rather than advertising six different routes or keeping track of six different networks, what I'm going to do is I'm just going to summarize this into this network right here. I'm going to keep that in my routing table, I'm going to send that out with my routing updates. And so it's just a much simpler way of expressing all of these smaller routes right here. Ultimately it's a summarization of many different networks.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →