Subnetting Cheat Sheet: CIDR, Masks, Wildcards in One Page

The full subnetting reference in a single table: every CIDR prefix from /16 to /30 with its subnet mask, usable host count, wildcard mask and binary view. Below the table are worked examples showing how to use each row — placing addresses, sizing subnets, writing ACLs and summarising routes. Free, no sign-up, and it prints cleanly on one page.

The one-page reference

Tip: memorise the /24–/30 rows cold — they answer most exam questions. Everything above /24 is just the same pattern one octet up.

CIDRSubnet maskWildcard maskUsable hostsBlock sizeMask (binary)
/16255.255.0.00.0.255.25565,534256 (3rd octet)11111111.11111111.00000000.00000000
/17255.255.128.00.0.127.25532,766128 (3rd octet)11111111.11111111.10000000.00000000
/18255.255.192.00.0.63.25516,38264 (3rd octet)11111111.11111111.11000000.00000000
/19255.255.224.00.0.31.2558,19032 (3rd octet)11111111.11111111.11100000.00000000
/20255.255.240.00.0.15.2554,09416 (3rd octet)11111111.11111111.11110000.00000000
/21255.255.248.00.0.7.2552,0468 (3rd octet)11111111.11111111.11111000.00000000
/22255.255.252.00.0.3.2551,0224 (3rd octet)11111111.11111111.11111100.00000000
/23255.255.254.00.0.1.2555102 (3rd octet)11111111.11111111.11111110.00000000
/24255.255.255.00.0.0.25525425611111111.11111111.11111111.00000000
/25255.255.255.1280.0.0.12712612811111111.11111111.11111111.10000000
/26255.255.255.1920.0.0.63626411111111.11111111.11111111.11000000
/27255.255.255.2240.0.0.31303211111111.11111111.11111111.11100000
/28255.255.255.2400.0.0.15141611111111.11111111.11111111.11110000
/29255.255.255.2480.0.0.76811111111.11111111.11111111.11111000
/30255.255.255.2520.0.0.32411111111.11111111.11111111.11111100

Usable hosts = 2(32 − prefix) − 2. The minus 2 removes the reserved network and broadcast addresses. Bold bits in the binary column are the network (1) portion; plain bits are the host (0) portion.

How to read each row

Every row in the table is built from one number — the CIDR prefix. Once you can move between the prefix and any column, subnetting stops being a chore and becomes a lookup.

For an interactive version of this table with a printable layout, see the CIDR cheat sheet tool.

Worked examples: using the table like an exam tool

Each example below names the exact table row it uses. Cover the answer, do the lookup yourself, then check.

1. 192.168.10.77/26 — find the subnet, broadcast and usable range.

Table row /26: block size 64, so subnets step 0, 64, 128, 192 in the last octet. 77 sits between 64 and 128 → subnet 192.168.10.64/26. Broadcast = 64 + 64 − 1 = 192.168.10.127. Usable range .65–.126 — and the row confirms 62 usable hosts.

2. Write an ACL line permitting the 192.168.30.0/27 subnet.

Table row /27: the wildcard column reads 0.0.0.31. So: access-list 10 permit 192.168.30.0 0.0.0.31. Any time you see a wildcard in an exam ACL question, read the subnet mask off the row, then read the wildcard from the same row.

3. A branch office needs 40 hosts. What's the smallest subnet you can give it?

Scan the Usable hosts column from the bottom up, picking the first row whose count reaches 40: /30 gives 2, /29 gives 6, /28 gives 14, /27 gives 30 — all too small. The first row that fits is /26 with 62 usable hosts (mask 255.255.255.192). Always pick the first row whose usable count reaches your requirement — nothing bigger.

4. 172.16.9.200/20 — what's the network address?

Table row /20: block size 16 in the third octet. Third-octet subnets step 0, 16, 32… 9 falls in the 0 block → network 172.16.0.0/20, broadcast 172.16.15.255. Note the trap: the block size applies to the interesting octet, not the last one.

5. Summarise 10.4.0.0/24, 10.4.1.0/24, 10.4.2.0/24 and 10.4.3.0/24 as one route.

Four contiguous /24s aligned on a multiple of 4. Each doubling of subnets shortens the prefix by one bit: two subnets = /23, four = /22. Table row /22 confirms the mask 255.255.252.0 — covering 10.4.0.0–10.4.3.255 with nothing extra and nothing missing.

6. Configure OSPF on the 192.168.1.0/30 point-to-point link.

Table row /30: wildcard 0.0.0.3 → network 192.168.1.0 0.0.0.3 area 0. The row also confirms why /30 is the standard point-to-point mask: 2 usable hosts, exactly one per router.

Binary bit values (the other half of the table)

If a question gives you a mask you don't recognise, build it from bit values. Each octet's bits are worth 128, 64, 32, 16, 8, 4, 2, 1 left to right:

Interesting octetBinaryMathsCIDR row
12810000000128/25
19211000000128 + 64/26
22411100000128 + 64 + 32/27
24011110000128 + 64 + 32 + 16/28
24811111000128 + 64 + 32 + 16 + 8/29
25211111100128 + 64 + 32 + 16 + 8 + 4/30

Building binary fluency is the real exam skill behind this table — our binary–decimal converter is the fastest way to drill it, and the subnetting drill tests you against the clock.

Exam tips: making the table stick

For the full subnetting topic with key exam points, see our CCNA subnetting cheat sheet and the subnetting practice questions. To check any calculation instantly, use the subnet calculator — it also shows the binary view, exactly like this table.

Know the table? Prove it.

Subnetting is one topic of six on the CCNA 200-301. Take the free 25-question mock test — no sign-up — and see how fast your subnetting really is. One subscription (£5/month or £39/year) unlocks all 370 exam-style questions, 20 in-browser labs and 300 flashcards across all 10 certifications.

Start the free mock test →