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.

VLSM 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.

VLSM 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.

2 4 8 16 32 64 128 256
512 1024 2048 4096 8192 16384 32768 65536
131072 262144 524288 1048576 2097152 4194304 8388608 16777216

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
Production 52 54 64
WAN 1 link 2 4 4
Development 74 76 128
WAN 2 link 2 4 4
Administration 28 30 32
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
Development 128 1
Production 64 2
Administration 32 3
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.

step-by-step 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

Subnet subnet1 Deputy network2
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

From subnet subnets, assign the first subnet to this segment.

Segment Development
Requirement 74
CIDR / 25
Subnet mask 255.255.255.128
Network ID 192.168.1.0
First hosts 192.168.1.1
Latest Hosts 192.168.1.126
Broadcast ID 192.168.1.127

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.

192.168.1.0/26 subnet

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

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).

Segment Production
Requirement 52
CIDR / 26
Subnet mask 255.255.255.192
Network ID 192.168.1.128
First hosts 192.168.1.129
Latest Hosts 192.168.1.190
Broadcast ID 192.168.1.191
Third largest segment (block size 32)

The / 27 subnet provides 8 networks and 32 hosts.

192.168.1.0/27 subnet

Subnet Under 1 Under 2 Under 3 Under 4 Under 5 Under 6 Under 7 Under 8
Network 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

Exclude already occupied subnets (Sub1 to Sub6) and assign the first available subnet (Sub7) to this segment.

Segment Administration
Requirement 28
CIDR / 27
Subnet mask 255.255.255.224
Network ID 192.168.1.192
First hosts 192.168.1.193
Latest Hosts 192.168.1.222
Broadcast ID 192.168.1.223
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
Network ID 224 228 232
First host 225 229 233
Last host 226 230 234
Broadcast ID 227 231 235

Assign subnet 57 to 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
Latest Hosts 192.168.1.226
Broadcast ID 192.168.1.227

Assign subnet 58 to the WAN 2 link.

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
Latest Hosts 192.168.1.230
Broadcast ID 192.168.1.231

Assign subnet 59 to 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
Latest Hosts 192.168.1.234
Broadcast ID 192.168.1.235

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.

vlsm response subnet example

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.

Author

Write A Comment