variable-length subnet mask (VLSM)

Variable-Length Subnet Masking (VLSM) amounts to "subnetting subnets," which means that VLSM allows network engineers to divide an IP address space into a hierarchy of subnets of different sizes, making it possible to create subnets with very different host counts without wasting large numbers of addresses.

A subnet mask defines the size of the subnet (the number of host addresses in the subnet).  Fixed-Length Subnet Masking (FLSM) creates subnets all the same size.  But where some subnets will have many hosts and some have few, FLSM results in some subnets having many orphaned addresses, or some sets of hosts being too big to fit into a subnet.  Where VLSM is enabled, a large subnet can be divided into a set of smaller sub-subnets, which can be used to handle smaller sets of hosts.

Content Continues Below

For example, consider a traditional Class C address space like and an organization with four groups of computers: the data center with 75 hosts; the call center with 50; the operations floor with 25; and the executive floor with 20.  Under fixed subnetting, dividing the 255 host addresses available into four subnets would support only 62 hosts each, not meeting the needs of the data center and vastly oversupplying addresses for operations and the execs.  Using VLSM, the space is first split in 2, with each subnet able to address 126 hosts.  One subnet covers the data center. The other is split in two, supplying two sub-subnets of 62 hosts.  One covers the contact center, the other is split in two once more, creating two 30-host sub-sub-subnets, to cover operations and executives.

In order to use VLSM, a network administrator must use a routing protocol that supports it, such as Routing Information Protocol v2 (RIPv2), Open Shortest Path First (OSPF), Intermediate System-to-Intermediate System (IS-IS), Enhanced Interior Gateway Routing Protocol (EIGRP) and Border Gateway Protocol (BGP).

VLSM is similar in concept and intent to Classless Inter Domain Routing (CIDR), which allows a single Internet domain to have an address space that does not fit into traditional address classes. VLSM was originally defined in IETF RFC 1812.

This video tutorial provides a simple use case for how (and why) to use VLSM.

This was last updated in August 2014

Continue Reading About variable-length subnet mask (VLSM)

Dig Deeper on IP Networking

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

What’s your favorite subnet mask calculator?
For years and years, it was WildPackets' IP Subnet Calculator but I believe it has been decommissioned. SolarWinds has a good option. I've found that also works well.

I agree with Kevin. I've been using the IP Subnet Calculator as well.
Having written assembly code for several years, It's pretty much something I do in my head! Love hex!
In the 3rd paragraph of your -otherwise informative- article you write:

" ... Under fixed subnetting, dividing the 255 host addresses available ... "

I am assuming you meant 254 host addresses available.

Under IPv4 a Class C network (e.g. /24 in CIDR or in decimal notation) has 256 possible IPs (e.g. starting with x.x.x.0 and going all the way up to x.x.x.255) but because these two IPs are not usable (because they define the Network ID and Broadcast Address, respectively) we are left with a total of 254 available, assignable, valid hosts.
i want divide at 3 users
first 100 nos
second 30 nos
thrid 6 nos