VLSM Subnetting Explained with Examples
There are two types of subnetting: FLSM and VLSM. FLSM creates the same-sized subnets. In it, all subnets have the same number of IP addresses. For example, if you have a subnet of 12 IP addresses, FLSM allows you to break it into 2, 3, and 4 subnets. If you split it into 2 subnets, each subnet will get 6 IP addresses (12 / 2 = 6). If you break it into 3 subnets, each will get 4 IP addresses (12 / 3 = 4). Similarly, breaking it into 4 subnets gives 3 IP addresses in each subnet (12 / 4 = 3).
FLSM is easy to use and well-suited for a flat network. However, it is not scalable. It does not work if subnets have different requirements. For instance, suppose you need 7 IP addresses in one subnet and 3 IP addresses in another in the preceding example. In this case, you cannot use FLSM. FLSM creates the following subnets.
| Subnets | Hosts in each subnet |
| 2 | 6 |
| 3 | 4 |
| 4 | 3 |
You need 7 hosts in the first subnet and 3 in the second subnet. None of the above-listed combinations fulfills these requirements. For these requirements, you can use VLSM. Unlike FLSM, VLSM is not fixed. It is flexible and allows you to create subnets of different lengths. For example, to fulfill the given requirements, you can create two subnets. The first subnet provides 8 IP addresses. The second subnet provides four IP addresses. This example shows how VLSM allows you to utilize IP addresses based on your requirements.
VLSM Subnetting example
The following image shows a network.

The above network has the following requirements.
- The development department needs 74 IP addresses.
- The production department needs 52 IP addresses.
- The administration department needs 28 IP addresses.
- Three WAN links connect these departments.
- Each WAN link needs two IP addresses.
- The given default IP subnet is 192.168.1.0/24.
VLSM Subnetting
In the first step, calculate and arrange the IP requirements in descending order.
Each network needs two additional IP addresses, one for the network address and another for the broadcast address. All IP subnets reserve two IP addresses for these requirements. They use the first IP address for the network address and the last IP address for the broadcast address.
Since each network requires two additional IP addresses, add 2 to the total host requirement for each network. After finalizing the host requirement, determine the block size that fulfills it.
A block size is the block of IP addresses you get when you convert a host bit into a network bit. The following table lists the available block sizes.
| Host bit(s) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| Block size | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
| Host bits | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| Block size | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65536 |
| Host bits | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| Block size | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 |
The block size must be greater than or equal to the network's actual host requirement.
Actual host requirement = Host requirement + Network address + broadcast address Block Size >= Actual host requirement
The following table lists the block sizes that meet these requirements.
| Segment | Host requirement | Actual requirement | Block size |
| Production | 52 | 54 | 64 |
| Development | 74 | 76 | 128 |
| Administration | 28 | 30 | 32 |
| Wan link 1 | 2 | 4 | 4 |
| Wan link 2 | 2 | 4 | 4 |
| Wan link 3 | 2 | 4 | 4 |
In the next step, arrange segments in descending order.
| Segment | Block size | Descending order |
| Development | 128 | 1 |
| Production | 64 | 2 |
| Administration | 32 | 3 |
| Wan link 1 | 4 | 4 |
| Wan link 2 | 4 | 5 |
| Wan link 3 | 4 | 6 |
VLSM is an extended version of FLSM. It uses the same steps FLSM uses. In FLSM, you split the default subnet into subnets of the same size. In VLSM, you further divide the created subnets into small-sized subnets based on your requirements in descending order. You can check previous parts of this tutorial to learn FLSM.

