VLSM breaks up a Class A, Class B or Class C network into smaller networks. This helps to avoid wasted IP Addresses by increasing the usability of subnets as they can no vary in size. Think of this as creating a subnet from a subnet.
Part of the reason for needing to move from classful networks to classless networks was due to the the exhaustion of address space.
VLSM ties in closely with CIDR, so it is important to have a strong understanding of CIDR before moving on to VLSM.
A subnet mask is used by a computer to determine if a computer is on the same network or a different network. Recall that a IPv4 subnet is a 32-bit sequence of ones follow by zeros. Short hand notation we used CIDR.
Example: 192.168.0.190/24
Convert IP Address to Binary:
11000000.10101000.00000000.10111110
Convert Netmask to Binary:
11111111.11111111.11111111.00000000
Next step would be do an XOR operation to determine the network. XOR is a binary operation that is very simple. If both values are 1 the results is 0, if both values are 0 the result is 0. If one value is a 1 and the other is a 0 the result is 1. See a truth table below as a reference.
Performing the AND:
IP Address: 1100 0000.1010 1000.0000 0000.1011 1110
Netmask: 1111 1111.1111 1111.1111 1111.0000 0000
AND Result: 1100 0000.1010 1000.0000 0000.0000 0000
Convert back to Decimal:192.168.0.0
We know now that this host (192.168.0.190) belongs to the 192.168.0.0 network. You should be able to perform this action to understand if a host is on the same network.
To understand VLSM and how to do it please watch the "Another VLSM Demo" video. This is not an easy concept to understand and is something that overtime you will master with practice. I am not expecting you to master VLSM during this course, but I do want you to understand why we use it and how it works.
I have provided you with a simple VLSM Chart showing the networks that are possible for each CIDR notation. Keep in mind that a /25 network is larger than a /26 network as a /25 has more address space that is available. Also, see values in a larger network (this is a smaller CIDR) appear in smaller networks (larger CIDR). I used a color highlight to help you visually see that a 128 network appears in a /25, /26, /27, /28, /29 and /30 networks. I hope this visual helps. I did not do this color highlighting with all values as I felt it would get a bit to complicated to understand/follow.
If you want an in depth read about VLSM I highly suggest reading: Configure IP Addresses and Unique Subnets for New Users by Cisco.