Subnetting cheat sheet Back to the chart
/8 to /32 chart128 192 224 240 248 252 254 255
Practise
Printable on one page: PDF and PNGPrintable: PDF and PNG Unlimited practice with answers CC BY 4.0

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.

Bit values: the only row to memorise
1286432168421
Mask values: add the bits left to right
128192224240248252254255
Powers of 2:21 222 423 824 1625 3226 6427 12828 256210 1,024212 4,096216 65,536
Subnetting chart, /8 to /32: subnet mask, usable hosts, block size, subnets in a /24 and wildcard mask for every prefix
CIDRSubnet maskUsable hostsBlock sizeSubnets in a /24Wildcard
/8255.0.0.016,777,21411st0.255.255.255
/9255.128.0.08,388,6061282nd0.127.255.255
/10255.192.0.04,194,302642nd0.63.255.255
/11255.224.0.02,097,150322nd0.31.255.255
/12255.240.0.01,048,574162nd0.15.255.255
/13255.248.0.0524,28682nd0.7.255.255
/14255.252.0.0262,14242nd0.3.255.255
/15255.254.0.0131,07022nd0.1.255.255
/16255.255.0.065,53412nd0.0.255.255
/17255.255.128.032,7661283rd0.0.127.255
/18255.255.192.016,382643rd0.0.63.255
/19255.255.224.08,190323rd0.0.31.255
/20255.255.240.04,094163rd0.0.15.255
/21255.255.248.02,04683rd0.0.7.255
/22255.255.252.01,02243rd0.0.3.255
/23255.255.254.051023rd0.0.1.255
/24255.255.255.025413rd10.0.0.255
/25255.255.255.1281261284th20.0.0.127
/26255.255.255.19262644th40.0.0.63
/27255.255.255.22430324th80.0.0.31
/28255.255.255.24014164th160.0.0.15
/29255.255.255.248684th320.0.0.7
/30255.255.255.252244th640.0.0.3
/31255.255.255.2542*24th1280.0.0.1
/32255.255.255.2551*14th2560.0.0.0
Highlighted: /24 to /30, the rows most exam questions use. /31 and /32 follow RFC 3021 and host-route rules.

What is on a subnetting cheat sheet?

Short answer

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?

Short answer

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.

All six stepsThe finished sheet. Press play to watch it build from two rows, or step back one row at a time.

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?

Short answer

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
Server Fault canonical answer on IPv4 subnetting · serverfault.com
NAT and subnetting solve two different problems.
Jimmy · Network Engineering Stack Exchange

How do you subnet step by step?

Short answer

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 calculator

Mask 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 calculator

Block 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 calculator

50 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.
Charles Uneze, on working from host requirements · Substack

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.
The Lineman, on learning speed tricks before the model · thelineman.ca
Day 1Binary to decimal and back. Convert ten octets each way by hand using the bit values row.Target 10/10
Day 2Masks and prefixes. Redraw the two core rows from memory three times, then name the mask for any prefix.Level 1 · 8/10
Day 3Last-octet subnets. Network, broadcast and host range for /25 to /30 using the block size.Level 1 · 9/10
Day 4The interesting octet. The same method for /17 to /23, where the last octet runs 0 to 255.Level 2 · 8/10
Day 5Work backwards. Pick the prefix for a host count, and find which subnet a host sits in.Level 3 · 8/10
Day 6IPv6 counting. How many /64s fit in a /48, /56 and /60.Level 4 · 9/10
Day 7Mixed run. Draw the sheet from memory against a 90-second clock, then twenty mixed questions.Mixed · 18/20

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.
Sebastian Wiesinger, on classful broadcast rules · Network Engineering Stack Exchange
Cidr /17 is what subnet mask?
robertritz, on a chatbot getting it wrong · Hacker News · Oct 2024

How can I practise subnetting?

Short answer

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.

Practice
Your accuracy and run show here after the first answer. Nothing is timed unless you ask.

What is the subnet mask for /24?

Type your answer, then press Check or Enter.

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.

01
What is the network address of 192.168.114.99/28?
Answer: 192.168.114.96. Networks step in 16s; 192.168.114.99 falls in the block starting at 192.168.114.96.
02
How many usable host addresses are in a /30 subnet?
Answer: 2. Usable = 4 - 2 = 2.
03
What is the broadcast address of 172.24.132.222/23?
Answer: 172.24.133.255. Networks step in 2s; 172.24.132.222 falls in the block starting at 172.24.132.0.
04
Are 10.47.178.58 and 10.47.177.186 in the same /20 subnet?
Answer: Yes. 10.47.178.58/20 is in 10.47.176.0/20 (10.47.176.1 to 10.47.191.254, broadcast 10.47.191.255). 10.47.177.186 is inside that range.
05
What is the longest prefix that still gives at least 656 usable hosts?
Answer: /22. Need 656 + 2 = 658 addresses. Smallest power of 2 at or above 658 is 1024 (2^10).
06
How many /64 subnets fit in a /32?
Answer: 4,294,967,296. 64 - 32 = 32 bits. 2^32 = 4294967296.
Exam format

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?

Short answer

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.

PrefixTypical holder/64 networks inside
/32An ISP allocation4,294,967,296
/48A site or a company65,536
/56A home or a small office256
/60Some home ISPs16
/64One LAN (SLAAC needs exactly this)1
/127A 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
Celada · Server Fault

Special IPv4 ranges to know

BlockWhat it is forRFC
10.0.0.0/8Private network1918
172.16.0.0/12Private network (172.16 to 172.31)1918
192.168.0.0/16Private network1918
100.64.0.0/10Shared space for carrier-grade NAT6598
169.254.0.0/16Link-local: no DHCP answer3927
127.0.0.0/8Loopback1122
192.0.2.0/24Documentation, TEST-NET-15737
198.51.100.0/24Documentation, TEST-NET-25737
203.0.113.0/24Documentation, TEST-NET-35737
224.0.0.0/4Multicast5771
RFC1918 addresses mean "local" network is wrong. It means "private".
profmonocle · Hacker News · Jun 2025

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.

Next on the career path: the cybersecurity certification roadmap, and where Network+ fits in it.

Sources

  1. CompTIA Network+ exam objectives, CompTIA
  2. RFC 950, Internet Standard Subnetting Procedure, IETF
  3. RFC 4632, Classless Inter-domain Routing (CIDR), IETF
  4. RFC 1918, Address Allocation for Private Internets, IETF
  5. RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links, IETF
  6. RFC 5737, IPv4 Address Blocks Reserved for Documentation, IETF
  7. RFC 6164, Using 127-Bit IPv6 Prefixes on Inter-Router Links, IETF
  8. How does IPv4 subnetting work? Server Fault
  9. Subnetting, The Lineman
  10. Thoughts about the CCNA, Charles Uneze
  11. Distributing noteboard and exam supplies, Pearson VUE test centre guide

Changelog

  • 4 Oct: practice level 4 (IPv6 /64 counting) added.
  • 4 Oct: printable sheet re-exported in light and dark.
  • First published with the draw-from-memory build and 20 exam-style questions.