Subnetting Cheat Sheet (Printable, /8 to /32)
The full chart first. Then how to redraw it from memory in 90 seconds, and unlimited practice until it is automatic.
| CIDR | Subnet mask | Usable hosts | Block size | Subnets in a /24 | Wildcard |
|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | 11st | 0.255.255.255 | |
| /9 | 255.128.0.0 | 8,388,606 | 1282nd | 0.127.255.255 | |
| /10 | 255.192.0.0 | 4,194,302 | 642nd | 0.63.255.255 | |
| /11 | 255.224.0.0 | 2,097,150 | 322nd | 0.31.255.255 | |
| /12 | 255.240.0.0 | 1,048,574 | 162nd | 0.15.255.255 | |
| /13 | 255.248.0.0 | 524,286 | 82nd | 0.7.255.255 | |
| /14 | 255.252.0.0 | 262,142 | 42nd | 0.3.255.255 | |
| /15 | 255.254.0.0 | 131,070 | 22nd | 0.1.255.255 | |
| /16 | 255.255.0.0 | 65,534 | 12nd | 0.0.255.255 | |
| /17 | 255.255.128.0 | 32,766 | 1283rd | 0.0.127.255 | |
| /18 | 255.255.192.0 | 16,382 | 643rd | 0.0.63.255 | |
| /19 | 255.255.224.0 | 8,190 | 323rd | 0.0.31.255 | |
| /20 | 255.255.240.0 | 4,094 | 163rd | 0.0.15.255 | |
| /21 | 255.255.248.0 | 2,046 | 83rd | 0.0.7.255 | |
| /22 | 255.255.252.0 | 1,022 | 43rd | 0.0.3.255 | |
| /23 | 255.255.254.0 | 510 | 23rd | 0.0.1.255 | |
| /24 | 255.255.255.0 | 254 | 13rd | 1 | 0.0.0.255 |
| /25 | 255.255.255.128 | 126 | 1284th | 2 | 0.0.0.127 |
| /26 | 255.255.255.192 | 62 | 644th | 4 | 0.0.0.63 |
| /27 | 255.255.255.224 | 30 | 324th | 8 | 0.0.0.31 |
| /28 | 255.255.255.240 | 14 | 164th | 16 | 0.0.0.15 |
| /29 | 255.255.255.248 | 6 | 84th | 32 | 0.0.0.7 |
| /30 | 255.255.255.252 | 2 | 44th | 64 | 0.0.0.3 |
| /31 | 255.255.255.254 | 2* | 24th | 128 | 0.0.0.1 |
| /32 | 255.255.255.255 | 1* | 14th | 256 | 0.0.0.0 |
What is on a subnetting cheat sheet?
A subnetting cheat sheet lists each prefix from /8 to /32 with its subnet mask, wildcard mask, block size and usable hosts. The core rows to memorise are the bit values 128, 64, 32, 16, 8, 4, 2, 1 and the mask values 128, 192, 224, 240, 248, 252, 254, 255.
Everything else in the chart comes from those two rows. The block size of a prefix is the bit value at its position, the mask octet is the running total, and the usable hosts are the block size minus two. Learn the two rows and you can rebuild the other 25 lines on a blank page.
How do you draw it from memory in 90 seconds?
Write the bit values 128 to 1, add them left to right to get the mask values, then write the prefixes /25 to /32 above them. The bit value above each prefix is its block size, and the block size minus two is its host count. The same eight columns repeat for the third and second octets.
Pearson VUE test centres hand out an erasable noteboard, and many candidates spend the first minute redrawing this grid on it. Step through the build below, or press play.
Seven rows, eight columns. The asterisks mark /31 (two hosts on a point-to-point link) and /32 (a single address).
What is subnetting, in plain words?
Subnetting splits one IP network into smaller networks by moving the boundary between the network part and the host part of the address. The subnet mask marks that boundary. Smaller subnets limit broadcast traffic, separate security zones and let routers send traffic to the right place.
Think of an address as a street and a house number. The network bits are the street; the host bits are the house numbers on it. A /24 is a street with 254 houses. Subnetting builds side streets: a /26 is four streets of 62 houses each, and the router at the junction only needs to know which street a packet is heading for, not every house.
Subnetting is not NAT. NAT lets many private addresses share one public address; subnetting carves up the address space you already have. You will use both, for different reasons.
IP routers use your IP subnets to make routing decisions
NAT and subnetting solve two different problems.
How do you subnet step by step?
Find the prefix, for example /26. Work out the block size: 256 minus the mask octet (192) is 64. List the networks in steps of 64: .0, .64, .128, .192. The host's network is the step at or below it, broadcast is one less than the next step, and hosts sit in between.
For prefixes from /17 to /23 the same method runs one octet to the left: that octet is the "interesting octet", and the last octet runs the full 0 to 255 inside each block. For requirement questions, work backwards from the hosts or subnets you need.
Last octet: 192.0.2.77/26
Check it in the calculatorMask value 192, block size 64, networks .0, .64, .128, .192. 77 sits in the .64 block: network 192.0.2.64, broadcast 192.0.2.127, hosts .65 to .126.
On a boundary: 198.51.100.200/29
Check it in the calculatorBlock size 8. 200 is itself a multiple of 8, so it is the network address: 198.51.100.200, broadcast .207, hosts .201 to .206.
Interesting octet: 172.16.45.130/20
Check it in the calculator/20 puts the boundary in the 3rd octet, mask value 240, block size 16. 45 sits in the block starting at 32: network 172.16.32.0, broadcast 172.16.47.255, 4,094 hosts.
From a requirement: 50 hosts
Check it in the calculator50 hosts plus network and broadcast is 52 addresses. The next power of two is 64, which is 6 host bits, so the prefix is /26 with 62 usable hosts.
At first, this one was difficult for me. Now it makes sense.
Learn it in the right order
Binary first, block size second. The block-size trick is a speed layer on top of the binary picture; learned alone, it falls apart the first time a question lands in the third octet. Fifteen minutes a day for a week is enough for most people. Each day ends with a short practice run at the matching level.
I spent three weeks genuinely confused about subnetting.
What are the common subnetting mistakes?
Each of these costs marks on exams and outages in production. Most come from rules that were true in old textbooks.
Treating every .255 as a broadcast
Only the last address of a subnet is its broadcast. In 10.0.0.0/16, 10.0.0.255 is an ordinary host.
Assuming classful boundaries
Old books imply a /8, /16 or /24 from the first octet. Since CIDR, the prefix decides. Always read the mask.
Forgetting the minus 2
A /27 has 32 addresses but 30 hosts. The exceptions are /31 point-to-point links and /32 host routes.
Counting from 1 instead of 0
Subnets start at 0: .0, .32, .64. Starting at .1 shifts every answer by one block.
Thinking private means local
RFC 1918 space is not routed on the internet, but it spans VPNs, data centres and clouds. Two sites can collide.
Trusting a chatbot for the mask
Chatbots have answered /17 wrong in public threads. The answer is 255.255.128.0; a deterministic check costs ten seconds.
Confusing subnetting with NAT
NAT shares a public address. Subnetting divides your own range. Different problems, different tools.
Classical example of outdated literature.
Cidr /17 is what subnet mask?
How can I practise subnetting?
Answer generated questions until the method is automatic: start with last-octet masks, move to the second and third octets, then planning and IPv6. Check every wrong answer against the binary working rather than just the result. Ten minutes a day beats one long session before the exam.
What is the subnet mask for /24?
- 24 network bits = 3 full octets of 255 plus 0 bits in the next octet.
- Mask = 255.255.255.0.
Questions are generated and checked by the same engine as the subnet calculator. Missed question types come back sooner. Progress stays in this browser; there is no account.
Exam-style questions with worked answers
20 fixed questions in the style Network+ and CCNA use, with the answer and the one-line working under each.
Ready for full exam questions?
Subnetting is one objective among many. When the generator feels easy, move on to these Network+ practice questions, which mix subnetting with ports, protocols and troubleshooting.
Is subnetting still used with IPv6?
Yes, but you count networks instead of hosts. Every LAN gets a /64, because SLAAC needs 64 host bits, so the question becomes how many /64s your prefix holds. A /48 holds 65,536 of them, a /56 holds 256 and a /60 holds 16.
| Prefix | Typical holder | /64 networks inside |
|---|---|---|
| /32 | An ISP allocation | 4,294,967,296 |
| /48 | A site or a company | 65,536 |
| /56 | A home or a small office | 256 |
| /60 | Some home ISPs | 16 |
| /64 | One LAN (SLAAC needs exactly this) | 1 |
| /127 | A point-to-point link (RFC 6164) | part of one |
The shortcut: subtract the prefix from 64 and raise 2 to that power. A /52 holds 212 = 4,096 LANs.
In IPv6 you usually think about how many /64 - subnets you have available
Special IPv4 ranges to know
| Block | What it is for | RFC |
|---|---|---|
| 10.0.0.0/8 | Private network | 1918 |
| 172.16.0.0/12 | Private network (172.16 to 172.31) | 1918 |
| 192.168.0.0/16 | Private network | 1918 |
| 100.64.0.0/10 | Shared space for carrier-grade NAT | 6598 |
| 169.254.0.0/16 | Link-local: no DHCP answer | 3927 |
| 127.0.0.0/8 | Loopback | 1122 |
| 192.0.2.0/24 | Documentation, TEST-NET-1 | 5737 |
| 198.51.100.0/24 | Documentation, TEST-NET-2 | 5737 |
| 203.0.113.0/24 | Documentation, TEST-NET-3 | 5737 |
| 224.0.0.0/4 | Multicast | 5771 |
RFC1918 addresses mean "local" network is wrong. It means "private".
Questions people ask
Why is subnetting so difficult?
Because most people learn the shortcuts before the picture. Once you see an address as 32 bits with a movable line in it, every rule on the sheet follows from that line. Start with binary, then add the block-size trick for speed.
How do I remember subnetting?
Memorise two rows only: the bit values 128 to 1 and the mask values 128 to 255. Everything else is derived. Redraw them from memory once a day for a week.
How can I practise subnetting?
Use the generator above, one level at a time, and read the working on every miss. Ten minutes a day for a week covers most exam needs.
What does 192.168.100.0/24 mean?
A network whose first 24 bits are fixed: addresses 192.168.100.0 to 192.168.100.255, mask 255.255.255.0, with 254 usable hosts from .1 to .254.
What are the 5 classes of IP addresses?
A (1 to 126), B (128 to 191), C (192 to 223), D (multicast, 224 to 239) and E (reserved, 240 to 255). Classes stopped deciding network sizes in 1993, when CIDR replaced them; today the prefix decides.
Do I need subnetting for Security+?
Lightly. Security+ expects you to read CIDR notation and recognise private ranges in firewall rules and logs. Network+ and CCNA test full subnetting.
Is subnetting still used with IPv6?
Yes. You plan /64s per LAN from a larger prefix such as a /48 or /56. The arithmetic is counting networks, not hosts.
Subnet calculator
Paste any address and prefix to see network, broadcast and host range, with the same binary working as the practice answers.