Before you subnet — understand CIDR notation
Every IP address you see in subnetting problems comes with a prefix length written as a slash followed by a number — for example 192.168.1.0/24. This is called CIDR notation (Classless Inter-Domain Routing), and the number after the slash tells you how many bits are used for the network portion of the address.
An IPv4 address has 32 bits total. If 24 bits are the network, the remaining 8 bits are available for hosts. The larger the prefix number, the smaller the network.
192.168.1.0/24
↑
24 bits = network portion
32 - 24 = 8 bits left for hosts
2⁸ = 256 addresses, 254 usable hosts
/24 and 255.255.255.0 mean exactly the same thing. CIDR counts the network bits. Subnet masks write those bits out as four octets. The exam uses both — make sure you can convert between them.
A /24 = 255.255.255.0 · A /16 = 255.255.0.0 · A /8 = 255.0.0.0
The binary foundation — why the math works
Subnetting math is based on binary. Each octet of an IP address is 8 bits, and each bit has a value: 128, 64, 32, 16, 8, 4, 2, 1. You don't need to memorize binary to subnet, but understanding where the numbers come from makes the patterns stick.
A subnet mask works by setting network bits to 1 and host bits to 0. Here's what 255.255.255.0 looks like in binary:
Teal bits = network (fixed). Grey bits = host (variable — these are where your device addresses live).
The CIDR reference table — memorise /24 to /30
For A+ you need a solid understanding of /24. For Network+ you need to be comfortable across the full range, especially /25 through /30. This table is your foundation:
| CIDR | Subnet Mask | Hosts per Subnet | Block Size | Common Use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | 16,777,216 | Large ISP / Class A |
| /16 | 255.255.0.0 | 65,534 | 65,536 | Large org / Class B |
| /24 Most Common | 255.255.255.0 | 254 | 256 | Home / small office LAN |
| /25 | 255.255.255.128 | 126 | 128 | Medium subnet |
| /26 | 255.255.255.192 | 62 | 64 | Smaller subnet |
| /27 | 255.255.255.224 | 30 | 32 | Small workgroup |
| /28 | 255.255.255.240 | 14 | 16 | Small office segment |
| /29 | 255.255.255.248 | 6 | 8 | Small segment / WAN link |
| /30 | 255.255.255.252 | 2 | 4 | Point-to-point links |
| /31 | 255.255.255.254 | 2* | 2 | Router-to-router (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 | Single host / loopback route |
Usable hosts = 2ⁿ − 2, where n = host bits. Two addresses are always reserved: the network address (all host bits 0) and the broadcast address (all host bits 1).
How to calculate a subnet — the method
Given any IP address and prefix length, you need to be able to find four things: the network address, the first usable host, the last usable host, and the broadcast address. Here's the reliable method that works on every problem:
Worked example 1 — /24 (A+ level)
Worked example 2 — /26 (Network+ level)
Worked example 3 — /27 (Network+ level)
The two formulas you must know
Usable hosts per subnet = 2ⁿ − 2 where n = number of host bits (32 − prefix length) Number of subnets = 2ˢ where s = number of subnet bits borrowed from the host portion Block size = 256 − last non-255 subnet mask octet also equals: 2ⁿ where n = host bits in the interesting octet
Two addresses in every subnet are reserved and can't be assigned to devices. The network address (all host bits set to 0) identifies the subnet itself. The broadcast address (all host bits set to 1) sends traffic to every device on the subnet simultaneously. Everything in between is usable.
Example: /24 gives 256 addresses. Minus 2 = 254 usable hosts. This is why 255 is never a host address and .0 is never a host address on a /24 network.
Private IP ranges — what they are and why they matter
Most subnetting you encounter in the real world uses private IP address ranges — addresses that are not routed on the public internet. You'll see these constantly in both exam questions and actual networks:
10.0.0.0/8 → 10.0.0.0 – 10.255.255.255 (Class A, 16M+ addresses) 172.16.0.0/12 → 172.16.0.0 – 172.31.255.255 (Class B, 1M+ addresses) 192.168.0.0/16 → 192.168.0.0 – 192.168.255.255 (Class C, 65K addresses)
Exam scenarios
Key things to memorise for exam day
/24 → 255.255.255.0 → 254 hosts block: 256 /25 → 255.255.255.128 → 126 hosts block: 128 /26 → 255.255.255.192 → 62 hosts block: 64 /27 → 255.255.255.224 → 30 hosts block: 32 /28 → 255.255.255.240 → 14 hosts block: 16 /29 → 255.255.255.248 → 6 hosts block: 8 /30 → 255.255.255.252 → 2 hosts block: 4
Ready to sit the exam?
Pair these guides with a study book and practice exams for the highest chance of passing first try.