A network team needs 5 separate subnets from a single parent block. How many host bits must they borrow, and why?
3 bits, because 2³ = 8 is the smallest power of two that is at least 5
5 bits, because you borrow exactly one bit per subnet needed
2 bits, because 2² = 4 is close enough to 5
4 bits, because you always round the requirement up to the next even number
A subnet must hold up to 50 hosts. Using the host-driven formula, how many host bits must you keep?
5 bits, because 2⁵ = 32 is closest to 50
6 bits, because 2⁶ − 2 = 62 is the smallest usable count that meets or exceeds 50
50 bits, one for each host
5 bits, because 2⁵ − 2 = 30 rounds up to 50
In FLSM, why does borrowing more subnet bits reduce the number of hosts each subnet can hold?
Borrowed subnet bits and remaining host bits share a fixed total (32 − parent prefix), so more of one leaves fewer of the other
Borrowing bits deletes host addresses from the router's memory
More subnets require more broadcast domains, which are capped at 254 hosts total
It does not; the number of hosts per subnet is fixed at 254 regardless of borrowing
You need subnets that each support 100 hosts. Which usable-host value from the 2ʰ − 2 sequence should you choose?
62, because it is the closest value to 100
126, because you must round up to a value that meets or exceeds 100
100, because subnets can be sized to any exact number
254, because that is always the safest choice
Starting from a /24 parent, you borrow 3 bits. What is the new prefix, and what mask does it produce?
/27, mask 255.255.255.224
/21, mask 255.255.248.0
/3, mask 224.0.0.0
/27, mask 255.255.255.240
The Requirements-First Method
Key Points
- Every FLSM problem starts with a requirement stated as subnets needed or hosts needed — the method solves cleanly from either direction.
- FLSM creates subnets by borrowing host bits: borrowed subnet bits + remaining host bits always equal
32 − parent prefix.
- Subnet-driven: borrow the smallest
n where 2ⁿ ≥ required subnets. Host-driven: keep the smallest h where 2ʰ − 2 ≥ required hosts.
- Always round up to the next power of two — you can make 2, 4, 8, 16… subnets but never exactly 5 or 6.
new prefix = old prefix + borrowed bits.
Fixed-Length Subnet Masking (FLSM) is traditional subnetting in which a parent network is divided into subnets that all have an equal number of addresses, so a single subnet mask applies to every one. Think of it like cutting a sheet cake into equal squares: once you decide how many pieces you want (or how big each must be), every cut is the same distance apart.
Hosts Needed vs. Subnets Needed
A subnetting task is stated in one of two ways: "I need N subnets" (subnet-driven — e.g., five departments each on their own segment) or "I need H hosts per subnet" (host-driven — e.g., a segment that must hold 50 devices).
flowchart TD
A["Subnetting requirement"] --> B{"How is it stated?"}
B -->|"I need N subnets"| C["Subnet-driven:
find n where 2ⁿ ≥ N"]
B -->|"I need H hosts per subnet"| D["Host-driven:
find h where 2ʰ − 2 ≥ H"]
C --> E["Borrow n subnet bits"]
D --> F["Keep h host bits;
leftover bits become borrowed bits"]
E --> G["new prefix = old prefix + borrowed bits"]
F --> G
G --> H["Lay out subnets by block size"]
Choosing the Prefix — The Seven-Step Procedure
Learn this procedure once and it works for every FLSM problem:
- Identify the parent network and prefix (e.g.,
192.168.1.0/24).
- Determine the requirement — subnets needed or hosts needed.
- Apply the borrowing formula. Subnet-driven: smallest
n with 2ⁿ ≥ subnets. Host-driven: smallest h with 2ʰ − 2 ≥ hosts. The −2 removes the reserved network and broadcast addresses.
- Calculate the new prefix:
new prefix = old prefix + n (e.g., /24 + 3 = /27, mask 255.255.255.224).
- Calculate hosts per subnet: host bits
h = 32 − new prefix; usable hosts = 2ʰ − 2 (a /27 has 5 host bits → 30 usable).
- Determine the block size: total addresses per subnet
= 2ʰ, which is also the subnet increment (/27 → 32).
- List every subnet: step forward by the block size, recording network, first host, last host, and broadcast for each until the parent block is used up.
flowchart TD
S1["Step 1: Identify parent
network and prefix"] --> S2["Step 2: Determine the
requirement (subnets or hosts)"]
S2 --> S3["Step 3: Apply borrowing formula
2ⁿ ≥ subnets, or 2ʰ − 2 ≥ hosts"]
S3 --> S4["Step 4: new prefix =
old prefix + borrowed bits"]
S4 --> S5["Step 5: hosts per subnet =
2ʰ − 2 where h = 32 − new prefix"]
S5 --> S6["Step 6: block size = 2ʰ
(subnet increment)"]
S6 --> S7["Step 7: List every subnet by
stepping forward by block size"]
Rounding Up to Powers of Two
The most important habit in Step 3 is rounding up to the next power of two. Because each borrowed bit doubles your subnet count, the number of subnets you can create is always 2, 4, 8, 16, 32… You cannot make exactly 5 equal subnets — you make 8 and leave the extras unused. The same logic governs hosts: usable counts follow 2ʰ − 2 = 2, 6, 14, 30, 62, 126, 254. If you need 50 hosts, 30 is too few, so you climb to 62 (a /26). Always round up; rounding down leaves you short.
| Prefix | Mask (last octet) | Block size | Usable hosts |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Visual animation — coming soon
A network team needs 5 separate subnets from a single parent block. How many host bits must they borrow, and why?
3 bits, because 2³ = 8 is the smallest power of two that is at least 5
5 bits, because you borrow exactly one bit per subnet needed
2 bits, because 2² = 4 is close enough to 5
4 bits, because you always round the requirement up to the next even number
A subnet must hold up to 50 hosts. Using the host-driven formula, how many host bits must you keep?
5 bits, because 2⁵ = 32 is closest to 50
6 bits, because 2⁶ − 2 = 62 is the smallest usable count that meets or exceeds 50
50 bits, one for each host
5 bits, because 2⁵ − 2 = 30 rounds up to 50
In FLSM, why does borrowing more subnet bits reduce the number of hosts each subnet can hold?
Borrowed subnet bits and remaining host bits share a fixed total (32 − parent prefix), so more of one leaves fewer of the other
Borrowing bits deletes host addresses from the router's memory
More subnets require more broadcast domains, which are capped at 254 hosts total
It does not; the number of hosts per subnet is fixed at 254 regardless of borrowing
You need subnets that each support 100 hosts. Which usable-host value from the 2ʰ − 2 sequence should you choose?
62, because it is the closest value to 100
126, because you must round up to a value that meets or exceeds 100
100, because subnets can be sized to any exact number
254, because that is always the safest choice
Starting from a /24 parent, you borrow 3 bits. What is the new prefix, and what mask does it produce?
/27, mask 255.255.255.224
/21, mask 255.255.248.0
/3, mask 224.0.0.0
/27, mask 255.255.255.240
For a /26 mask (255.255.255.192), what is the magic number / block size, and how is it found?
64, because 256 − 192 = 64
192, because that is the interesting octet value itself
32, because /26 is two steps past /24
26, because the block size equals the prefix length
What is the "interesting octet" of a subnet mask?
The first mask octet that is neither 0 nor 255 — where the network/host boundary falls
Always the fourth (last) octet, regardless of the mask
The octet containing the value 255
The octet with the largest number in the IP address
Given 192.168.1.50/27 (block size 32), which subnet network address does .50 belong to?
192.168.1.32, the largest multiple of 32 that does not exceed 50
192.168.1.64, the next multiple of 32 above 50
192.168.1.50, because the address is always its own network
192.168.1.48, the nearest multiple of 16 below 50
Once you know a subnet's network address, how do you find its broadcast address using block size?
Broadcast = next multiple − 1 = network + block size − 1
Broadcast = network + block size
Broadcast = network + 255
Broadcast = network + block size + 1
For 172.20.50.100/21 (mask 255.255.248.0), why does the fourth octet run its full 0–255 range inside each subnet?
Because the boundary falls in the third octet, so every octet to its right is entirely host bits
Because /21 is an invalid prefix that ignores the fourth octet
Because the block size of 8 applies to the fourth octet
Because 172.20.x.x is a Class A address that uses only three octets
The Magic Number Technique
Key Points
- Magic Number = Block Size = 256 − the interesting mask octet — it is the same block size as
2ʰ, read straight off the mask.
- The interesting octet is the first mask octet that is neither 0 nor 255 — where the network/host boundary falls.
- To locate a subnet: list the multiples of the block size, then pick the largest multiple at or below the address's value in that octet — that is the network address.
- Broadcast = next multiple − 1 (= network + block size − 1); first host = network + 1; last host = broadcast − 1.
- When the split is in the last octet, usable hosts = block size − 2.
After choosing a prefix you still have to lay out the subnets. You could do it in binary, but the magic number method is a far faster base-10 shortcut, taught as the standard exam-speed technique for CompTIA Network+.
| Mask | Prefix | Interesting octet | Magic number (256 − octet) |
| 255.255.255.192 | /26 | 192 (4th) | 64 |
| 255.255.255.224 | /27 | 224 (4th) | 32 |
| 255.255.248.0 | /21 | 248 (3rd) | 8 |
Finding Subnet Boundaries
Given the block size, finding which subnet any address belongs to is a three-step process: (1) identify the interesting octet and compute the block size; (2) list the multiples of the block size in that octet (for block 32: 0, 32, 64, 96, 128, 160, 192, 224); (3) locate the subnet start as the largest multiple that does not exceed the address's value in that octet. From the start value, the four defining addresses fall out mechanically.
flowchart TD
A["Given: address + mask"] --> B["Find interesting octet
(first mask octet not 0 or 255)"]
B --> C["Block size = 256 − mask octet"]
C --> D["List multiples in that octet:
0, block, 2×block, 3×block, …"]
D --> E["Subnet start = largest multiple
≤ address value in that octet"]
E --> F["Network = subnet start
(zeros to the right)"]
E --> G["Broadcast = next multiple − 1
(255s to the right)"]
F --> H["First host = network + 1"]
G --> I["Last host = broadcast − 1"]
Worked example — 192.168.1.50/27. The /27 mask is 255.255.255.224, so block size = 256 − 224 = 32. Rounding 50 down to the nearest multiple of 32 gives 32, so the network is 192.168.1.32, broadcast is 32 + 32 − 1 = 192.168.1.63, and the usable range is 192.168.1.33 – 192.168.1.62.
Worked example — 172.20.50.100/21. The mask is 255.255.248.0, so the interesting octet is the third (248) and block size = 256 − 248 = 8. The multiples of 8 near 50 are …40, 48, 56…; since 50 falls between 48 and 56, the network is 172.20.48.0/21 and the broadcast is 172.20.55.255. When the boundary sits in the third octet, the fourth octet runs its full 0–255 range inside every subnet.
Enumerating All Subnets
To list every subnet, walk the multiples of the block size from 0 upward until you fill the parent octet. Each multiple is a subnet's network address; add block size − 1 to reach its broadcast; the addresses in between (minus the two endpoints) are usable hosts. Handy shortcut when the split is in the last octet: usable hosts = block size − 2 — for block 32, that is 30, matching 2⁵ − 2 with no exponents in sight.
For a /26 mask (255.255.255.192), what is the magic number / block size, and how is it found?
64, because 256 − 192 = 64
192, because that is the interesting octet value itself
32, because /26 is two steps past /24
26, because the block size equals the prefix length
What is the "interesting octet" of a subnet mask?
The first mask octet that is neither 0 nor 255 — where the network/host boundary falls
Always the fourth (last) octet, regardless of the mask
The octet containing the value 255
The octet with the largest number in the IP address
Given 192.168.1.50/27 (block size 32), which subnet network address does .50 belong to?
192.168.1.32, the largest multiple of 32 that does not exceed 50
192.168.1.64, the next multiple of 32 above 50
192.168.1.50, because the address is always its own network
192.168.1.48, the nearest multiple of 16 below 50
Once you know a subnet's network address, how do you find its broadcast address using block size?
Broadcast = next multiple − 1 = network + block size − 1
Broadcast = network + block size
Broadcast = network + 255
Broadcast = network + block size + 1
For 172.20.50.100/21 (mask 255.255.248.0), why does the fourth octet run its full 0–255 range inside each subnet?
Because the boundary falls in the third octet, so every octet to its right is entirely host bits
Because /21 is an invalid prefix that ignores the fourth octet
Because the block size of 8 applies to the fourth octet
Because 172.20.x.x is a Class A address that uses only three octets
Splitting 192.168.1.0/24 into /27 subnets produces how many subnets, and why?
8 subnets, because going /24 → /27 borrows 3 bits and 2³ = 8
4 subnets, because /27 is one step smaller than /26
27 subnets, one per prefix number
32 subnets, because the block size is 32
In the /27 layout, what are the network address and broadcast address of the second subnet?
Network 192.168.1.32, broadcast 192.168.1.63
Network 192.168.1.32, broadcast 192.168.1.64
Network 192.168.1.33, broadcast 192.168.1.62
Network 192.168.1.30, broadcast 192.168.1.60
Which multiplication verifies that eight /27 subnets exactly fill the /24 parent?
8 subnets × 32 addresses = 256, which fills the /24
8 subnets × 30 hosts = 240, which fills the /24
8 subnets × 27 = 216, which fills the /24
4 subnets × 64 addresses = 256, which fills the /24
An un-subnetted /24 offers 254 usable hosts, but eight /27s offer only 240. Where did the 14 addresses go?
Each new subnet needs its own network and broadcast address; 7 extra subnet/broadcast pairs cost 14 addresses
The router silently reserves 14 addresses for routing overhead
14 addresses are lost to rounding the block size up to 32
There is no loss; both configurations offer 254 usable hosts
A point-to-point WAN link needs only 2 usable hosts but is given a /27. What does this illustrate about FLSM?
FLSM's equal-size blocks waste address space when host needs vary, motivating VLSM
FLSM automatically shrinks unused subnets to /30 to save space
A /27 is the smallest possible subnet, so no waste is possible
Point-to-point links cannot use FLSM at all
A Full Worked Example
Key Points
- A /24 splits cleanly into exactly eight /27 subnets (borrow 3 bits, 2³ = 8), each with 30 usable hosts.
- Network addresses form a tidy staircase incrementing by the block size of 32: .0, .32, .64, .96, .128, .160, .192, .224.
- Verify with 8 × 32 = 256 — the total addresses exactly fill the /24 with none left over and none overlapping.
- Usable hosts drop from 254 to 8 × 30 = 240; the 14-address gap is FLSM's built-in overhead (7 extra network/broadcast pairs).
- Equal-size blocks waste space when needs vary — the core limitation that motivates VLSM.
Let's put both halves of the chapter together and completely subnet 192.168.1.0/24 into /27 subnets, walking the seven steps: the parent is 192.168.1.0/24; each subnet must support 25–30 hosts, so a /27 fits; /24 → /27 borrows 3 bits giving 2³ = 8 subnets; the mask is 255.255.255.224; host bits = 5, so 2⁵ = 32 total addresses and 2⁵ − 2 = 30 usable; block size = 256 − 224 = 32.
Listing Ranges
Stepping through the eight block-size multiples — computing network + 1 (first host), next network − 1 (broadcast), and broadcast − 1 (last host) — gives the complete enumeration:
| Subnet | Network Address | First Host | Last Host | Broadcast |
| 1 | 192.168.1.0 | 192.168.1.1 | 192.168.1.30 | 192.168.1.31 |
| 2 | 192.168.1.32 | 192.168.1.33 | 192.168.1.62 | 192.168.1.63 |
| 3 | 192.168.1.64 | 192.168.1.65 | 192.168.1.94 | 192.168.1.95 |
| 4 | 192.168.1.96 | 192.168.1.97 | 192.168.1.126 | 192.168.1.127 |
| 5 | 192.168.1.128 | 192.168.1.129 | 192.168.1.158 | 192.168.1.159 |
| 6 | 192.168.1.160 | 192.168.1.161 | 192.168.1.190 | 192.168.1.191 |
| 7 | 192.168.1.192 | 192.168.1.193 | 192.168.1.222 | 192.168.1.223 |
| 8 | 192.168.1.224 | 192.168.1.225 | 192.168.1.254 | 192.168.1.255 |
graph TD
P["Parent: 192.168.1.0/24
256 addresses"] --> S1["Subnet 1: 192.168.1.0/27"]
P --> S2["Subnet 2: 192.168.1.32/27"]
P --> S3["Subnet 3: 192.168.1.64/27"]
P --> S4["Subnet 4: 192.168.1.96/27"]
P --> S5["Subnet 5: 192.168.1.128/27"]
P --> S6["Subnet 6: 192.168.1.160/27"]
P --> S7["Subnet 7: 192.168.1.192/27"]
P --> S8["Subnet 8: 192.168.1.224/27"]
How to read this table. Each network address is the previous one plus 32. Each broadcast is the next network minus one (= current network + 31). First host = network + 1; last host = broadcast − 1. If you can count by your block size, you can build this table for any prefix without ever writing binary.
Visual animation — coming soon
Verifying the Math
Always sanity-check with a quick multiplication: 8 subnets × 32 addresses = 256, which exactly fills the /24. A second, subtler check: total usable hosts is 8 × 30 = 240, down from the 254 in an un-subnetted /24. Those 14 "missing" addresses are the cost of creating boundaries — every new subnet needs its own network and broadcast address, and here we created seven extra pairs (14 addresses). This overhead illustrates FLSM's core limitation: a point-to-point WAN link that needs only 2 hosts still receives a full 30-host /27, wasting 28 addresses. That inefficiency is precisely what motivates VLSM (Variable-Length Subnet Masking), the subject of the next chapter.
Splitting 192.168.1.0/24 into /27 subnets produces how many subnets, and why?
8 subnets, because going /24 → /27 borrows 3 bits and 2³ = 8
4 subnets, because /27 is one step smaller than /26
27 subnets, one per prefix number
32 subnets, because the block size is 32
In the /27 layout, what are the network address and broadcast address of the second subnet?
Network 192.168.1.32, broadcast 192.168.1.63
Network 192.168.1.32, broadcast 192.168.1.64
Network 192.168.1.33, broadcast 192.168.1.62
Network 192.168.1.30, broadcast 192.168.1.60
Which multiplication verifies that eight /27 subnets exactly fill the /24 parent?
8 subnets × 32 addresses = 256, which fills the /24
8 subnets × 30 hosts = 240, which fills the /24
8 subnets × 27 = 216, which fills the /24
4 subnets × 64 addresses = 256, which fills the /24
An un-subnetted /24 offers 254 usable hosts, but eight /27s offer only 240. Where did the 14 addresses go?
Each new subnet needs its own network and broadcast address; 7 extra subnet/broadcast pairs cost 14 addresses
The router silently reserves 14 addresses for routing overhead
14 addresses are lost to rounding the block size up to 32
There is no loss; both configurations offer 254 usable hosts
A point-to-point WAN link needs only 2 usable hosts but is given a /27. What does this illustrate about FLSM?
FLSM's equal-size blocks waste address space when host needs vary, motivating VLSM
FLSM automatically shrinks unused subnets to /30 to save space
A /27 is the smallest possible subnet, so no waste is possible
Point-to-point links cannot use FLSM at all