Learn how subnet masks divide IPv4 addresses, how prefix length changes subnet size, and how to choose practical subnet layouts for small networks.
What you will be able to do
- Explain how an IPv4 address and subnet mask separate network and host information.
- Interpret CIDR prefix notation and relate common prefixes to address counts.
- Calculate the number of addresses and assignable device addresses in small subnets.
- Use subnetting and VLSM concepts to organize addresses for different network needs.
01
1. An address has two jobs
An IPv4 address contains 32 binary bits. Some bits identify the network, while the remaining bits identify a host within that network.
A subnet mask marks the boundary between those two roles. Its bits indicate which address positions belong to the subnet and which remain available for hosts.
02
2. Why divide a network?
Subnetting breaks one larger address block into smaller subnetworks. This gives a network designer separate address ranges for different parts of a small network.
The key change is extending the original mask. Bits that previously identified hosts become additional prefix bits, creating a new subnetwork identifier.
For example, increasing a prefix within the same parent block creates more subnets, but each resulting subnet contains fewer host positions.
03
3. Reading prefix notation
CIDR notation describes a network with an address followed by a slash and the mask length. The number after the slash tells you how many leading bits form the prefix.
A longer prefix leaves fewer host bits. Therefore, a longer prefix generally describes smaller subnets inside the same address block.
For instance, 10.24.0.0/13 uses a mask of 255.248.0.0. The slash notation provides a compact way to name that mask length.
04
4. Counting the space in a subnet
The host-bit count tells you how many address positions a subnet contains. Borrowing bits for the prefix reduces the number of positions left for hosts.
A /28 subnet leaves four host bits, so it contains 16 total addresses. In this lesson’s network example, 14 of those addresses can be assigned to devices.
This is different from simply counting every address as a device address. A subnet’s total address space and its assignable device space are separate quantities.
05
5. A /27 design
A 255.255.255.224 mask is another way to write /27. Applied to a /24 parent block, it creates eight smaller subnets.
Each resulting subnet contains 32 addresses. Thirty addresses in each subnet can be assigned to devices.
Compared with /28, /27 creates fewer subnets, but each subnet supports more assignable devices. The prefix choice therefore depends on the size required by each group.
06
6. Very small subnet sizes
Not every prefix is chosen for an ordinary group of devices. A /32 mask, written as 255.255.255.255, identifies a subnet containing one IPv4 host address.
A 31-bit mask provides exactly two host addresses. It omits network and broadcast addresses, so it suits a point-to-point link.
A /30 mask represents four IPv4 addresses: two host addresses, one network address, and one broadcast address. These cases show that prefix length can support different connection patterns.
07
7. Choosing a subnet size
Subnetting is a tradeoff between quantity and capacity. Taking more host bits creates more subnetworks, while leaving fewer borrowed bits creates larger individual subnets.
Suppose one department needs many device addresses and another needs fewer. Giving both groups identical subnet sizes may leave unused space in the smaller group.
The useful question is not only, “How many subnets are needed?” It is also, “How many device addresses does each subnet need?”
08
8. Using different masks
Variable Length Subnet Masks, or VLSM, allow different subnets to use different mask lengths. This approach matches address capacity to the needs of each subnet.
A larger group can receive a prefix that leaves more host bits. A smaller group can receive a longer prefix, conserving addresses that would otherwise remain unused.
VLSM is therefore an address-planning method, not a single fixed prefix. Its purpose is more efficient use of the available address space.
09
9. Locating an address
An address alone does not fully identify its subnet boundary. The device address must be considered together with its subnet mask.
Using both values, you can determine which subnet contains that address. This makes the mask essential for interpreting an address inside a network plan.
Recap: the mask separates prefix bits from host bits; extending the prefix creates smaller subnets; and CIDR records the prefix length after a slash.
Recap: /28 leaves four host bits and contains 16 addresses. A /27 subnet contains 32 addresses, of which 30 are assignable.
Recap: /32 identifies one host address, /31 provides two point-to-point host addresses, and /30 represents two host addresses plus network and broadcast addresses.
Recap: VLSM uses different masks for different subnet needs. In Practice and Prove, use an address with its mask, count the resulting space, and justify the prefix choice.