An IPv4 subnet is a smaller logical network created from a larger IPv4 address block. Subnetting allows network operators to divide available IPv4 addresses into manageable groups based on technical, operational, or organisational requirements.
For example, an organisation with the IPv4 network:
192.168.1.0/24
could divide it into two smaller networks:
192.168.1.0/25
and
192.168.1.128/25
Each resulting range is a subnet.
Subnetting is fundamental to modern networking because it helps organisations organise networks, control traffic, apply security policies, improve routing, and use limited IPv4 address space more efficiently.
To understand why this matters, it helps to start with how IPv4 addressing works.
What Is IPv4?
IPv4, or Internet Protocol version 4, is an addressing protocol that uses 32-bit addresses.
An IPv4 address is normally written as four decimal numbers separated by periods:
192.168.1.10
Because an IPv4 address contains 32 bits, the total theoretical address space contains 2³² addresses—approximately 4.3 billion.
IPv4 address space is therefore finite. Efficient allocation and management have become increasingly important as Internet use has expanded.
The global IPv4 address space is coordinated through the Internet number-resource system, with IANA maintaining the global IPv4 Address Space Registry.
What Is an IPv4 Subnet?
A subnet, short for subnetwork, is a logical subdivision of an IP network.
Instead of treating a large IPv4 address block as one network, an operator can divide it into several smaller networks.
Consider this IPv4 block:
192.168.10.0/24
A /24 contains 256 total IPv4 addresses.
It could remain one /24, or the organisation could divide it into smaller prefixes depending on its requirements.
For example:
- 192.168.10.0/26
- 192.168.10.64/26
- 192.168.10.128/26
- 192.168.10.192/26
Each /26 contains 64 total IPv4 addresses.
The original /24 has therefore been divided into four smaller subnets.
Subnetting procedures have been part of Internet networking standards for decades, while modern classless allocation and routing are closely associated with CIDR.
Why Do Networks Use Subnets?
Imagine an organisation with hundreds or thousands of devices.
Putting every device into a single network may make addressing, administration, traffic management, and security unnecessarily difficult.
Subnetting allows an organisation to create separate logical networks for different purposes.
For example:
| Subnet | Purpose |
|---|---|
10.10.1.0/24 | Employee devices |
10.10.2.0/24 | Servers |
10.10.3.0/24 | Guest Wi-Fi |
10.10.4.0/24 | Network infrastructure |
These networks can then be managed separately.
A network administrator might allow employees to reach specific application servers while preventing guest Wi-Fi users from accessing internal infrastructure.
Subnetting therefore provides structure to IP addressing.
Read more: IPv4 subnets are essential in modern networking
How Does IPv4 Subnetting Work?
Every IPv4 subnet has two important components:
Network portion — identifies the network or prefix.
Host portion — provides addressing space within that network.
The boundary between these portions is defined by a subnet mask or prefix length.
Consider:
192.168.1.0/24
The /24 means that the first 24 bits represent the network prefix.
The remaining:
32 - 24 = 8 bits
are available for addresses within that subnet.
Because eight bits can represent:
2⁸ = 256
the /24 contains 256 total IPv4 addresses.
This slash-based representation is called CIDR notation.
What Is CIDR Notation?
CIDR stands for Classless Inter-Domain Routing.
CIDR represents an IP network using an address followed by a slash and a prefix length.
Examples include:
10.0.0.0/8
172.16.0.0/12
192.168.1.0/24
203.0.113.0/28
The number following the slash tells us how many of the 32 IPv4 bits belong to the network prefix.
A smaller prefix number means a larger address block.
A larger prefix number means a smaller address block.
For example:
/16 = 65,536 total addresses
/24 = 256 total addresses
/28 = 16 total addresses
/32 = 1 address
CIDR was introduced to enable more flexible IPv4 address assignment and aggregation while helping conserve IPv4 address space and control routing-table growth.
For a deeper explanation, see What Is CIDR? CIDR Explained: IP Addressing and Routing.
What Is a Subnet Mask?
A subnet mask is another way to express which portion of an IPv4 address represents the network.
For example:
192.168.1.0/24
has the subnet mask:
255.255.255.0
Similarly:
| CIDR Prefix | Subnet Mask | Total Addresses |
|---|---|---|
/8 | 255.0.0.0 | 16,777,216 |
/16 | 255.255.0.0 | 65,536 |
/24 | 255.255.255.0 | 256 |
/25 | 255.255.255.128 | 128 |
/26 | 255.255.255.192 | 64 |
/27 | 255.255.255.224 | 32 |
/28 | 255.255.255.240 | 16 |
/29 | 255.255.255.248 | 8 |
/30 | 255.255.255.252 | 4 |
/31 | 255.255.255.254 | 2 |
/32 | 255.255.255.255 | 1 |
Today, CIDR notation is generally easier and more compact than writing subnet masks in dotted-decimal format.
How Many IP Addresses Are in a Subnet?
The number of IPv4 addresses in a subnet can be calculated using:
Total IPv4 addresses = 2^(32 − prefix length)
For a /24:
2^(32 − 24) = 256
For a /26:
2^(32 − 26) = 64
For a /28:
2^(32 − 28) = 16
This gives the total number of addresses in the block, not necessarily the number that can be assigned to ordinary hosts.
Network Address, Host Addresses and Broadcast Address
In a conventional IPv4 subnet that uses broadcast semantics, addresses have different roles.
Consider:
192.168.1.0/24
The range runs from:
192.168.1.0
to:
192.168.1.255
Traditionally:
Network address:192.168.1.0
Typical host range:192.168.1.1 – 192.168.1.254
Broadcast address:192.168.1.255
This leaves 254 conventionally usable host addresses in a /24.
A commonly taught calculation is therefore:
Usable hosts = 2^(host bits) − 2
However, this rule has important exceptions.
A /31, for example, can be used on IPv4 point-to-point links under RFC 3021, allowing both addresses to be used on the link rather than reserving separate network and broadcast addresses.
A /32, meanwhile, represents one individual IPv4 address and is frequently used in routing and other network configurations.
For that reason, operators should not apply the “minus two” rule blindly to every IPv4 prefix.
Example: Dividing a /24 Into Smaller Subnets
Suppose an organisation has:
192.168.100.0/24
but wants four networks of equal size.
Increasing the prefix from /24 to /26 creates four subnets:
| Subnet | Address Range | Total Addresses |
|---|---|---|
192.168.100.0/26 | .0 – .63 | 64 |
192.168.100.64/26 | .64 – .127 | 64 |
192.168.100.128/26 | .128 – .191 | 64 |
192.168.100.192/26 | .192 – .255 | 64 |
The same 256-address space is still being used.
Subnetting has simply divided it into four separate logical networks.
This flexibility allows organisations to allocate addresses according to actual operational requirements rather than treating every address as part of one large network.
Public vs Private IPv4 Subnets
IPv4 subnets can use either public or private address space, depending on their purpose.
Private IPv4 Subnets
Private IPv4 addresses are intended for internal networks and are not globally routed across the public Internet.
RFC 1918 defines three major private IPv4 ranges:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
They are commonly used inside:
- enterprise networks;
- homes;
- data centres;
- cloud environments;
- campus networks; and
- internal application environments.
Different organisations can reuse these private ranges because they do not need to be globally unique on the public Internet.
Public IPv4 Subnets
Public IPv4 address space is globally coordinated so that addresses can be uniquely associated with networks for public Internet use.
Public IPv4 subnets may be used by:
- Internet service providers;
- hosting companies;
- cloud platforms;
- data centres;
- content networks;
- enterprises; and
- other network operators.
Because public IPv4 resources are finite, efficient subnet planning can have consequences beyond local network administration.
What Is Variable Length Subnet Masking?
Not every subnet needs to be the same size.
Variable Length Subnet Masking (VLSM) allows operators to create differently sized subnets within a larger address allocation.
For example, suppose an organisation has a /24.
One department may need approximately 100 addresses, while another requires only 20.
Rather than assigning equal-sized blocks, the network could use different prefix lengths based on actual requirements.
For example:
192.0.2.0/25 — 128 total addresses
192.0.2.128/27 — 32 total addresses
Additional portions of the original address space could then be allocated to other functions.
This can reduce unnecessary address consumption.
CIDR's classless approach enables flexible prefix lengths rather than forcing networks into the fixed address classes used in earlier Internet architecture.
Subnetting vs CIDR: Are They the Same?
The terms are related but not identical.
Subnetting generally describes dividing a larger network into smaller logical networks.
CIDR is a classless addressing and routing system that uses variable-length prefixes such as /20, /24, or /27.
CIDR notation is now commonly used when describing subnets, which is why the concepts frequently appear together.
For example:
203.0.113.0/24
describes an IPv4 prefix using CIDR notation.
If it is divided into:
203.0.113.0/25
and
203.0.113.128/25
the network has been subnetted.
Subnetting vs Supernetting
Subnetting divides a larger block into smaller prefixes.
Supernetting or route aggregation works in the opposite direction, representing multiple contiguous prefixes using a larger aggregate where addressing and routing conditions permit.
For example, contiguous networks may sometimes be represented by a common aggregate rather than advertising many individual routes.
Route aggregation is important because CIDR was designed not only to conserve address space but also to limit unnecessary growth in Internet routing state.
This shows how address planning at the local level can also relate to the wider architecture of Internet routing.
Why IPv4 Subnetting Matters
1. More Efficient IPv4 Use
IPv4 address space is limited.
Proper subnet sizing can help operators avoid allocating far more addresses than a network actually requires.
A network needing ten addresses generally does not need an entire /24 solely for that function.
2. Better Network Organisation
Subnetting enables infrastructure to be divided according to function, location, customer group, application, security zone, or other operational requirements.
3. Security Segmentation
Separate subnets can support security policies between different groups of systems.
For example, public-facing servers can be separated from internal administrative infrastructure.
Subnetting alone is not a security control, but it provides useful boundaries upon which firewalls, routing policies, access-control systems, and other controls can operate.
4. Easier Network Management
Structured address plans make it easier to understand:
- where resources are assigned;
- which networks serve particular functions;
- how much address space remains available; and
- where conflicts or inefficient allocations may exist.
5. Routing Efficiency
Well-planned address hierarchies can make route aggregation easier and help operators avoid unnecessarily fragmented routing announcements.
IPv4 Subnetting and Address Management
Subnetting should not be treated as an isolated calculation.
At scale, organisations must also track:
- allocated prefixes;
- available prefixes;
- reserved addresses;
- network ownership or responsibility;
- routing configuration;
- DNS information;
- DHCP assignments; and
- changes over time.
This is where IP Address Management (IPAM) becomes important.
IPAM provides processes and tools for tracking and managing address resources across increasingly complex environments.
Read more in What Is IP Address Management (IPAM)?.
For data-centre operators, Larus Foundation also provides a deeper guide to Best Practices for IPv4 Subnet Allocation in Data Centres.
IPv4 Subnets and Internet Number Resource Governance
Subnetting may appear to be purely a network-engineering topic, but public IPv4 address space exists within a much larger resource-management framework.
At the global level, IANA maintains registries for Internet number resources, including IPv4 address space. Regional Internet Registries then play an important role in administering number resources within their respective service regions.
Within an organisation, operators may divide allocated address space into smaller subnets.
This creates several layers of stewardship:
Global coordination helps maintain a coherent Internet-wide addressing system.
Regional administration applies community-developed policies to number resources.
Network-level management determines how available addresses are actually deployed.
Efficient subnetting is therefore one small part of responsible Internet number-resource management.
For more background, read What Is IP Allocation?.
IPv4 Scarcity Makes Efficient Subnet Planning More Important
IPv4 has a fixed 32-bit address space.
As the Internet expanded, freely available IPv4 address pools became increasingly constrained.
CIDR itself was developed partly to improve the efficiency of address assignment and conserve the existing IPv4 address space.
Today, network operators may need to think carefully about how much IPv4 space different services actually require.
Oversized subnets can leave valuable address capacity unused.
Excessively small or fragmented allocations, however, can make future growth and routing management more difficult.
Good address planning therefore requires balance.
The objective is not simply to create the smallest possible subnet. It is to assign resources efficiently while allowing for realistic operational requirements and future development.
Common IPv4 Subnetting Mistakes
Several mistakes occur frequently when organisations plan IPv4 networks.
Allocating Subnets That Are Too Large
Oversized blocks can waste limited IPv4 resources.
Creating Subnets With No Growth Capacity
Planning only for current requirements can lead to repeated renumbering or fragmented allocations later.
Overlapping Address Space
Two networks using overlapping ranges can create routing and connectivity problems when those environments need to communicate.
This is particularly common when independently designed private networks are later connected through mergers, VPNs, hybrid-cloud environments, or other integrations.
Poor Documentation
Even technically correct subnetting can become difficult to manage if nobody knows which ranges have been assigned, why they were assigned, or who is responsible for them.
Ignoring Address Hierarchy
Random allocations can make route aggregation and future network expansion more complicated.
Effective address planning should consider not only today's host count but also network architecture, routing, growth, and operational responsibility.
Conclusion
An IPv4 subnet is a logical subdivision of an IPv4 network.
By using subnet masks and CIDR prefix lengths, network operators can determine how much address space belongs to each network and divide larger IPv4 blocks into smaller, more manageable ranges.
A /24, for example, contains 256 total addresses. It can remain one network or be divided into /25, /26, /27, or other appropriately aligned prefixes depending on operational requirements.
But subnetting is about more than calculating binary boundaries.
Good subnet design supports:
- efficient IPv4 utilisation;
- organised infrastructure;
- network segmentation;
- scalable routing;
- accurate resource management; and
- responsible stewardship of limited IPv4 address space.
As IPv4 resources remain constrained, understanding how addresses are divided, allocated, documented, and managed is increasingly important for network operators and for anyone seeking to understand the infrastructure behind the global Internet.
At LARUS Foundation, we promote greater understanding of Internet infrastructure and governance so that more people can participate meaningfully in discussions about the technologies and policies that keep the Internet open, interoperable, and resilient.
Frequently Asked Questions About IPv4 Subnets
What is an IPv4 subnet in simple terms?
An IPv4 subnet is a smaller logical network created from a larger IPv4 address block. It groups addresses together so networks can be organised and managed more efficiently.
What does /24 mean in an IPv4 address?
A /24 means the first 24 bits of a 32-bit IPv4 address form the network prefix. This leaves eight bits for addresses within the subnet, producing 256 total IPv4 addresses.
How many usable IP addresses are in a /24?
A /24 contains 256 total addresses. In a traditional broadcast subnet, the network address and broadcast address are not assigned to ordinary hosts, leaving 254 conventionally usable host addresses.
What is the difference between /24 and /28?
A /24 contains 256 total IPv4 addresses, while a /28 contains 16.
Because the /28 has a longer network prefix, fewer bits remain available for addresses within the subnet.
What is the smallest IPv4 subnet?
That depends on the use case.
A /32 represents a single IPv4 address. A /31 contains two addresses and is specifically supported for IPv4 point-to-point links under RFC 3021. Traditional multi-access IPv4 subnet calculations have different network and broadcast considerations.
Is a subnet the same as an IP address?
No.
An individual IP address represents one address, such as:
192.168.1.20
A subnet represents a range or network prefix, such as:
192.168.1.0/24
Can a public IPv4 block be divided into subnets?
Yes. An organisation can divide appropriately assigned public IPv4 address space into smaller subnets according to its network architecture and operational requirements.
Why is subnetting important for IPv4?
Subnetting helps organisations organise networks, segment infrastructure, support routing and security policies, and use finite IPv4 address space more efficiently.
