# Subnet

> A block of IP addresses that belong together. It is written like 192.168.1.0/24.

**Field:** Infrastructure  
**Category:** Networking  
**Also known as:** Subnetwork, CIDR Block, CIDR Notation, Subnet Mask

## Think of it like

It is like one street in a town. All the houses on it share the first part of their address.

## Definition

A subnet is a block of IP addresses that belong together. It is written as a start address and a slash number, like 192.168.1.0/24. The slash number says how many bits at the front are fixed. A /24 leaves the last number free, which gives 256 addresses. Big networks are split into subnets to keep groups of machines apart.

## Example

A cloud network uses 10.0.1.0/24 for web servers and 10.0.2.0/24 for databases. Firewall rules can then treat the two groups in different ways.

## Why it matters

Subnets decide which machines can reach each other. Cloud networks and firewall rules use them.

## Common mistake

Thinking a /24 holds 256 devices. The first and last addresses are kept for the network itself, so 254 devices fit.

## Three principles

- **One block.** Addresses that share a start.
- **Slash number.** Bigger number, smaller block.
- **Draws lines.** Keeps groups of machines apart.

## Related terms

- [Internet Protocol Address (IP Address)](https://learn.benibix.com/term/infrastructure/ip-address)
- [Private IP Address](https://learn.benibix.com/term/infrastructure/private-ip-address)
- [Router](https://learn.benibix.com/term/infrastructure/router)
- [Firewall](https://learn.benibix.com/term/infrastructure/firewall)

## Taught in

- [IP Addresses and Subnets](https://learn.benibix.com/learn/infrastructure-networking/ip-addresses-and-subnets): Computer Networking, 3/13

![Inside a home network marked 192.168.1.0/24, three devices hold private addresses that the router handed out. One laptop has a small loop marked 127.0.0.1 that turns back on itself. At the router, the private addresses are swapped for one public address, 203.0.113.7, which is the only address the internet sees.](https://learn.benibix.com/diagrams/inf2-addresses.svg)

---

Source: https://learn.benibix.com/term/infrastructure/subnet
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
