Variable Length Subnet Mask VLSM
For Complete YouTube Video: Click Here
This class will try to understand the Variable Length Subnet Mask VLSM.
We have already discussed how to create a subnet and the use subnet mask in our previous classes.
Variable Length Subnet Mask VLSM
Understanding Variable Length Subnet Mask VLSM is very important for end semester exams and GATE CSE.
The image below shows the subnetting of a university network.
In the above image, we have four subnets, and all the subnets are of the same size.
What if we have to create three subnets, one subnet of 128 hosts and two subnets of 64 hosts each.
In such a case, what are the subnet number’s size and the range of IP addresses for each subnet?
First, divide the subnet into two halves with 128 hosts each.
Consider the first half of 128 hosts for network one and then divide the remaining hosts of 128 hosts into two halves of 64 hosts each for network two and network three.
The image below shows the possibility.
To divide the network into two halves, we need one bit in the subnet id part. We consider it as 0.
Considering one bit for subnet id, we are left with 7 bits for host ids.
With seven bits, we can accommodate 128 hosts.
The range of IP addresses for the first network is from 194.24.2.0 to 194.24.2.127.
What is the subnet mask for this network?
As we have considered only one bit for the subnet, the total network bits are 25, so the subnet mask is 255.255.255.128.
Now we are left with 128 hosts.
These 128 hosts can be divided into two halves, with 64 each.
To get 64 hosts in a network, we should have two bits in the subnet id.
We have already taken one bit for the first network as 0, and we have to consider the next bit for these networks.
The range of IP addresses for network two will be from 194.24.2.128 to 194.24.2.191, and for network three will be from 194.24.2.192 to 194.24.2.255.
The subnet mask for these two networks will be 255.255.255.192.