TechKnowSurge
CompTIA Network+ 1.7 Cisco CCNA 1.6 Cisco CCST Networking 2.2 CompTIA Network+ 2.1 Cisco CCNA 3.1
VideoNetworkFree

VLSM

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.

Complete this video to capture a CTF flag worth 1 point.

About this video

Fixed-length subnet masking, standardized in 1985 under RFC 950, requires every subnet derived from a given network address to be identical in size. While functional, this model wastes significant IP address space when networks have varying host requirements, since a small network must still occupy the same address block as a large one. Variable Length Subnet Masking (VLSM), which became practical in the mid-1990s alongside classless routing, solves this problem by allowing subnets of different sizes to coexist within the same address space. A single address block can be divided into a mix of large and small subnets, each sized to match actual host counts, as long as none of the ranges overlap. The transition to VLSM also changed how routers operate. Fixed-length masking is compatible with classful routing protocols, which rely on default address class boundaries to interpret subnet information. VLSM requires classless routing protocols, which carry explicit prefix length information and can handle subnets of arbitrary size. Alongside VLSM, CIDR notation became the standard way to express subnet masks, representing the number of network bits as a slash followed by a number, such as /24, rather than writing out the full dotted-decimal mask. CIDR is sometimes conflated with VLSM, but the two concepts are distinct. VLSM refers specifically to the practice of using subnets of different lengths within a single network, while CIDR is more broadly associated with route summarization, also called supernetting. Summarization is the process by which a router aggregates multiple contiguous subnet routes into a single, shorter prefix for advertising to neighboring routers. Rather than maintaining and distributing entries for every individual subnet, a router can represent a group of networks as one summarized route, reducing routing table size and simplifying network management.

What you'll learn

What's covered

VLSM Overview

Aligned to

CompTIA Network+
1.7 Given a scenario, use appropriate IPv4 network addressing.
2.1 Explain characteristics of routing technologies.
Cisco CCNA
1.6 Configure and verify IPv4 addressing and subnetting.
3.1 Interpret the components of routing table.
Cisco CCST Networking
2.2 Identify IPv4 addresses and subnet formats.

Key terms

Subnet
A logical subdivision of an IP network, used to organize and segment network traffic.
Subnet Mask
A 32-bit number that divides an IP address into network and host portions.
Fixed-Length Subnet Masking
FLSM
A subnetting method in which all subnets within a network use the same prefix length, resulting in equal-sized address blocks regardless of actual host requirements.
Variable Length Subnet Mask
VLSM
A subnetting technique that allows a network administrator to divide an address space into subnets of different sizes by using different prefix lengths, allocating address space more efficiently than fixed-length subnetting. VLSM requires a classless routing protocol such as OSPF, EIGRP, or RIPv2 that carries prefix length information in routing updates.
Classless Inter-Domain Routing
CIDR
A method for allocating IP addresses and expressing routing prefixes that replaces the older classful addressing scheme by using variable-length prefix notation (e.g., /24). CIDR enables more efficient use of IPv4 address space and reduces the size of internet routing tables through route aggregation.
Route Summarization
The process of combining multiple contiguous network routes into a single advertised route to reduce routing table size and simplify routing updates.

Transcript

Where VLSM came from

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.

Fixed length versus variable length

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.

What it means for routing

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.

The visualization table

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.

VLSM versus CIDR

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.

CIDR notation

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.

Summarization

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.

About TechKnowSurge

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 →