IPv4 Subnet Calculator - Divide by Hosts or Subnets Tool (FLSM)

🔀

IPv4 FLSM Subnet Generator

Generate equal-sized subnets based on your requirement

⚙️ Configuration

🎭
🔢

What is FLSM? The Complete Guide to Fixed Length Subnet Masking

Fixed Length Subnet Masking (FLSM) is the classical approach to dividing an IP network into smaller, equal-sized pieces. The defining characteristic of FLSM — and the key difference that separates it from its more flexible successor VLSM (Variable Length Subnet Masking) — is that every single subnet produced by the process uses the exact same subnet mask.

This means every subnet has an identical block size, an identical number of usable host addresses, and an identical structure. While this uniformity makes FLSM straightforward to calculate and easy to document, it comes at the cost of efficiency: a network designed for 50 hosts and a point-to-point link needing only 2 hosts would both receive the same oversized block, wasting dozens or even hundreds of addresses.

Despite this limitation, FLSM remains a foundational concept taught in every networking curriculum, including CCNA and CompTIA Network+, because mastering its logic builds the mental framework needed to understand all subnetting, routing protocols, and access control lists.

The Two Calculation Modes

Every FLSM subnetting problem begins with one of two questions: how many subnets do you need, or how many hosts per subnet do you need? The answer determines which direction you approach the calculation from, but both modes rely on the same underlying principle — the binary mathematics of borrowing or reserving bits within the 32-bit IPv4 address space.

Mode 1 — Subnet by Number of Subnets

In this mode, the requirement is a minimum number of subnets. To create more subnets, you must borrow bits from the host portion of the original mask and add them to the network portion, extending the prefix and shrinking each subnet's size. The formula governing this process is 2n ≥ required subnets, where n is the number of bits you borrow.

You find the smallest integer n that satisfies the inequality, then add n to the original CIDR prefix to obtain the new subnet prefix. For example, if you need at least 4 subnets: 21 = 2 (not enough), 22 = 4 ≥ 4, so n = 2. Every bit you borrow doubles the number of available subnets but simultaneously halves the number of hosts each subnet can support — a fundamental trade-off at the heart of all subnetting design.

Mode 2 — Subnet by Number of Hosts

In this mode, the requirement is a minimum number of usable host addresses per subnet. Instead of borrowing bits from the host portion, you work backwards from the host requirement to determine how many host bits (h) must be preserved in the subnet. The formula is 2h − 2 ≥ required hosts.

The subtraction of 2 accounts for the two reserved addresses in every subnet: the Network Address (all host bits set to 0) and the Broadcast Address (all host bits set to 1). You find the smallest h that satisfies the inequality, then compute the new prefix as 32 − h. For example, if you need at least 62 usable hosts: 25 − 2 = 30 (not enough), 26 − 2 = 62 ≥ 62, so h = 6 and the new prefix is 32 − 6 = /26.

Step-by-Step Walkthrough: 192.168.1.0/24 into 4 Subnets

The following walkthrough uses the exact default example loaded in the FLSM Subnet Generator tool above: base network 192.168.1.0/24 with a requirement of 4 subnets using Subnet Mode. Each step mirrors precisely the logic shown in the tool's Step-by-Step Solution panel.

Step 1 — Identify the Base Network

Our starting point is 192.168.1.0/24. The /24 prefix tells us that the first 24 bits are the network portion and the remaining 8 bits are the host portion. The original subnet mask in dotted-decimal is 255.255.255.0, which in binary is 24 consecutive 1-bits followed by 8 zero-bits. The total address space of a /24 network is 28 = 256 addresses, spanning from 192.168.1.0 (the network address) to 192.168.1.255 (the broadcast address). These 256 addresses are the raw material we will divide into 4 equal subnets.

Step 2 — Determine How Many Bits to Borrow

We need at least 4 subnets. Applying the formula 2n ≥ 4, we test values of n starting from 1. 21 = 2, which is less than 4 — insufficient. 22 = 4, which exactly meets the requirement — sufficient. Therefore we borrow n = 2 bits from the host portion of the original mask. The new CIDR prefix is calculated as: New Prefix = Original Prefix + Borrowed Bits = /24 + 2 = /26. The new subnet mask is 255.255.255.192.

In binary, the fourth octet of this new mask is 11000000 — the two leading 1-bits are the borrowed network bits, and the remaining six 0-bits are the host bits available for addressing devices.

Step 3 — Calculate the Number of Subnets Created

