What Is a Subnet? IP Networks Explained Simply
A subnet — short for sub-network — is a slice of a larger IP network. Every device on a network has an IP address, and that address quietly carries two pieces of information at once: which network the device belongs to, and which specific host it is within that network. Subnetting is the act of deciding where the boundary between those two parts falls, so a big block of addresses can be divided into smaller, self-contained networks.
The address has two parts
Take the IPv4 address 192.168.1.42. On its own it is just four numbers. But paired with a subnet mask like 255.255.255.0, it splits cleanly: the first three octets (192.168.1) are the network, and the last octet (42) is the host. Every device whose address starts with 192.168.1 is on the same subnet and can talk to the others directly; anything outside that range has to go through a router.
The mask is what draws the line. Each 255 means "this whole octet is network", each 0 means "this whole octet is host". Masks do not have to land on octet boundaries, though — the line can fall anywhere inside the 32 bits, which is exactly what lets you make subnets of many different sizes.
Why split a network at all?
You could put every device in an organisation into one enormous network, but it would be a poor idea. Subnets exist for several practical reasons:
- Containment of broadcast traffic — many protocols send messages to "everyone on the network". Smaller subnets mean fewer machines woken by each broadcast.
- Security and segmentation — putting servers, staff laptops and guest Wi-Fi on separate subnets lets a firewall control what may cross between them.
- Routing and structure — routers move traffic between subnets. Clean subnet boundaries make routing tables smaller and the network easier to reason about.
- Efficient address use — a point-to-point link between two routers needs only two addresses; a /30 gives it exactly that instead of wasting a larger block.
Network, broadcast, and the usable range
Inside any IPv4 subnet, two addresses have special jobs. The first address is the network address — it names the subnet itself and is never assigned to a device. The last address is the broadcast address — used to reach every host at once. Everything in between is the usable host range. So a subnet that contains 256 addresses (a /24) gives you 254 usable ones: 256 minus the network and broadcast.
This is the most common source of off-by-one mistakes when planning by hand, and it is exactly what the subnet calculator works out for you. Enter 192.168.1.0/24 and it reports the network as 192.168.1.0, the broadcast as 192.168.1.255, and the usable range as 192.168.1.1 – 192.168.1.254.
Want to see the network, broadcast, range and mask for any block instantly?
Open the Subnet CalculatorHow big is a subnet?
The size of a subnet is set entirely by how many bits are left for hosts. With 8 host bits you get 28 = 256 addresses; with 6 host bits, 26 = 64; with 2 host bits, just 4. Move the mask boundary one bit to the right and the subnet halves; one bit to the left and it doubles. That simple doubling is the whole game of subnetting, and the shorthand for it — the slash-number — is called CIDR notation.
Subnets in IPv6
IPv6 keeps the same idea of a network part and a host part, but the numbers are far larger (128 bits instead of 32) and there is no broadcast address to reserve. The standard subnet size is /64, which is so vast that you almost never count hosts — you allocate whole /64s freely. The mechanics of where the boundary sits are identical; only the scale changes, as covered in IPv4 vs IPv6 subnetting.