Subnetting means dividing one IP network into smaller networks. It is one of the first skills every networking student learns, and it is also a practical skill: every office network that uses VLANs needs an address plan.
Network part and host part
An IPv4 address has 32 bits. The prefix length, written after a slash, says how many of those bits identify the network. The remaining bits identify the device. In 192.168.10.0/24, the first 24 bits are the network, so 8 bits are left for hosts.
How many addresses fit?
With h host bits there are 2h addresses. Two of them are reserved in an ordinary subnet: the first is the network address and the last is the broadcast address. So a /24 has 256 addresses and 254 usable hosts, and a /26 has 64 addresses and 62 usable hosts.
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /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 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
A worked example
Suppose a small office has 192.168.10.0/24 and needs three separate networks: staff (about 50 devices), guests (about 25) and cameras (about 12).
- Staff needs at least 50 usable addresses, so use a /26 (62 usable): 192.168.10.0/26, covering .0 to .63.
- Guests need at least 25, so use a /27 (30 usable): 192.168.10.64/27, covering .64 to .95.
- Cameras need at least 12, so use a /28 (14 usable): 192.168.10.96/28, covering .96 to .111.
Each block starts where the previous one ended, and its size is a power of two. Plenty of space is left over (from .112 upwards) for growth.
Private address ranges
Offices normally use the private ranges set aside for internal networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. These addresses are not routed on the public internet, so many organisations can reuse them.
Check your work
Try the same example in our subnet calculator. For Cisco certification study, the official CCNA page lists the topics that include IP addressing and subnetting.
References
- RFC 4632: Classless Inter-domain Routing (CIDR) (IETF)
- RFC 1918: Address Allocation for Private Internets (IETF)
- CCNA certification (Cisco)
General information, checked against the sources above (vendor documents, standards bodies and official guidance). Not professional advice. ARNSEC is independent; product names belong to their owners.
Last updated: . Articles are checked against trusted sources (vendor documentation, standards bodies and government guidance). General information only, not professional advice.