What is subnetting? A plain explanation
Subnetting means dividing one big network into smaller ones. The mask says where one part of the address ends and the other begins.
An address has two parts
Every IPv4 address is 32 bits, written as four numbers. Part of it identifies the network and the rest identifies the host (the device) on that network, like a street name and a house number. The subnet mask (or the prefix length) tells you where the dividing line is. In 192.168.1.130/26 the first 26 bits are the network and the last 6 bits are the host.
Why divide a network
- Smaller broadcast groups. Some messages go to every device on the network. In a huge network that is a lot of noise.
- Security. Departments, guests, cameras and servers can be separated, with rules about who may talk to whom.
- Organisation. One block per building, floor or purpose makes addresses easier to understand.
- Efficient use of addresses. You give each part only as many addresses as it needs.
What the mask does
Take 192.168.1.130 and mask 255.255.255.192 (/26). Writing both in binary and keeping only the bits where the mask has a 1 gives the network address, 192.168.1.128. The bits where the mask has 0 are the host part: here 6 bits, so the subnet holds 2^6 = 64 addresses. The first (192.168.1.128) is the network address and the last (192.168.1.191) is the broadcast address, leaving 62 for devices.
Try it: put 192.168.1.130/26 into the IPv4 calculator and compare.
Devices in different subnets cannot talk directly
A device checks whether another address is inside its own subnet. If it is, it sends the data directly. If not, it sends it to the default gateway, a router. That is why two computers with addresses 192.168.1.10/24 and 192.168.2.10/24 need a router between them even if they are plugged into the same switch.
Subnetting and CIDR
Before the 1990s, networks came in fixed classes (A, B, C), and subnetting divided them. CIDR (RFC 4632) replaced classes with a prefix length that can be any number from 0 to 32, which is the notation used today. See the page on CIDR.
The vocabulary
| Word | Meaning |
|---|---|
| Network address | First address of the subnet |
| Broadcast address | Last address; reaches all devices |
| Host | A device with an address |
| Prefix length | Number of network bits (/26) |
| Subnet mask | The same as four numbers (255.255.255.192) |
| Default gateway | The router that leads out of the subnet |
Do I need subnetting at home?
Usually not: a home router gives out 192.168.x.x addresses in one /24. You meet subnetting in offices, in cloud networks and in exams.
What is a VLAN?
A way to create separate networks on the same switches. Each VLAN is normally one subnet.
This is an independent guide. It is not connected with IANA, the IETF or any network equipment maker. Address and port data come from the IANA registries as fetched on 14 November 2026; RFC texts were read from rfc-editor.org. Check the originals for anything you rely on.