OneWebDesk

Subnetting & CIDR Basics: Splitting a /24

What CIDR notation and subnet masks mean, with a worked example of splitting a /24.

Subnetting is the practice of carving one large block of IP addresses into several smaller networks. At first the 192.168.1.0/24 notation and a mask like 255.255.255.0 look like two unrelated things, but they are really the same fact written two different ways. This guide walks a beginner from what CIDR notation and subnet masks actually mean, through the host-count formula, all the way to splitting a single /24 into four /26 networks.

One idea unlocks everything: an IPv4 address is 32 bits, and those 32 bits split into a network part and a host part. The number that tells you where the network part ends is the prefix — the value after the slash in /24.

CIDR notation and subnet masks are the same thing

CIDR (Classless Inter-Domain Routing) notation looks like address/prefix-length. The prefix length says how many of the 32 bits, counting from the left, belong to the network. A /24 means the first 24 bits are network and the remaining 8 bits are host.

A subnet mask states the same thing in dotted-decimal. You set every network bit to 1 and every host bit to 0, then convert each group of 8 bits to decimal.

CIDRSubnet maskHost bitsUsable hosts
/24255.255.255.08254
/26255.255.255.192662
/30255.255.255.25222

A bigger prefix (say /24/26) means more network bits and fewer host bits, so each subnet holds fewer machines. To drop in any address and instantly see its mask, network, and range, the fastest path is the CIDR calculator.

The host-count formula: 2^(32-prefix) - 2

The total number of addresses in a subnet is two raised to the number of host bits, i.e. 2^(32 - prefix). But two of those addresses are reserved and cannot go to ordinary devices.

  • Network address — the first address, with all host bits set to 0. It names the subnet itself.
  • Broadcast address — the last address, with all host bits set to 1. It addresses every host at once.

So the number you can actually assign is usable hosts = 2^(32 - prefix) - 2. A /26 has 6 host bits, giving 2^6 = 64 addresses; subtract 2 and you get 62 usable hosts. (Two exceptions: /31 is used for point-to-point links and ignores the -2 rule, and /32 denotes a single host.)

Worked example: splitting 192.168.1.0/24 into four /26s

Going from /24 to /26 adds 2 bits to the prefix. Two extra bits create 2^2 = 4 combinations, so you get exactly four subnets. Each /26 holds 64 addresses, so the boundaries land cleanly on 0, 64, 128, 192.

SubnetNetworkUsable rangeBroadcast
#1192.168.1.0/26.1 – .62192.168.1.63
#2192.168.1.64/26.65 – .126192.168.1.127
#3192.168.1.128/26.129 – .190192.168.1.191
#4192.168.1.192/26.193 – .254192.168.1.255

Notice that the first address of each subnet (.0, .64, .128, .192) is the network address and the last (.63, .127, .191, .255) is the broadcast — neither can be handed to a device. To generate this whole table without doing the arithmetic by hand, feed 192.168.1.0/24 and the target /26 into the subnet splitter.

Which tool to reach for, and when

Three tasks start from different inputs. Pick the tool based on what you have and what you want to learn.

  • Inspect a single CIDR — to see the mask, range, and host count for 10.0.0.0/20, use the CIDR calculator.
  • Divide a block into many subnets — to split a /24 into four /26s, use the subnet splitter.
  • Only know a start and end IP — to turn a range like 192.168.1.10 – 192.168.1.200 into the smallest set of CIDR blocks, use the IP range to CIDR converter.

Firewall rules, routing tables, and cloud security groups all expect CIDR input, and doing the math by hand is error-prone. Double-checking with these tools is a cheap habit that prevents both accidental lockouts and over-permissive rules caused by a wrong range.

Frequently asked questions

Does a bigger prefix mean a bigger network?
No, the opposite. A bigger prefix uses more bits for the network and fewer for hosts, so the subnet is smaller. A /26 is smaller than a /24, and a /16 is far larger than a /24.
Why subtract 2 from the host count?
The first address of each subnet (the network address) and the last (the broadcast address) are reserved for special use and cannot be assigned to ordinary devices. That is why usable hosts equal 2^(32-prefix) minus 2.
Do /31 and /32 follow the -2 rule?
A /31 is an exception defined in RFC 3021 for point-to-point links, where both addresses are used as hosts. A /32 denotes a single specific host. Both fall outside the usual -2 formula.
Should I enter a subnet mask or a CIDR prefix?
They carry the same information, so use whatever format the system accepts. Modern firewalls, cloud platforms, and routers usually prefer CIDR notation like /24, while some older devices and OS settings expect a dotted mask like 255.255.255.0.
Is the IP I enter sent anywhere?
No. The linked subnet tools compute everything in your browser and never transmit your input to a server, so you can safely paste internal IP ranges.

Tools to use with this guide