- VLSM (Variable Length Subnet Mask) divides a network into subnets of different sizes. Each subnet matches its real host count.
- Fixed-length subnetting (FLSM) wastes addresses by forcing every subnet to the same size.
- Supernetting (route aggregation) is the reverse. It combines contiguous networks into one larger block to shrink routing tables.
- VLSM works downward to split a network. Supernetting works upward to combine routes.
- Both rely on binary math and underpin modern CIDR addressing.
If you have finished our beginner’s guide to subnetting, you can already split a network into equal pieces. That skill is essential. But it has one limit. Real networks are never uniform. A server room with 200 hosts and a WAN link with 2 hosts should not get the same size subnet.
This is where VLSM and supernetting come in. VLSM uses different prefix lengths within one address space. It allocates exactly what each department or link needs. Supernetting works the other way. It combines multiple smaller networks into one summarized route. Both operate at Layer 3 of the OSI model, where IP addressing and routing happen.
We will walk through both concepts with complete worked examples. You can apply them in network design, on certification exams, or in production.
Quick Review: Fixed-Length Subnetting (FLSM)
Fixed-length subnetting gives every subnet the same prefix and the same size. It is simple to plan and easy to read. The drawback is waste: you must size every subnet for your largest segment. Small links end up with hundreds of unused addresses.
In fixed-length subnetting, every subnet uses the same prefix length. Splitting 192.168.1.0/24 into four subnets gives four /26 networks. Each /26 has 62 usable host addresses:
| Subnet | Network Address | Usable Range | Broadcast | Usable Hosts |
|---|---|---|---|---|
| 1 | 192.168.1.0/26 | .1 – .62 | .63 | 62 |
| 2 | 192.168.1.64/26 | .65 – .126 | .127 | 62 |
| 3 | 192.168.1.128/26 | .129 – .190 | .191 | 62 |
| 4 | 192.168.1.192/26 | .193 – .254 | .255 | 62 |
FLSM is simple, but the problem is clear. If one department needs 100 hosts, a /26 (62 usable) is too small. You would need a /25. But then the other three departments each get a /25 too. You run out of addresses inside a single /24. FLSM forces you to size every subnet for your largest requirement, wasting addresses everywhere else.
What Is VLSM?
VLSM lets each subnet carry its own mask, sized to its real host count. A busy department gets a large block while a router link gets a tiny one. Every subnet comes from the same parent network. The result is far less wasted address space.
VLSM stands for Variable Length Subnet Mask. It does not apply one uniform prefix across all subnets. Instead, it assigns each subnet a mask based on its real host count. A large department gets a /25 while a point-to-point link gets a /30. Both are carved from the same parent network.
The key principle is simple. Allocate the largest subnets first, then fill smaller subnets from the remaining space. This avoids overlapping allocations and maximizes efficiency. VLSM is how every modern enterprise network is designed. It is a core topic on the CompTIA Network+ and CCNA exams.
To use VLSM well, get comfortable with binary-to-decimal conversion and powers of two. If those feel rusty, review our subnetting beginner’s guide first. Our CIDR Notation Explained guide covers the prefix math behind every mask in this article.
VLSM Step by Step
The method is always the same. Sort your subnets from largest to smallest. Allocate the biggest first, then place each next subnet right after the previous broadcast address. Pick the smallest prefix that fits each host count. This order prevents gaps and overlaps.
Let’s work through a complete VLSM example. This is the most important section, so follow along carefully.
You have been assigned the network 192.168.1.0/24 (256 total addresses, 254 usable). You need to create subnets for four departments:
- Sales: 100 hosts
- Engineering: 50 hosts
- Management: 25 hosts
- Point-to-point WAN link: 2 hosts
Step 1: Sort by Size (Largest First)
Always start with the subnet that requires the most hosts and work your way down. This prevents fragmentation and overlapping allocations.
- Sales — 100 hosts
- Engineering — 50 hosts
- Management — 25 hosts
- Point-to-point link — 2 hosts
Step 2: Allocate the Largest Subnet (Sales)
Sales needs 100 hosts. Find the smallest power of two that fits 100 hosts plus the network and broadcast addresses:
2^7 = 128 addresses (128 - 2 = 126 usable) ✔
2^6 = 64 addresses ( 64 - 2 = 62 usable) ✘ too small
We need 7 host bits, so the prefix is /25 (32 – 7). The first available address is the start of our /24:
Sales: 192.168.1.0/25
Network: 192.168.1.0
Usable: 192.168.1.1 – 192.168.1.126
Broadcast: 192.168.1.127
Hosts: 126 usable (100 needed)
The next available address after this block is 192.168.1.128.
Step 3: Allocate the Next Subnet (Engineering)
Engineering needs 50 hosts. The next power of two:
2^6 = 64 addresses (64 - 2 = 62 usable) ✔
That gives us a /26 (32 – 6 = 26). Starting from 192.168.1.128:
Engineering: 192.168.1.128/26
Network: 192.168.1.128
Usable: 192.168.1.129 – 192.168.1.190
Broadcast: 192.168.1.191
Hosts: 62 usable (50 needed)
Next available address: 192.168.1.192.
Step 4: Allocate Management
Management needs 25 hosts:
2^5 = 32 addresses (32 - 2 = 30 usable) ✔
A /27 (32 – 5 = 27). Starting from 192.168.1.192:
Management: 192.168.1.192/27
Network: 192.168.1.192
Usable: 192.168.1.193 – 192.168.1.222
Broadcast: 192.168.1.223
Hosts: 30 usable (25 needed)
Next available address: 192.168.1.224.
Step 5: Allocate the Point-to-Point Link
A point-to-point link needs exactly 2 usable addresses, one per router interface. The standard practice is a /30:
2^2 = 4 addresses (4 - 2 = 2 usable) ✔
Point-to-point: 192.168.1.224/30
Network: 192.168.1.224
Usable: 192.168.1.225 – 192.168.1.226
Broadcast: 192.168.1.227
Hosts: 2 usable (2 needed)
Final VLSM Allocation Table
| Department | Network | Mask | Usable Range | Broadcast | Needed | Available |
|---|---|---|---|---|---|---|
| Sales | 192.168.1.0/25 | 255.255.255.128 | .1 – .126 | .127 | 100 | 126 |
| Engineering | 192.168.1.128/26 | 255.255.255.192 | .129 – .190 | .191 | 50 | 62 |
| Management | 192.168.1.192/27 | 255.255.255.224 | .193 – .222 | .223 | 25 | 30 |
| Point-to-point | 192.168.1.224/30 | 255.255.255.252 | .225 – .226 | .227 | 2 | 2 |
Total addresses used: 128 + 64 + 32 + 4 = 228 out of 256. The remaining 28 addresses (192.168.1.228 through 192.168.1.255) stay free for future growth. Verify these results with our subnet calculator. Or expand any block to its full IP list with the CIDR to IP Range Converter.
VLSM vs FLSM: A Direct Comparison
The same four departments expose the gap. FLSM forces every subnet up to a /25 and burns 327 addresses across a /22. VLSM fits all four inside one /24 and wastes only 43. On scarce IPv4 space, that difference decides whether a plan even fits.
What if we force the same four departments into FLSM? Sales needs 100 hosts, so every subnet must be at least a /25 (126 usable). But a /24 holds only two /25 subnets. FLSM fails entirely for this scenario inside a single /24.
Use a larger block, say 192.168.0.0/22 (1,024 addresses), with FLSM /25 subnets. That gives eight subnets of 126 hosts each. It fits all four departments, but look at the waste:
| Department | Hosts Needed | FLSM (/25) Allocated | FLSM Wasted | VLSM Allocated | VLSM Wasted |
|---|---|---|---|---|---|
| Sales | 100 | 126 | 26 | 126 | 26 |
| Engineering | 50 | 126 | 76 | 62 | 12 |
| Management | 25 | 126 | 101 | 30 | 5 |
| Point-to-point | 2 | 126 | 124 | 2 | 0 |
| Total | 177 | 504 | 327 | 220 | 43 |
FLSM wastes 327 addresses; VLSM wastes only 43. More important, VLSM fits everything inside one /24. FLSM needs a /22. Where IPv4 addresses are scarce, that difference matters enormously. VLSM also helps with private IP ranges (10.x.x.x, 172.16.x.x, 192.168.x.x). It uses them efficiently across departments of every size.
What Is Supernetting?
Supernetting is subnetting run in reverse. Instead of splitting one block into many, you combine many contiguous blocks into one. It is also called route aggregation or summarization. The goal is fewer routing-table entries, not more host space.
Supernetting is the conceptual opposite of subnetting. Instead of dividing a network into smaller pieces, you combine contiguous networks into one larger block. It is also called route aggregation, route summarization, or CIDR aggregation.
The purpose is to reduce routing-table entries. Suppose a router knows four contiguous /24 routes with the same next-hop. It can advertise one /22 summary route instead. Fewer routes mean faster lookups, lower memory use, and more stable routing.
Supernetting Example
Four contiguous /24 networks share the same first 22 bits. That shared prefix lets you advertise them as a single /22 route. The router carries one entry instead of four. The blocks must be contiguous and start on a valid /22 boundary.
Suppose an ISP assigned your organization four contiguous /24 networks:
192.168.0.0/24192.168.1.0/24192.168.2.0/24192.168.3.0/24
Can these become a single supernet? Convert the third octet of each network to binary and find the common prefix:
192.168.0.0 → 192.168.00000000.0
192.168.1.0 → 192.168.00000001.0
192.168.2.0 → 192.168.00000010.0
192.168.3.0 → 192.168.00000011.0
^^^^^^^^^^^^^^^^
Common bits: 192.168.000000xx.x = first 22 bits match
The first 22 bits are identical across all four networks. So we can summarize them as:
Supernet: 192.168.0.0/22
Mask: 255.255.252.0
Range: 192.168.0.0 – 192.168.3.255
Total: 1,024 addresses (4 × 256)
Instead of advertising four routes, the router advertises one. Use our IP binary converter to verify the bit alignment yourself.
Supernetting works only when the networks are contiguous and the count is a power of two (2, 4, 8, 16…). The starting network address must also divide evenly by the number of networks combined. For example, you cannot supernet 192.168.1.0/24 through 192.168.4.0/24. The address 192.168.1.0 is not on a /22 boundary.
Why Supernetting Matters
Supernetting keeps the internet’s routing tables manageable. The global IPv4 table already holds over one million routes. Aggregation at ISP and enterprise boundaries stops that number from exploding. Smaller tables mean lower router memory use and faster convergence.
Supernetting is not just academic. It has critical real-world applications:
- BGP route aggregation: The global IPv4 routing table already holds over one million routes. Without summarization, that count would be far higher, overwhelming router memory and CPU.
- ISP address allocation: ISPs receive large CIDR blocks from regional registries like ARIN or RIPE. They allocate smaller blocks to customers. Supernetting lets them advertise one summarized route upstream.
- Internal routing efficiency: Large enterprises run hundreds of subnets. Summarization at area or distribution boundaries keeps OSPF and EIGRP tables manageable.
- Faster convergence: Fewer routes mean routing updates propagate more quickly when the topology changes.
When to Use VLSM vs Supernetting
VLSM and supernetting move in opposite directions. VLSM divides a block downward for efficient internal addressing. Supernetting combines blocks upward for compact routing. Most engineers use both: VLSM to design the network, supernetting to advertise it cleanly.
Both techniques manipulate prefix lengths, but they solve different problems. They also operate at different levels of network design:
| Aspect | VLSM | Supernetting |
|---|---|---|
| Direction | Divides down (longer prefixes) | Combines up (shorter prefixes) |
| Purpose | Efficient internal address allocation | Routing table reduction |
| Typical use | Network design, IP planning | BGP, OSPF summarization, ISP allocation |
| Prefix change | /24 becomes /25, /26, /27, /30 | Four /24s become one /22 |
| Scope | Within a single allocated block | Across multiple contiguous blocks |
Think of it this way. VLSM is an architect’s tool for the floor plan of a building (internal layout). Supernetting is a city planner’s tool for grouping buildings into one postal zone (external routing). Most network engineers use both daily.
Common Pitfalls
A few mistakes catch even seasoned engineers. Overlapping VLSM blocks, non-contiguous supernets, and invalid summary boundaries top the list. Classful routing protocols that drop the mask cause others. Allocating every last address with no room to grow causes the rest.
Advanced subnetting introduces traps that catch even experienced engineers:
1. Non-Contiguous Blocks Cannot Be Supernetted
You cannot summarize 192.168.0.0/24 and 192.168.5.0/24 into one route. The networks must be adjacent with no gaps. If they are not contiguous, advertise them as separate routes.
2. Overlapping VLSM Allocations
The most common VLSM mistake is overlapping subnets. Say you allocate 192.168.1.0/25 (addresses .0 through .127). Then you start the next subnet at 192.168.1.64/26. Those two subnets overlap. Always start the next allocation right after the previous broadcast address. Use our subnet calculator to double-check boundaries. Or run each block through the CIDR to IP Range Converter to see start and end addresses side by side.
3. Routing Protocol Compatibility
Not all routing protocols carry subnet mask information in their updates. This matters because of route lookups. A router receiving a route for 192.168.1.0 must know its prefix length.
- Supports VLSM: OSPF, EIGRP, IS-IS, BGP, RIPv2
- Does NOT support VLSM: RIPv1, IGRP (both classful and deprecated)
If your network runs RIPv1, every subnet must use the same mask (FLSM). This is one reason classful routing protocols have been retired.
4. Forgetting Future Growth
When planning VLSM allocations, do not assign every last address. Leave gaps between subnets for future expansion. Our worked example left 28 addresses unallocated. Aim for at least 20-30% headroom in each subnet.
5. Incorrect Supernet Boundaries
A common exam mistake is supernetting networks that do not align to a valid boundary. For example, 192.168.1.0/24 through 192.168.4.0/24 is four networks. But 192.168.1.0 is not a valid /22 boundary (1 is not divisible by 4). The valid /22 boundaries in the third octet are 0, 4, 8, 12, 16, and so on.
Related Tools & Resources
NetworkCheckr pairs this guide with free calculators. The Subnet Calculator and CIDR to IP Range Converter check every allocation. The IP to Binary Converter confirms your supernet bit math. The beginner’s subnetting guide covers the groundwork.
- Subnet Calculator — verify every VLSM allocation and boundary.
- CIDR to IP Range Converter — expand any block to its first IP, last IP, and host count.
- CIDR Notation Explained — the dedicated guide to reading any /8 through /32 prefix.
- Subnet Mask Cheat Sheet — every prefix from /0 to /32 with masks, wildcards, and host counts.
- IP to Binary Converter — confirm supernet bit alignment as you work.
- Subnetting Beginner’s Guide — the FLSM and CIDR groundwork for this article.
- IP Address Formats Explained — decimal, binary, hex, and CIDR notation.
- Networking Glossary — every VLSM, CIDR, and routing term defined in one place.
- All NetworkCheckr Tools — the complete collection of free utilities.
Frequently Asked Questions
Six questions cover the points readers raise most. VLSM versus FLSM, routing-protocol support, and route summarization. Whether VLSM applies to IPv6, how to avoid overlaps, and how supernetting relates to CIDR.
What is the difference between VLSM and FLSM?
FLSM (Fixed-Length Subnet Mask) uses the same subnet mask for every subnet. It does this regardless of how many hosts each subnet actually needs. VLSM (Variable Length Subnet Mask) lets each subnet have a different mask. You can allocate a /25 for a large department and a /30 for a point-to-point link. Both come from the same parent network. VLSM is far more address-efficient and is the standard approach in all modern network design.
Do all routing protocols support VLSM?
No. Only classless routing protocols support VLSM because they include the subnet mask in their route advertisements. These include OSPF, EIGRP, IS-IS, BGP, and RIPv2. Older classful protocols like RIPv1 and IGRP assume all subnets use the same mask and cannot handle VLSM. In practice, classful protocols have been deprecated and should not be used in new deployments.
What is route summarization?
Route summarization is also called route aggregation or supernetting. It combines multiple contiguous network routes into a single, shorter-prefix route. For example, four /24 networks can be summarized into one /22. This reduces the number of entries in routing tables. It also lowers router memory and CPU usage. And it speeds up route convergence when the topology changes.
Can I use VLSM with IPv6?
Yes, but it is less critical. IPv6 has a vastly larger address space (128-bit versus 32-bit), so address conservation is not the primary concern. However, the concept of using different prefix lengths for different network segments still applies. The standard IPv6 practice assigns a /64 to every LAN segment. Point-to-point links get a /127, defined in RFC 6164. That is conceptually similar to VLSM.
How do I avoid overlapping subnets in VLSM?
Follow two rules. First, always allocate subnets from largest to smallest. Second, start each new subnet right after the previous subnet’s broadcast address. After completing your plan, verify that no subnet’s range overlaps with another. Tools like a subnet calculator can help confirm boundaries. Drawing a number line of the full address space and shading each allocation is also a reliable visual check.
Is supernetting the same as CIDR?
They are closely related but not identical. CIDR (Classless Inter-Domain Routing) is the broader system. It eliminated the old Class A/B/C boundaries and introduced slash notation like /22. Supernetting is a specific application of CIDR where you combine multiple smaller networks into a larger aggregate. In other words, CIDR is the framework and supernetting is a technique made possible by that framework. See IP address formats explained for more on CIDR notation.