Borrowing 2 bits creates 22 = 4 subnets. This perfectly satisfies our requirement. It is important to understand exactly what happened mathematically: we took 2 bits from the 8-bit host portion of the original /24, converting them into network bits by extending the mask. Those 2 bits can each be independently set to 0 or 1, producing 4 unique binary combinations — 00, 01, 10, 11 — which correspond directly to the 4 subnets.

In FLSM, the number of subnets created is always a power of 2, meaning you cannot create exactly 3 or 5 subnets without creating 4 or 8 respectively. This is one of the structural constraints that VLSM was designed to overcome.

Step 4 — Calculate Usable Hosts per Subnet

After borrowing 2 bits, the host portion of the new /26 mask contains h = 32 − 26 = 6 bits. Applying the host formula: 26 − 2 = 64 − 2 = 62 usable hosts per subnet.

The total of 64 addresses in each subnet is split as follows: 1 address is reserved as the Network Address (the subnet identifier, e.g., 192.168.1.0), 62 addresses are assignable to devices, and 1 address is reserved as the Broadcast Address (used to send packets to all devices in the subnet, e.g., 192.168.1.63). These boundaries are fixed and universal — they apply to every subnet in the allocation, which is the hallmark of FLSM.

Step 5 — Calculate the Block Size (The Magic Number)

The block size — sometimes called the magic number — tells you the exact increment between consecutive subnet network addresses. It is one of the most practical values in subnetting because it lets you mentally list all subnets in seconds without binary conversion. The block size is derived from the interesting octet, which is the octet that changes between subnets.

For a /26 mask (255.255.255.192), the interesting octet is octet 4, whose value is 192. The formula is simply: Block Size = 256 − Interesting Octet Value = 256 − 192 = 64. This means each subnet's network address is exactly 64 higher than the previous one in the fourth octet. Starting from 192.168.1.0, the subnets begin at .0, .64, .128, and .192 — a pattern you can verify instantly just by repeatedly adding 64.

Subnet Allocation Table

The table below applies the block size of 64 sequentially to map out all four /26 subnets carved from 192.168.1.0/24. For each subnet, the First Usable address is the Network Address + 1, and the Last Usable address is the Broadcast Address − 1. The Broadcast Address of one subnet is always the address immediately before the Network Address of the next subnet, confirming that the allocations are contiguous with no gaps and no overlaps — a fundamental correctness requirement for any valid subnet design.

Subnet # Subnet Address First Usable Last Usable Broadcast
1 192.168.1.0 192.168.1.1 192.168.1.62 192.168.1.63
2 192.168.1.64 192.168.1.65 192.168.1.126 192.168.1.127
3 192.168.1.128 192.168.1.129 192.168.1.190 192.168.1.191
4 192.168.1.192 192.168.1.193 192.168.1.254 192.168.1.255

FLSM vs VLSM — When to Use Each

Understanding FLSM also means knowing when not to use it. In the example above, all four subnets each support 62 usable hosts. If your actual network only has one large department with 50 devices, two medium departments with 20 devices each, and one router-to-router link needing only 2 addresses, assigning a 62-host block to the serial link wastes 60 addresses.

Multiply this across a large enterprise with hundreds of point-to-point WAN links, and address exhaustion becomes a serious concern. This is precisely the scenario where VLSM excels — it lets each subnet be sized exactly to its requirement, conserving the precious address space for where it is truly needed.

That said, FLSM is not obsolete: it remains the preferred choice in environments where uniform, predictable subnet sizes simplify management, documentation, and troubleshooting, and it is an indispensable foundation for understanding the more complex VLSM designs you will encounter in production networks and on certification examinations.

How the FLSM Subnet Generator Automates This Process

Every calculation in this guide — the bit-borrowing formula, the prefix arithmetic, the block size derivation, and the sequential subnet listing — is performed automatically and instantly by the IPv4 FLSM Subnet Generator at the top of this page. Enter any valid base network and CIDR, choose your calculation mode, input your requirement, and click Generate Subnets.

The tool's Step-by-Step Solution panel reproduces every formula with color-coded values so you can follow the logic in real time, and the full subnet table is available for download via Export CSV for documentation or lab work.

Whether you are a student preparing for the CCNA 200-301 exam or a network administrator designing a new office infrastructure, internalizing the five steps covered in this guide will give you the confidence to subnet any IPv4 network quickly, accurately, and without relying on a calculator.

Subscribe
Notify of
guest

0 Corrections & Clarifications