This tutorial explains the VLSM subnet in detail with practical examples. Find out what the VLSM (Variable Length Subnet Masks) subnet is and how it is done step by step, including the benefits of the VLSM subnet and the differences between the FLSM subnet and the sub -VLSM network.
The subnet is the process of dividing a single large network into several small networks called subnets. There are two types of subnets; FLSM subnet and VLSM subnet.
Differences between the FLSM subnet and the VLSM subnet
|Fixed Length Subnet Masks (FLSM)||VLSM Subnet (Variable Length Subnet Masks)|
|All subnets are of equal size.||The subnets vary in size.|
|All subnets have the same number of hosts.||Subnets have a variable number of hosts.|
|All subnets use the same subnet mask.||Subnets use different subnet masks.|
|It is easy to configure and administer.||It is complex in configuration and administration.|
|This wastes a lot of IP addresses.||It wastes minimal IP addresses.|
|It is also known as a class subnet.||It is also known as a classless subnet.|
|It supports classless and classless routing protocols.||It only supports classless routing protocols.|
The subnet to use depends on the objectives and the type of addresses used in the network. FLSM provides an easier subnet at the expense of IP addresses while VLSM makes the best use of IP addresses at the expense of simplicity. For private IP addresses, FLSM is the best choice. For public IP addresses, VLSM is the best option.
As I already explained the FLSM subnet with examples in the previous parts of this tutorial, instead of repeating it again, in this part I will focus on the VLSM subnet.
If you don’t know what FLSM is and how it is done, I strongly recommend that you take a break here and learn about the FLSM subnet in the previous parts of this tutorial. For this part, I assume that you have a good knowledge of the FLSM subnet.
The biggest advantage of the VLSM subnet is that instead of forcing us to use a fixed size for all segments, it allows us to choose the individual size for each segment. This flexibility reduces IP waste. We can choose the size of the subnet that closely matches our needs. Let’s understand it with an example.
Perform the VLSM subnet of the following network.
In this network: –
- The development department has 74 computers.
- The production department has 52 computers.
- The administrative service has 28 computers.
- All departments are connected to each other via WAN links.
- Each WAN link requires two IP addresses.
- The address space given is 192.168.1.0/24.
Before performing the VLSM subnet for this network, let’s see how the VLSM subnet works.
Basic concepts of the VLSM subnet
The VLSM subnet is the extended version of the FLSM subnet. If you know how the FLSM subnet works and how it is done, you already know the 90% of the VLSM subnet. In FLSM, all subnets use the same block size, so the subnet is only required once. In VLSM, subnets use the block size as needed, so the subnet is required multiple times.
The concept of the VLSM subnet is relatively simple.
- Select the block size for each segment. The block size must be greater than or equal to the actual requirement. The actual requirement is the sum of the host addresses, the network address and the broadcast address.
- Depending on the size of the block, organize all the segments in descending order.
- Perform an FLSM subnet for the block size of the first segment.
- Assign the first subnet of the subnet subnets to the first segment.
- If the next segment has a similar block size, assign the next subnet to it.
- If the next segment has a smaller block size, redo the FLSM subnet for the block size of that segment.
- Subnets in subnets exclude busy subnets. Busy subnets are the subnets that provide addresses that are already assigned.
- From the available subnets, assign the first available subnet to this segment.
- Repeat the above steps until the last segment of the network.
Let’s implement the above steps in our example network.
VLSM subnet step by step
The first step in the VLSM subnet is to select the appropriate block size for each segment. The following table lists all available block sizes.
To find out how the block size is calculated, see the third part of this tutorial.
When selecting the appropriate block size for a given segment, always select an appropriate size for host addresses plus two additional addresses; network address and broadcast address.
The identity of a subnet and some networking services depends on the network address and the broadcast address. In each subnet, the first address and the last address are always reserved respectively for the network address and the broadcast address.
It does not matter whether the information about these two addresses is provided or not; Always add these addresses in the requirement while selecting the block size for a segment.
Actual requirement = Host requirement + Network address + broadcast address Block Size >= Actual requirement
The following table shows the selection of the block size in our example.
|Segment||Host requirement||Real need||Block size|
|WAN 1 link||2||4||4|
|WAN 2 link||2||4||4|
|WAN link 3||2||4||4|
The next step in the VLSM subnet is to organize the segments in descending order. Depending on the size of the blocks, the following table organizes all the segments in descending order.
|Segment||Block size||Descending order|
|WAN 1 link||4||4|
|WAN 2 link||4||5|
|WAN link 3||4||6|
The next step in the VLSM subnet is to perform the FLSM subnet and select the appropriate subnets for the segments from the subnets.
A single FLSM subnet provides a single block size for all of its subnets. If a different block size is required, we need to perform the FLSM subnet again for that block size. The number of times we need to perform the FLSM subnet depends on the number of unique block sizes we need. For example, our network example requires four unique block sizes 128, 64, 32 and 4. For four block sizes, we need to make four FLSM subnets.
The FLSM subnet is always executed in descending order. For the order, the block size is used. In our example, we must first perform the FLSM subnet for block size 128 then for block size 64 then for block size 32 and finally for block size 4.
The following figure shows the FLSM subnet for the four block sizes and the selected subnets for the segments of each FLSM subnet.
Let’s understand the above process in more detail.
First largest segment (block size 128)
Our first segment needs a block size of 128. The FLSM subnet of / 25 provides us with two subnets with block size 128.
FLSM subnet of 192.168.1.0/25
|First host address||192.168.1.1||192.168.1.129|
|Last host address||192.168.1.126||192.168.1.254|
From subnet subnets, assign the first subnet to this segment.
Since our second segment (Production) requires a different block size (64), instead of using the second subnet (Subnet2) for this, let’s start the subnet again.
Second largest segment (block size 64)
The / 26 subnet provides us with 4 subnets with a block size of 64.
|Subnet||Subnet 1||Subnet 2||Subnet 3||Subnet 4|
From this subnet, we cannot use subnet 1 and subnet 2 because they are already busy.
Subnet 1 and subnet 2 provide addresses 0 through 127 that are already assigned in the development service.
We can use subnet 3 for this segment (production).
Third largest segment (block size 32)
The / 27 subnet provides 8 networks and 32 hosts.
|Subnet||Under 1||Under 2||Under 3||Under 4||Under 5||Under 6||Under 7||Under 8|
Exclude already occupied subnets (Sub1 to Sub6) and assign the first available subnet (Sub7) to this segment.
WAN links (block size 4)
The last three segments require a block size of 4. The / 30 subnet gives us 64 block size 4 subnets.
Subnets of / 30 Subnets: –
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
Exclude already occupied subnets (0-56) and use the first three available subnets 57, 58 and 59 for WAN links.
|Subnet||Subnet 57||Subnet 58||Subnet 59|
Assign subnet 57 to WAN link 1.
|segments||Wan Link 1|
Assign subnet 58 to the WAN 2 link.
|segments||Wan Link 2|
Assign subnet 59 to WAN link 3.
|segments||Wan Link 3|
We have assigned IP addresses to all segments. Subnets 60, 61, 62, 63 and 64 are always available for future use.
The following figure shows a summary of the allocation of all addresses in a given network.
That’s it for this part. In the next section, I will explain some other VLSM examples in detail. If you have comments or suggestions on this tutorial, send me an email. If you like this tutorial, share it with your friends via your favorite social platform.