Calculate the network address, broadcast address, and usable host range for an IP subnet.
The /24 prefix leaves 8 bits for hosts, giving 2^8 addresses total (254 usable, excluding network and broadcast).
Subnetting divides a large IP network into smaller, more manageable sub-networks. An IPv4 address combined with a subnet mask (or CIDR prefix) determines which portion of the address identifies the network and which portion identifies individual hosts within it.
| CIDR | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| Range | CIDR |
|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 |
Why do I lose 2 addresses per subnet? The first address in any subnet is reserved to identify the network itself, and the last address is reserved as the broadcast address — neither can be assigned to a host.
What's the difference between a subnet mask and CIDR notation? They express the same information differently — a subnet mask uses dotted-decimal format (255.255.255.0), while CIDR notation uses a slash and bit count (/24).
How do I choose the right subnet size? Pick the smallest subnet that comfortably fits your current and near-future host count, since oversized subnets waste address space.
What's the difference between a /31 and /30 subnet? A /30 provides 2 usable host addresses (typical for point-to-point links with network/broadcast reserved), while a /31, defined by RFC 3021, forgoes the network/broadcast reservation entirely to provide exactly 2 usable addresses — commonly used for router-to-router links to conserve address space.
Why do private IP ranges exist? RFC 1918 reserved specific address blocks for use within private networks (not routable on the public internet), allowing organizations to use these addresses internally without conflicting with public IP allocations.
What's the difference between subnetting and supernetting (CIDR aggregation)? Subnetting divides a larger network into smaller blocks; supernetting (route aggregation) combines multiple smaller contiguous networks into a single larger routing announcement to reduce routing table size.
Does this work for IPv6 subnetting too? No — IPv6 uses a fundamentally larger 128-bit address space with different conventions (commonly /64 subnets), so IPv4 CIDR calculations don't directly translate to IPv6 planning.
For 192.168.1.0/26, the subnet mask is 255.255.255.192, giving 64 total addresses: network address 192.168.1.0, broadcast address 192.168.1.63, and a usable host range of 192.168.1.1 through 192.168.1.62 (62 usable hosts).
CIDR: Classless Inter-Domain Routing — a notation (e.g., /24) expressing how many bits form the network portion of an IP address.
Network address: The first address in a subnet, reserved to identify the network itself and not assignable to a host.
Broadcast address: The last address in a subnet, reserved for sending data to all hosts on that network.
What does /24 mean?
It means the first 24 bits of the 32-bit IP address are the network portion, leaving 8 bits (256 addresses, 254 usable) for hosts — this is the default for a standard Class C-sized network.