VLSM Subnetting

Nadia Saraswati
5 min readMay 27, 2021

Subnetting is the practice of dividing a network into smaller networks. So why do we need to do subnets? The main purpose of subnets is for the efficiency of network management. Imagine you are in a room full of people and each people talks with their own topic, that's exactly how it looks when we don't use subnets for our network. Subnets help us to groups network according to their own need. With less devices in a network, it would improve network performance and reduce the possibility of network congestion.

Photo by Thomas Jensen on Unsplash

There are two type of subnetting; FLSM (Fixed Length Subnet Masks) and VLSM (Variable Length Subnet Masks).

So whats is the differences between these two?

FLSM (Fixed Length Subnet Mask) uses the same subnet mask and each subnet are equal in size and number of hosts. On the other hand, VLSM (Variable Length Subnet Mask) use different number of subnet mask and each subnet are subnets are varies in size and number of host

In this post, I will explain about VLSM Subnetting.

Why many network engineers use VLSM Subnetting? even though it's more complex in configuration but VLSM allows subnets to have a variable number of hosts and that will minimize the waste of IP addresses. VLSM allows engineers to use different subnet masks which allows for a more exact number of hosts to be used in each subnet.

So, how do we determine the subnet?

Let's learn with the following examples :

XYZ company is a retail company that has 4 division, which is Human Resource, Marketing, Maintenance and Operation. To improve their network performances, this company decided to assign all divisions to separate sub-smaller networks. Turns out, each divison requires a different number of hosts, The Human Resource Division requires 12 hosts. Marketing Division requires 14 hosts, Maintenance division = 28 hosts, and Operation division = 60 hosts. The company has allocated address 192.168.10.0/24 and they ask you, as a network engineer of this company to design the ip addressing scheme for this company efficiently.

First thing first, we need to determine whether we gonna use FLSM or VLSM.

Since each division has a different number of required hosts, and the differences are quite big. It would be better to use VLSM since we want to minimize the waste of IP addresses.

We already decided to use VLSM, so what is the step to subnet using VLSM?

  1. Remember, the extended network prefix is/24. It means the total number of 1 in the subnet mask is 24
  • /24 means the subnet mask is 11111111.11111111.11111111.00000000 = 255.255.255.0 ; we can count the number of hosts that are available by counting the number of zeros in the subnet mask. since the number of zeros is 8, then the total number of available hosts is 2⁸ = 256
  • If the network prefix is /25, then the subnet mask is = 11111111.11111111.11111111.10000000=255.255.255.128 → The total number of available host is 2⁷= 128
  • if the network prefix is /26, then the subnet mask is = 11111111.11111111.11111111.11000000=255.255.255.192 → The total number of available host is 2⁶ = 64

Or you can calculate the total number of host for each subnet by using 2^(32-x)

Table to determine the total host for each Subnet Mask

2. Second, we need to arrange network from the largest to smallest

Based on the problem that were given, the order of the division from the largerst to smallest is

  • Operation division (60 hosts)
  • Maintenance division (28 hosts)
  • Marketing Division (14 hosts)
  • Human Resource Division (12 hosts)

3. Next step, we need to pick subnets for the largest networks

  • The largest need 60 hosts, but we also need a host for the network address and broadcast address. So the total number of host that we need is 62 hosts
  • Since we can’t allocate the exact number of 62 hosts, we need to choose the closest number of hosts that we can use.
  • The closest number of hosts that we can use is 64 = 2⁶. So, the subnet has a prefix of /26
  • We take the allocated address which is 192.168.10.0/24 and then we divide it into 4 subnets with the same number of available host
Subnet for Operation Division

Based on the subnet we just did, here is the available address for Operation Division :

  • Network Address = 192.168.10.0/26
  • Assignable Range Address = 192.168.10.1/26 — 192.168.10.62/26
  • Broadcast Address = 192.168.10.63/26

4. Subnets for Maintenance Division

We already allocated the subnet for Operation Division, next we need to determine the subnet for the second-largest network, Maintenance Division. As we saw in the previous table, the next available address is 192.168.10.64/26

Since we only need 28 Host + Networks address and broadcast address = total number of host that we need is 30 hosts. The closest number of hosts that we can use is 32 = 2⁵, so the extended network prefix that we use is /27.

Subnet for Maintenance Division

Here is the available address for Maintenance Division :

  • Network Address = 192.168.10.64/27
  • Assignable Range Address = 192.168.10.65/27 — 192.168.10.94/27
  • Broadcast Address = 192.168.10.95/27

5. Next, we need to determine the subnets for Marketing division.

Marketing need 14 hosts and we also need to consider the address for network and broadcast address, so the total number of host that marketing division need is 16. 16 Host = 2⁴, the extended network prefix we use is /28

Subnet for Marketing Division

Here is the available address for Marketing Division :

  • Network Address =192.168.10.96/28
  • Assignable Range Address = 192.168.10.97/28- 192.168.10.110/28
  • Broadcast Address = 192.168.10.111/28

6. The last is for Human Resource division.

Human resources need 12 hosts. Since we need to consider the network and broadcast address, so the actual total of hosts that we need for this network is 14. The closest number of host that we can obtain is 16 = 2⁴

The extended network prefix we use is /28, since the prefix is the same, the host can be derived from the previous subnets that have not been used

Subnet for Human Resource Division

Here is the available address for Human Resource Division :

  • Network Address =192.168.10.112/28
  • Assignable Range Address = 192.168.10.113/28–192.168.10.126/28
  • Broadcast Address = 192.168.10.127/28

YOU DID IT! Congrats, you just finished designing the IP addressing scheme of XYZ Company!~

--

--