Subnetting divides an IP network into smaller networks so addresses can be allocated efficiently and routing boundaries can match an organization’s design. CCNA learners should understand both fixed-length subnet masking (FLSM) and variable-length subnet masking (VLSM), along with prefix notation and usable host ranges.
What Is an IPv4 Subnet Mask?
A subnet mask identifies the network portion and host portion of an IPv4 address. Prefix notation expresses the number of network bits. For example, 192.168.10.0/24 uses 24 network bits and leaves 8 host bits.
Why Networks Use Subnetting
- Allocate address space according to the number of required hosts.
- Create separate broadcast domains.
- Support security and organizational boundaries.
- Make routing and troubleshooting easier.
- Enable route summarization in a hierarchical design.
What Is FLSM?
Fixed-Length Subnet Masking (FLSM) gives every subnet the same prefix length. If a /24 network is divided into /26 subnets, each subnet contains the same number of addresses.
Example for 192.168.10.0/24 divided into /26 networks:
| Subnet | Usable host range | Broadcast |
|---|---|---|
| 192.168.10.0/26 | 192.168.10.1–62 | 192.168.10.63 |
| 192.168.10.64/26 | 192.168.10.65–126 | 192.168.10.127 |
| 192.168.10.128/26 | 192.168.10.129–190 | 192.168.10.191 |
| 192.168.10.192/26 | 192.168.10.193–254 | 192.168.10.255 |
What Is VLSM?
Variable-Length Subnet Masking (VLSM) uses different prefix lengths within the same address block. A large department might receive a /25, a smaller team a /27, and a point-to-point link a much smaller subnet. This reduces address waste compared with assigning every segment an equally large subnet.
How to Design a VLSM Address Plan
- List each network and its required number of hosts.
- Sort the requirements from largest to smallest.
- Choose the smallest prefix that supports each requirement.
- Allocate the largest subnet first from the available address block.
- Continue with the next available network boundary.
- Record the network address, usable range, broadcast address, and gateway.
- Confirm that no subnets overlap.
Useful IPv4 Subnetting Formulas
With h host bits, a traditional subnet provides 2^h total addresses. In a normal LAN subnet, usable host addresses are commonly calculated as 2^h - 2 because the network and broadcast addresses are reserved.
The block size in the changing octet is 256 - subnet-mask value. For a /27 mask of 255.255.255.224, the block size is 32, so networks begin at 0, 32, 64, 96, and so on.
Common Subnetting Mistakes
- Forgetting to place a subnet on the correct block boundary.
- Counting the network or broadcast address as a normal host.
- Allocating small VLSM networks before large ones.
- Creating overlapping address ranges.
- Confusing the number of subnets with the number of hosts.
Frequently Asked Questions
What is the main difference between FLSM and VLSM?
FLSM uses one prefix length for all subnets; VLSM uses different prefix lengths based on actual requirements.
Is classful addressing still the best way to subnet?
No. Modern networking uses classless prefixes. Class A, B, and C terminology can help with history, but calculations should be based on prefix length.
Where can I practice more subnetting questions?
Review our CCNA interview questions and answers. For focused preparation, use the Cisco 200-301 Premium PDF with the latest available questions and answers.
CiscoForAll provides independent study and practice material. Always use official Cisco documentation as a primary preparation source.