Variable Length Subnet Mask (VLSM) calculator for efficient IP address allocation. Enter a parent network and specify subnet requirements to automatically calculate optimal subnet divisions with network addresses, usable IP ranges, and broadcast addresses.
Supports CIDR notation (e.g., 192.168.1.0/24) or decimal netmask (e.g., 192.168.1.0/255.255.255.0)
VLSM (Variable Length Subnet Mask) allows you to subnet a network into different sized subnets, optimizing IP address allocation. Subnets are allocated in order from largest to smallest to prevent fragmentation and ensure efficient use of the address space.
Variable Length Subnet Mask (VLSM) is a subnetting technique that allows network administrators to divide an IP network into subnets of different sizes. Unlike traditional subnetting where all subnets must be the same size, VLSM enables more efficient use of IP address space by allocating only the necessary number of addresses to each subnet.
The first IP address in the subnet, used to identify the network itself. Cannot be assigned to hosts.
Classless Inter-Domain Routing notation shows the network prefix length (e.g., /24 means 24 bits for network, 8 bits for hosts).
The subnet mask in dotted decimal notation (e.g., 255.255.255.0) used to separate network and host portions.
The first IP address that can be assigned to a host (network address + 1).
The last IP address that can be assigned to a host (broadcast address - 1).
The last IP address in the subnet, used to send messages to all hosts. Cannot be assigned to individual hosts.
Total number of IP addresses available for assignment to hosts (total IPs - 2).
VLSM requires allocating largest subnets first to prevent fragmentation. If you allocate small subnets first, you may create gaps that prevent larger subnets from fitting, even if there's technically enough total space.
Subnet sizes must be powers of 2. For 30 hosts, you need 32 total IPs (2^5), which gives you 30 usable after subtracting network and broadcast addresses. You can't create a subnet with exactly 30 usable IPs due to binary mathematics.
VLSM requires a classless routing protocol that supports variable-length subnet masks, such as OSPF, EIGRP, IS-IS, RIPv2, or BGP. Classful protocols like RIPv1 don't support VLSM.
CIDR (Classless Inter-Domain Routing) is the addressing scheme that allows variable-length prefixes. VLSM is the technique of applying CIDR within a network to create subnets of different sizes. They work together.
This usually happens when subnets are too large for the parent network, or when the total of all allocated subnets exceeds available space. Remember that each subnet needs network and broadcast addresses, and subnets must be contiguous.
The calculator automatically sorts by size for optimal allocation. If you want a different order, you can note the results and manually reorder the subnets, but this may result in less efficient space usage.
The smallest subnet is /30 (255.255.255.252) with 2 usable IPs, typically used for point-to-point links. A /31 can be used for point-to-point with RFC 3021, and /32 is a single host.
Use the formula: Usable hosts = 2^(32 - CIDR) - 2. For example, a /24 has 2^(32-24) - 2 = 254 usable hosts.
Scenario: You have been allocated 192.168.1.0/24 and need to create subnets for:
VLSM Solution:
| Subnet | Hosts | Network | CIDR | Usable Range |
|---|---|---|---|---|
| Main Office | 100 | 192.168.1.0/25 | 126 hosts | 192.168.1.1 - 192.168.1.126 |
| Branch Office | 50 | 192.168.1.128/26 | 62 hosts | 192.168.1.129 - 192.168.1.190 |
| DMZ | 20 | 192.168.1.192/27 | 30 hosts | 192.168.1.193 - 192.168.1.222 |
| Management | 10 | 192.168.1.224/28 | 14 hosts | 192.168.1.225 - 192.168.1.238 |
| P2P Link 1 | 2 | 192.168.1.240/30 | 2 hosts | 192.168.1.241 - 192.168.1.242 |
| P2P Link 2 | 2 | 192.168.1.244/30 | 2 hosts | 192.168.1.245 - 192.168.1.246 |
This allocation uses 248 of 256 available IPs, leaving 8 IPs for future expansion.
This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.