This tutorial is part of the tutorial series "IP Addressing, and Subnetting in Computer Networks Explained with examples". Other parts of this series are the following.
Chapter 01 Introduction to Subnetting
Chapter 02 Network Address Basic Concepts Explained with Examples
Chapter 03 The Subnet Mask and Slash Notation
Chapter 04 Converting Decimal IP Addresses to Binary and Binary to Decimal
Chapter 05 Basic Subnetting in Computer Networks Explained
Chapter 06 Subnetting Tutorial - Subnetting Explained with Examples
Chapter 07 Subnetting Tricks: Subnetting Made Easy with Examples
Chapter 08 FLSM Subnetting and VLSM Subnetting
Chapter 09 VLSM Subnetting Explained with Examples
Chapter 10 VLSM Subnetting Examples and Calculation Explained
Chapter 11 Route Summarization Advantages and Disadvantages
Chapter 12 Supernetting Tutorial: - Supernetting Explained with Examples
Perform FLSM on the development segment.
The development segment's block size is 128. The given IP subnet belongs to class C. In class C, the first 24 bits are reserved network bits. You cannot use the reserved network bits. You can use only the host bits for subnetting. The default class C IP subnet has 6 (8 - 2 reserved host bits [30 and 31] ) host bits available for subnetting. Subnetting always proceeds from left to right, without skipping any bits. Hence, the first host bit you can use in subnetting is the 25th. If you convert this host bit (25th) into a network bit, you get two subnets with 128 IP addresses each.
| Subnet | Subnet1 | Subnet2 |
| Network ID | 192.168.1.0 | 192.168.1.128 |
| First host address | 192.168.1.1 | 192.168.1.129 |
| Last host address | 192.168.1.126 | 192.168.1.254 |
| Broadcast ID | 192.168.1.127 | 192.168.1.255 |
It fulfills the requirements for the development section. You can assign the first subnet to the development section and use the second subnet for the next VLSM subnetting.
| Segment | Development |
| Requirement | 74 |
| CIDR | /25 |
| Subnet mask | 255.255.255.128 |
| Network ID | 192.168.1.0 |
| First hosts | 192.168.1.1 |
| Last hosts | 192.168.1.126 |
| Broadcast ID | 192.168.1.127 |
The next segment is the production department. Its block size is 64. If you set the next host bit (26th) to the network bit, you get four subnets with 64 IP addresses each.
| Subnet | Subnet 1 | Subnet 2 | Subnet 3 | Subnet 4 |
| Network ID | 0 | 64 | 128 | 192 |
| First address | 1 | 65 | 129 | 193 |
| Last address | 62 | 126 | 190 | 254 |
| Broadcast ID | 63 | 127 | 191 | 255 |
You cannot use the subnets 1 and 2. They contain the addresses you have already assigned to the development section. You can use subnet 3 for the production section.
| Segment | Production |
| Requirement | 52 |
| CIDR | /26 |
| Subnet mask | 255.255.255.192 |
| Network ID | 192.168.1.128 |
| First hosts | 192.168.1.129 |
| Last hosts | 192.168.1.190 |
| Broadcast ID | 192.168.1.191 |
The next segment is the administration department. Its block size is 32. If you set the next host bit (27th), you get 8 subnets with 32 IP addresses in each.
| Subnet | Sub 1 | Sub 2 | Sub 3 | Sub 4 | Sub 5 | Sub 6 | Sub 7 | Sub 8 |
| Net ID | 0 | 32 | 64 | 96 | 128 | 160 | 192 | 224 |
| First Host | 1 | 33 | 65 | 95 | 129 | 161 | 193 | 225 |
| Last Host | 30 | 62 | 94 | 126 | 158 | 190 | 222 | 254 |
| Broadcast ID | 31 | 63 | 95 | 127 | 159 | 191 | 223 | 255 |
You cannot use the subnets 1, 2, 3, 4, 5, and 6. They contain the addresses you have already assigned to the development and production sections. You can use subnet 7 for the administration section.
| Segment | Administration |
| Requirement | 28 |
| CIDR | /27 |
| Subnet mask | 255.255.255.224 |
| Network ID | 192.168.1.192 |
| First hosts | 192.168.1.193 |
| Last hosts | 192.168.1.222 |
| Broadcast ID | 192.168.1.223 |
The remaining segments are WAN links. Their block size is 4. If you convert the next three host bits (28, 29, and 30th), you get 64 subnets with 4 IP addresses in each.
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 256
You cannot use the subnets 1 to 56. They contain the addresses you have already assigned to the development, production, and administration sections. You can use subnets 57, 58, and 59 for the WAN links.
| Subnet | Subnet 57 | Subnet 58 | Subnet 59 |
| Network ID | 224 | 228 | 232 |
| First host | 225 | 229 | 233 |
| Last host | 226 | 230 | 234 |
| Broadcast ID | 227 | 231 | 235 |
Assign subnet 57 to the WAN link 1.
| Subnet | Subnet 57 |
| Segments | Wan Link 1 |
| Requirement | 2 |
| CIDR | /30 |
| Subnet mask | 255.255.255.252 |
| Network ID | 192.168.1.224 |
| First hosts | 192.168.1.225 |
| Last hosts | 192.168.1.226 |
| Broadcast ID | 192.168.1.227 |
Assign subnet 58 to the WAN link 2.
| Subnet | Subnet 58 |
| Segments | Wan Link 2 |
| Requirement | 2 |
| CIDR | /30 |
| Subnet mask | 255.255.255.252 |
| Network ID | 192.168.1.228 |
| First hosts | 192.168.1.229 |
| Last hosts | 192.168.1.230 |
| Broadcast ID | 192.168.1.231 |
Assign subnet 59 to the WAN link 3.
| Subnet | Subnet 59 |
| Segments | Wan Link 3 |
| Requirement | 2 |
| CIDR | /30 |
| Subnet mask | 255.255.255.252 |
| Network ID | 192.168.1.232 |
| First hosts | 192.168.1.233 |
| Last hosts | 192.168.1.234 |
| Broadcast ID | 192.168.1.235 |
The following image shows the final IP address allocation.

You have assigned IP addresses to all segments. The subnets 60, 61, 62, 63, and 64 are still available for further use.
Conclusion
VLSM subnetting provides flexibility and efficient IP address utilization by allowing different subnet sizes within the same network. Unlike FLSM, which uses fixed-size subnets, VLSM enables network administrators to allocate IP space according to specific requirements, reducing waste and optimizing address allocation. This makes VLSM particularly valuable in complex network environments where departments or links have varying host needs.
Author Laxmi Goswami Updated on 2026-05-10