CIDR Notation and Subnetting for Beginners

What 192.168.1.0/24 really means: network bits, host bits, netmasks, usable ranges, and how to split one network into smaller subnets — with worked examples.

Published 2026-10-23

You have seen addresses written like 192.168.1.0/24 in router settings, cloud consoles and firewall rules. The part after the slash is CIDR notation, and once it clicks, half of networking documentation stops looking like numerology. This guide builds it from the ground up: what the number counts, how it relates to the older netmask notation, and how subnetting — carving one network into several smaller ones — actually works. Every example can be checked with our subnet calculator as you read.

An IP address is two addresses in a trench coat

An IPv4 address is 32 bits, written as four numbers (192.168.1.10) purely for human convenience. Every network divides those 32 bits into two parts:

When two devices share a prefix, they can talk directly. When they don’t, traffic must go through a router. Everything in subnetting — masks, ranges, address counts — is arithmetic on where the boundary between those two parts sits.

CIDR: counting the network bits

CIDR (Classless Inter-Domain Routing) writes the boundary as a single number: the count of network bits. 192.168.1.0/24 means “the first 24 bits are the network; the last 8 bits are hosts”. The same fact can be written as a netmask — 24 one-bits followed by 8 zero-bits, i.e. 255.255.255.0. The two notations are interchangeable; CIDR is simply shorter.

A few prefixes worth recognising on sight:

CIDRNetmaskTotal addressesUsable hostsTypical use
/8255.0.0.016,777,21616,777,214The whole 10.x.x.x private block
/16255.255.0.065,53665,534A large office or campus network
/24255.255.255.0256254A home or small-office LAN
/26255.255.255.1926462One department carved out of a /24
/30255.255.255.25242A point-to-point link between routers
/32255.255.255.25511A route to exactly one host

Two formulas generate the whole table: total addresses = 2^(32 − prefix), and usable hosts = total − 2 for classic subnets. The missing two are the network address (host bits all zero — it names the network itself) and the broadcast address (host bits all one — it reaches every device at once). The exceptions are /31, where RFC 3021 lets both addresses be used on point-to-point links, and /32, a single host.

A worked example: 192.168.1.0/24

Take the network most home routers create:

Any address from 192.168.1.0 to 192.168.1.255 belongs to this subnet, whatever the last number is on your device — the /24 boundary says only the first three numbers decide “same network”.

Subnetting: splitting one network into several

Move the boundary right and one network becomes several smaller ones. Carve 192.168.1.0/24 into /26s (two more network bits) and you get four subnets of 62 usable hosts:

SubnetNetworkUsable rangeBroadcast
1192.168.1.0/26.1 – .62.63
2192.168.1.64/26.65 – .126.127
3192.168.1.128/26.129 – .190.191
4192.168.1.192/26.193 – .254.255

Each step right doubles the subnet count and halves the size — that trade-off is the entire game. Organisations subnet to isolate departments, contain broadcast traffic and match address space to need. The cost of guessing wrong is asymmetric: too large wastes addresses you can’t reclaim without renumbering everything; too small runs out mid-project. Running the real numbers (the calculator shows the binary view, which makes the boundary visible) beats memorising the table.

Three beginner traps

  1. “My address is 192.168.1.10/24, so my network is 192.168.1.10.” No — your device is .10; the network it sits on is .0/24. The address after the slash convention is always written with host bits zeroed when naming a network.
  2. Counting 256 hosts in a /24. It’s 254 usable; the network and broadcast addresses are spoken for (except /31 and /32, above).
  3. Assuming masks must end in .0. A netmask is any run of 1s followed by 0s: 255.255.255.192 (/26) and 255.240.0.0 (/12 — the second private range, 172.16.0.0/12) are both ordinary. What a mask cannot be is non-contiguous, like 255.0.255.0 — no prefix length describes it.

If you are working with addresses rather than designing networks, the companion piece is our guide to public vs private IP addresses — the /8, /12 and /16 private blocks in the table above are exactly the ranges it explains.

Related tools

Related guides