Example 1
Office computers
192.168.1.0/24
A possible subnet for employee devices.
Learn computer networks, Wi-Fi, routers, IP addressing, network protocols, troubleshooting, and network security through practical guides and step-by-step explanations.
Networking Fundamentals · Beginner Guide
Subnetting is an essential networking skill used to divide a larger IP network into smaller logical networks. It helps administrators organize devices, plan IP addresses, and control how systems communicate.
This guide explains subnet masks, CIDR notation, network addresses, broadcast addresses, and usable host ranges with practical IPv4 examples. You will also learn why subnetting matters when defending a network.
Subnetting is the process of dividing an IP network into smaller networks called subnets. Each subnet has its own network prefix and address range.
For example, a company may have separate networks for office computers, servers, guest Wi-Fi, and security cameras. Rather than treating every device as part of one large network, an administrator can allocate different subnets to these groups.
Example 1
192.168.1.0/24
A possible subnet for employee devices.
Example 2
192.168.2.0/24
A separate address range for camera devices.
Example 3
192.168.3.0/24
A separate subnet that can have restricted access.
These are illustrative private IPv4 networks. Creating separate address ranges alone does not isolate devices; routers, VLANs, firewall rules, and other network configurations determine how traffic can move between them.
Subnetting helps network administrators plan address allocation and organize infrastructure. The exact benefits depend on the network design and how the subnets are configured.
Allocate suitable address ranges to different departments, sites, and device groups.
Separate logical groups such as servers, employee devices, printers, and guest systems.
Use routing and network design to control communication between different subnets.
Apply access-control lists and firewall policies to limit unnecessary communication between network segments.
An IPv4 subnet mask identifies which bits of an address belong to the network prefix and which bits remain for addresses within that subnet.
Consider the following IPv4 configuration:
| Setting | Example |
|---|---|
| IP address | 192.168.1.10 |
| Subnet mask | 255.255.255.0 |
| CIDR prefix | /24 |
| Network address | 192.168.1.0 |
| Broadcast address | 192.168.1.255 |
| Typical usable range | 192.168.1.1–192.168.1.254 |
In binary, the mask 255.255.255.0 is represented by 24 consecutive ones followed by 8 zeros. The 24 ones identify the network prefix, while the remaining 8 bits provide the subnet's address space.
Remember this relationship
255.255.255.0 = /24 = 24 network-prefix bits
This is one of the most common IPv4 subnet configurations used in learning examples and small networks.
CIDR stands for Classless Inter-Domain Routing. CIDR notation represents an IP network by writing its address followed by a slash and the number of bits in its network prefix.
For example, 192.168.1.0/24 identifies a network with a 24-bit IPv4 prefix. IPv4 addresses contain 32 bits in total, so this prefix leaves 8 bits in the address for the remaining portion.
| CIDR | Subnet mask | Host bits |
|---|---|---|
| /24 | 255.255.255.0 | 8 |
| /25 | 255.255.255.128 | 7 |
| /26 | 255.255.255.192 | 6 |
| /27 | 255.255.255.224 | 5 |
| /28 | 255.255.255.240 | 4 |
As the prefix number increases, fewer host bits remain and the subnet becomes smaller. As the prefix number decreases, more host bits remain and the subnet contains a larger address range.
In a conventional IPv4 subnet, three concepts are especially important: the network address, the broadcast address, and the usable host addresses between them.
192.168.1.0
For the example network 192.168.1.0/24, this address identifies the subnet itself and is not normally assigned to a host.
192.168.1.1–192.168.1.254
These are the conventional host addresses available within this /24 subnet, subject to the network's configuration and address allocation.
192.168.1.255
This is the subnet-directed broadcast address for the /24 network. It is used to address eligible hosts on that subnet.
The familiar formula that excludes the network and broadcast addresses applies to conventional IPv4 subnets such as /24, /25, and /26. Special cases, including /31 point-to-point links and /32 host routes, follow different rules.
Suppose a computer has the following configuration:
Given configuration
192.168.10.25/26
Our task is to find the subnet mask, network address, broadcast address, and conventional usable host range.
A /26 prefix means 26 network bits and 6 remaining bits. The corresponding subnet mask is:
255.255.255.192
In the last octet, subtract the mask value from 256:
256 − 192 = 64
Therefore, the subnet ranges in the last octet start at 0, 64, 128, and 192.
The address ends in 25, which falls in the range from 0 through 63. Therefore, it belongs to the first subnet.
Network address: 192.168.10.0
The subnet ends at the address immediately before the next block begins.
Broadcast: 192.168.10.63
For this conventional /26 subnet, the usable host addresses are between the network and broadcast addresses.
192.168.10.1–192.168.10.62
This reference table shows common conventional IPv4 subnet sizes. The usable host counts exclude the network and broadcast addresses.
| Prefix | Subnet mask | Total addresses | Usable hosts | Typical example |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 | Common small LAN |
| /25 | 255.255.255.128 | 128 | 126 | Smaller network segment |
| /26 | 255.255.255.192 | 64 | 62 | Small device group |
| /27 | 255.255.255.224 | 32 | 30 | Small subnet |
| /28 | 255.255.255.240 | 16 | 14 | Very small subnet |
A conventional IPv4 subnet's total address count can be calculated as 2 raised to the number of host bits. For example, a /26 prefix leaves 6 host bits, so 2⁶ = 64 total addresses and typically 62 usable host addresses.
When solving a subnetting problem, follow a consistent process rather than trying to memorize every possible address range.
Given 192.168.5.70/26, calculate the subnet mask, network address, broadcast address, and usable host range.
Answer
Network defenders need to understand which devices belong to which subnets and how traffic moves between them. Subnetting knowledge is useful when investigating alerts, configuring firewalls, and reviewing network traffic.
Separate groups of devices into logical network segments and restrict communication where appropriate.
Interpret CIDR ranges and create rules for permitted or denied source and destination networks.
Recognize whether an IP address belongs to an internal subnet, a known server network, or another address range.
Use subnet information alongside timestamps, ports, device records, and traffic evidence to investigate unusual activity.
Different IP subnets do not automatically guarantee security. Effective segmentation requires appropriate network architecture, routing controls, firewall policies, and monitoring. A defender should verify which traffic is actually permitted between segments.
Once you understand IPv4 subnetting, compare IPv4 with IPv6 to learn how modern networks handle addressing and larger address spaces.
Subnetting is the process of dividing an IP network into smaller logical networks called subnets. It helps organize addressing, manage network traffic, and apply network policies.
A subnet mask identifies the network portion and host portion of an IPv4 address. For example, 255.255.255.0 corresponds to the /24 prefix.
The /24 prefix means that the first 24 bits of the IPv4 address identify the network prefix, leaving 8 bits for the remaining address space.
A conventional IPv4 /24 subnet contains 256 total addresses. Typically, 254 are usable host addresses because the network and broadcast addresses are reserved.
The network address identifies the subnet itself. The IPv4 broadcast address is used to send traffic to eligible hosts on that subnet.
Subnetting helps network defenders separate systems, organize firewall rules, monitor traffic between network segments, and limit unnecessary access when combined with appropriate security controls.
IP Addressing Learning Path
Build your networking knowledge step by step, from IP addressing fundamentals to subnet calculations and IPv4/IPv6.