What IPv4 subnetting is
IPv4 subnetting is the process of splitting a larger address block into smaller networks by borrowing bits from the host portion. That creates multiple subnets with clear network address, broadcast address, and host ranges.
Network versus host portion
The prefix length defines the network bits. In /24, the first 24 bits are network bits and the last 8 bits are host bits. If you move to /27, you borrow 3 of those 8 host bits for subnetting and keep 5 host bits.
CIDR prefix notation and subnet masks
CIDR uses slash notation like /26 instead of older classful boundaries. A prefix maps directly to a subnet mask.
- /24 = 255.255.255.0
- /26 = 255.255.255.192
- /30 = 255.255.255.252
How to find core addresses
- Identify the block size in the interesting octet.
- Find the nearest lower multiple of the block size.
- That multiple is the network address; add block size minus one for broadcast.
- First usable is network plus one; last usable is broadcast minus one.
Quick verification with PacketToolbox
Open IPv4 Subnet Calculator
Enter 192.168.10.34/27
Validate network, broadcast, usable range
Binary boundaries, block size, and borrowing bits
The block-size method is a fast way to avoid full binary conversion for each problem. In the interesting octet, block size is 256 - mask value.
/27 example
Mask in interesting octet is 224, so block size is 32. Network boundaries are 0, 32, 64, 96, 128, 160, 192, 224.
/26 example
Mask in interesting octet is 192, so block size is 64. Boundaries are 0, 64, 128, 192.
/31 and /32 behavior
- /31 is commonly used for point-to-point links and supports two endpoint addresses under RFC 3021 behavior.
- /32 is a host route: one exact IP, no host range.
Common CIDR table (/24 through /32)
| Prefix | Subnet mask | Total addresses | Traditional usable hosts | Block size |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 | 256 |
| /25 | 255.255.255.128 | 128 | 126 | 128 |
| /26 | 255.255.255.192 | 64 | 62 | 64 |
| /27 | 255.255.255.224 | 32 | 30 | 32 |
| /28 | 255.255.255.240 | 16 | 14 | 16 |
| /29 | 255.255.255.248 | 8 | 6 | 8 |
| /30 | 255.255.255.252 | 4 | 2 | 4 |
| /31 | 255.255.255.254 | 2 | 2 (P2P special case) | 2 |
| /32 | 255.255.255.255 | 1 | 1 (host route) | 1 |
Worked example: 192.168.10.34/27
- /27 mask is 255.255.255.224, block size 32.
- Fourth-octet boundaries: 0, 32, 64, 96, 128, 160, 192, 224.
- Address 34 falls in block 32 to 63.
- Network address: 192.168.10.32
- Broadcast address: 192.168.10.63
- First usable: 192.168.10.33
- Last usable: 192.168.10.62
- Total addresses: 32, usable hosts: 30
Worked example: 10.10.10.130/26
- /26 mask is 255.255.255.192, block size 64.
- Fourth-octet boundaries: 0, 64, 128, 192.
- Address 130 is in block 128 to 191.
- Network address: 10.10.10.128
- Broadcast address: 10.10.10.191
- First usable: 10.10.10.129
- Last usable: 10.10.10.190
- Total addresses: 64, usable hosts: 62
Common subnetting mistakes
- Using the entered host IP as the network address.
- Calculating block size from the wrong octet.
- Forgetting that /31 and /32 are special operational cases.
- Mixing wildcard-mask logic with subnet-mask math.
- Allocating overlapping subnets during planning.
Subnetting verification checklist
- Confirm the prefix length and equivalent subnet mask.
- Find the interesting octet and compute block size.
- Locate the correct boundary block.
- Compute network, broadcast, first usable, and last usable.
- Validate host capacity against design requirements.
- Double-check in the IPv4 Subnet Calculator.
FAQ
Why are usable hosts usually total minus two?
Traditional IPv4 subnets reserve one address for the network identifier and one for broadcast.
Is /31 always valid?
It is widely used on routed point-to-point links, but design and platform policy should still be confirmed.
When should I use /32?
Use /32 for host routes, loopbacks, and exact single-address route targets.
Key takeaways
What to remember
- CIDR prefix defines network bits; remaining bits are host bits.
- Block-size boundaries make subnet math fast and repeatable.
- Always verify network, broadcast, and usable range before deployment.
Run your own networks in IPv4 Subnet Calculator, then continue with How to Calculate VLSM.