What is a subnet?
A subnet is a smaller network carved out of a larger IP network. Subnetting lets you split one address block into several independent segments, each with its own range of hosts.
The one-sentence version
A subnet is a logical subdivision of an IP network. Instead of putting every device in one giant network, you break the address space into smaller pieces, each of which is a subnet. Devices inside the same subnet talk directly; traffic between subnets goes through a router.
The word itself is short for sub-network. When someone says a network is subnetted, they mean the original block has been divided so that each department, floor, or purpose gets its own slice.
Why subnetting exists
Two reasons dominate. The first is efficiency: a single flat network wastes addresses and floods every device with broadcast traffic. Splitting it keeps broadcast domains small and predictable. The second is control: putting servers, staff, and guest Wi-Fi on separate subnets lets you apply different firewall rules and routing to each.
Subnetting also keeps routing tables small. A router can advertise one summary route for a block instead of a route for every host, which is exactly what the supernet calculator on this site does in reverse.
How to read a subnet
A subnet is written as a network address plus a prefix, like 192.0.2.0/24. The /24 is the prefix length: it says the first 24 bits identify the network and the remaining 8 bits identify hosts. That leaves 256 addresses, 254 of them usable, because the first is the network address and the last is the broadcast address.
Change the prefix and you change the size. A /25 halves the block to 128 addresses; a /26 halves it again to 64. The larger the prefix number, the smaller the subnet. Enter any block into the calculator above to see its exact range.
A worked example
Take 198.51.100.0/24 and split it into four equal subnets. Each becomes a /26 with 64 addresses: 198.51.100.0/26, 198.51.100.64/26, 198.51.100.128/26, and 198.51.100.192/26. Each has 62 usable hosts. You might give one to servers, one to staff, one to phones, and one to a DMZ.
That is subnetting in practice: take a block, decide how many segments you need, pick the prefix that fits, and hand each subnet to a different purpose.
Frequently asked questions
What is the difference between a subnet and a network?
A network is the whole address block; a subnet is a piece of it. Every subnet is a network, but the term subnet implies it was created by dividing a larger block.
How many hosts can a subnet hold?
It depends on the prefix. A /24 holds 254 usable hosts, a /26 holds 62, and a /30 holds 2. The usable count is the total addresses minus the network and broadcast addresses, except for /31 and /32.
Do I need a router between subnets?
Yes. Devices in different subnets cannot talk directly at layer 3; traffic between them is routed. A switch alone keeps everything in one subnet unless you add VLANs and a router or layer-3 switch.
What is a /24 subnet?
A /24 subnet has a 24-bit prefix, the mask 255.255.255.0, and 256 addresses (254 usable). It is the most common LAN size and maps to one classic class C network.