What is a subnet and what does a mask like 255.255.255.0 mean?
Published on 2026-10-20 by frfrand
Subnets and CIDR masks explained from scratch: what /24 means, how networks are separated, and how to avoid errors when configuring servers.

Short answer: A subnet is a part of a computer network that uses a defined range of IP addresses. The subnet mask is used to distinguish which part of an address identifies the network and which part can vary between devices.
The definition seems very technical until you see 192.168.1.0/24 or 255.255.255.0 in a server's configuration. Then the inevitable question arises: what do those numbers mean and why do they matter?
The neighborhood example
Imagine an enormous city divided into neighborhoods. A street and a number serve to find a building, but it also matters knowing which neighborhood it belongs to.
A network can be organized into subnets for similar reasons: to distinguish groups, apply different rules, and make it easier for routers to know where to send data.
It does not mean that each subnet necessarily requires a different physical building or router. Today many networks are virtual.
The IP address does not tell the whole story
Let's take the example 192.168.1.25. By itself it is an IPv4 address, but it is not enough to determine which is the local network: the prefix or mask is missing.
If that device is configured in 192.168.1.0/24, the number /24 indicates that the first 24 bits of the address identify the network part.
As IPv4 uses 32-bit addresses, 8 bits remain to vary within that subnet: in total there are 256 possible addresses.
In a traditional IPv4 subnet like this, 192.168.1.0 usually represents the network address and 192.168.1.255 the broadcast address. That leaves 254 addresses normally usable for devices; some platforms reserve more for their own services.
Where does 255.255.255.0 come from?
The mask 255.255.255.0 represents the same limit as /24 in IPv4. The initial 255s correspond to groups of eight network bits, and the last 0 leaves a group of eight bits for devices.
You don't need to learn to convert binary mentally to get started. What matters is recognizing that /24 is not a port, not a password, and not the maximum number of devices allowed by any router.
It is an abbreviated way of indicating how much the network portion occupies within the address.
What happens if I change from /24 to /26?
A subnet with prefix /26 uses 26 bits for the network, leaving 6 bits for addresses within each block: 64 addresses per subnet, normally 62 usable in the typical IPv4 model.
For example, the block 192.168.1.0/24 can be divided into four /26 blocks:
192.168.1.0/26192.168.1.64/26192.168.1.128/26192.168.1.192/26
Notice that the starting addresses increase by 64 each time. It's not a coincidence: the block size changed.
If you mix an IP from one block with the mask from another, a device may try to reach another as if they were on the same network when, in reality, it needs to go through a router.
Do two devices on the same subnet communicate without a router?
In a typical local network, two devices on the same segment can communicate directly at the local network level, provided there is connectivity and policies allow it.
But sharing an IP subnet does not automatically guarantee communication: VLANs, wireless isolation, firewalls, and device configuration also play a role.
When the destination is outside the local subnet, the device usually sends traffic to a gateway, which routes it to another network.
Are subnet, VLAN, and private network the same?
No. A subnet belongs to IP address organization and routing. A VLAN allows separating network segments at the link layer on compatible equipment. A private network may refer to the use of non-public IP ranges or a limited connectivity design.
In companies and data centers, subnets and VLANs are often used together, but they are not synonyms.
An example on a server
Imagine you have several services: a public proxy, a database, and internal tasks. You can organize them so that the proxy communicates with the necessary services and the database does not have to receive connections from the Internet.
The subnet helps define ranges and routes, but does not replace the firewall. Being within a private network also does not mean that all its users should have access to all applications.
Mistakes worth avoiding
Thinking that /24 means 24 devices. It means 24 prefix bits, not 24 available addresses.
Copying any mask from a tutorial. The mask must match your actual network plan and the routes of the devices.
Changing the server IP without checking the gateway. You could lose remote access if the new configuration stops reaching the router.
Assuming that a private IP implies security. It is just an addressing characteristic: permissions are configured separately.
Where does it appear in ArduMaker?
In ArduMaker you do not configure the subnet of each VPS: the internal network is managed by the host, and two VPS having similar private addresses does not mean they can communicate with each other. To connect two VPS without exposing anything to the Internet, an SSH tunnel between VPS is used, and to open a database or a redirection to another server, a list of allowed IPs or CIDR ranges is indicated, such as 203.0.113.7/32 (a single address).
Where you do choose ranges is within your VPS, for example when creating a Docker network with its own subnet: there, understanding a prefix like /24 is useful to avoid overlapping addresses and diagnose connectivity failures.
To expand on the topic, you can read how an IP address works and what a firewall is.
In one sentence: the mask defines which part of the IP corresponds to the network and which part remains available within it. That small difference explains much of how home networks, companies, and servers are organized.
Frequently Asked Questions
How many addresses does each prefix have?
| Prefix | Mask | Addresses | Usual usable (IPv4) |
|---|---|---|---|
/24 | 255.255.255.0 | 256 | 254 |
/25 | 255.255.255.128 | 128 | 126 |
/26 | 255.255.255.192 | 64 | 62 |
/27 | 255.255.255.224 | 32 | 30 |
/32 | 255.255.255.255 | 1 | 1 (a single address) |
Each bit you add to the prefix divides the block in half.
What does /32 mean in a list of allowed IPs?
That the rule applies to a single address. It is the strictest way to open a service: for example, allowing only your office's fixed IP to reach a database.
Sources: RFC 4632: CIDR addressing · What is a subnet, Cloudflare.

Masks and subnets in a server environment
A mask 255.255.255.0 is equivalent to /24 in IPv4. In a network like 192.168.10.0/24, the usual host addresses range from 192.168.10.1 to 192.168.10.254; the network address and the broadcast address have special uses. This does not mean that any private network from a provider necessarily uses /24: the actual mask depends on its configuration.
If you manage several VPS, understanding the prefix helps distinguish internal connectivity from public exposure. A database on a server should not be accessible from the Internet just because both servers have IP addresses. In ArduMaker, a database installed as an app remains accessible only from within its VPS until you enable external access with an IP list or CIDR ranges: it is best to allow exactly the source that needs it (a /32, if it is a single address) and test the connection from there.
Related: What is NAT · Firewall on servers.