Start free
Menu
Study guide

Subnetting Cheat Sheet: CCNA Chart, Table and Practice

Subnetting cheat sheet for the CCNA: a /16 to /30 chart and table, the block-size method, VLSM, wildcard masks and 10 practice questions with answers.

256 − mask octet Block size
2^h − 2 Usable hosts
1.6 (v1.1) Cisco objective
None (reported) Calculator

Subnetting cheat sheet: the /24 to /30 chart

A subnetting cheat sheet lists the subnet mask, block size, wildcard mask and usable hosts for each prefix length. The chart below covers /24 to /30, the prefixes the CCNA 200-301 uses most. Block size is 256 minus the mask octet. Usable hosts are 2^h − 2, where h is the number of host bits.

Try every question type free (no sign-up)

"Block" is the block size (total addresses), "Hosts" is usable hosts, and "Per /24" is how many fit in a /24. The block size and wildcard work in the fourth octet.

Prefix Mask Block Wildcard Hosts Per /24
/24 255.255.255.0 256 0.0.0.255 254 1
/25 255.255.255.128 128 0.0.0.127 126 2
/26 255.255.255.192 64 0.0.0.63 62 4
/27 255.255.255.224 32 0.0.0.31 30 8
/28 255.255.255.240 16 0.0.0.15 14 16
/29 255.255.255.248 8 0.0.0.7 6 32
/30 255.255.255.252 4 0.0.0.3 2 64

A quick check: the block size × the number of subnets in a /24 always equals 256. Cisco also publishes its own IPv4 subnetting reference chart on the Learning Network.

Subnetting /24, /27, /28 and /29 at a glance

  • /24 (255.255.255.0): 256 addresses and 254 usable hosts. The default LAN size.
  • /27 (255.255.255.224): a block of 32 and 30 usable hosts. Eight fit in a /24.
  • /28 (255.255.255.240): a block of 16 and 14 usable hosts. Sixteen fit in a /24.
  • /29 (255.255.255.248): a block of 8 and 6 usable hosts. Thirty-two fit in a /24.

Subnetting table: /16 to /23

The same mask values and block sizes repeat one octet to the left. Here the block size and wildcard work in the third octet, and "Per /16" is how many fit in a /16.

Prefix Mask Block Wildcard Hosts Per /16
/16 255.255.0.0 256 0.0.255.255 65,534 1
/17 255.255.128.0 128 0.0.127.255 32,766 2
/18 255.255.192.0 64 0.0.63.255 16,382 4
/19 255.255.224.0 32 0.0.31.255 8,190 8
/20 255.255.240.0 16 0.0.15.255 4,094 16
/21 255.255.248.0 8 0.0.7.255 2,046 32
/22 255.255.252.0 4 0.0.3.255 1,022 64
/23 255.255.254.0 2 0.0.1.255 510 128

How to subnet: the block-size method step by step

To subnet any address, use the block-size method, also called the magic number. It finds the subnet ID, broadcast address and host range in five steps, for any prefix length.

  1. Find the interesting octet, where the mask is not 255 or 0. For /17 to /24 it is the third octet. For /25 to /32 it is the fourth. For /9 to /16 it is the second.
  2. Get the block size. Block size = 256 − the mask value in that octet. A /26 mask is 255.255.255.192, so the block size is 256 − 192 = 64.
  3. Find the subnet ID. Take the largest multiple of the block size that is not above the address's value in that octet. Set every octet to the right of it to 0.
  4. Find the broadcast. Add the block size to the subnet ID's interesting octet, subtract 1, and set every octet to the right to 255.
  5. Find the usable range. The first host is the subnet ID + 1. The last host is the broadcast − 1.

Two formulas cover the counting questions:

  • Usable hosts per subnet = 2^h − 2, where h is the number of host bits (32 minus the prefix length).
  • Number of subnets = 2^s, where s is the number of bits you borrowed from the original prefix.

The "−2" removes the subnet ID and the broadcast address. The one exception is a /31 on a point-to-point link. RFC 3021 allows both of its 2 addresses to be used.

What do you need to memorize?

Two short rows of numbers. A mask octet can only be one of these nine values:

0, 128, 192, 224, 240, 248, 252, 254, 255

And the powers of 2, for host and subnet counts:

2, 4, 8, 16, 32, 64, 128, 256, 512, 1024

Candidates report that no calculator is provided on the exam, and many write these rows on the erasable board as soon as it starts.

How many hosts are in a subnet?

Count the host bits, raise 2 to that power, and subtract 2. A /27 has 32 − 27 = 5 host bits, so it holds 2^5 = 32 addresses and 30 usable hosts.

For "the smallest subnet for 50 hosts", find the smallest power of 2 that is at least the hosts + 2.

  • 50 hosts + 2 = 52. The next power of 2 is 64, which is 6 host bits. 32 − 6 = /26 (62 usable).
  • 30 hosts + 2 = 32. That is exactly 2^5, so /27 works (30 usable). A /28 gives only 14.
  • 31 hosts + 2 = 33, which is above 32. You need 2^6 = 64, so /26.

The third line is the classic trap. Always add the 2 before you pick the power.

Which subnet is a host in?

Use the block size in the interesting octet and round the address down to the nearest multiple. The result is the subnet ID.

Example: 172.16.45.200/20

  1. /20 falls in the third octet. The mask is 255.255.240.0.
  2. Block size = 256 − 240 = 16.
  3. Multiples of 16 in the third octet: 0, 16, 32, 48. The value is 45, so round down to 32.
  4. Subnet ID: 172.16.32.0. The next subnet is 172.16.48.0.
  5. Broadcast: 172.16.47.255. Usable range: 172.16.32.1 to 172.16.47.254.

The fourth octet (200) did not matter. Only the interesting octet decides the subnet.

How do you find the broadcast address?

The broadcast is the next subnet ID minus 1. Find the subnet, add the block size, and step back one address.

Example: 192.168.10.77/26

  1. /26 falls in the fourth octet. The mask value is 192, so the block size is 64.
  2. Multiples of 64: 0, 64, 128, 192. Round 77 down to 64.
  3. Subnet ID: 192.168.10.64. The next subnet is 192.168.10.128.
  4. Broadcast: 192.168.10.127.
  5. Usable hosts: 192.168.10.65 to 192.168.10.126 (62 hosts).

When asked "Which address can be assigned to a host?", any subnet ID or broadcast is wrong.

How does VLSM work?

VLSM (variable-length subnet masking) gives each segment a subnet sized to its own host count. Sort the requirements from largest to smallest, then assign each one the next free block that fits. Going largest first keeps every block on a valid boundary.

Example: split 192.168.50.0/24 for LANs of 100, 50 and 25 hosts and two router-to-router links

Need Hosts + 2 Prefix Subnet Usable range Broadcast
LAN A 102 /25 192.168.50.0/25 .1 to .126 192.168.50.127
LAN B 52 /26 192.168.50.128/26 .129 to .190 192.168.50.191
LAN C 27 /27 192.168.50.192/27 .193 to .222 192.168.50.223
Link 1 4 /30 192.168.50.224/30 .225 to .226 192.168.50.227
Link 2 4 /30 192.168.50.228/30 .229 to .230 192.168.50.231

Addresses .232 to .255 stay free for growth.

How do you calculate a wildcard mask?

Subtract each octet of the subnet mask from 255. A shortcut: in the interesting octet, the wildcard is the block size minus 1. The Wildcard columns in both cheat-sheet tables above give every value from /16 to /30.

Wildcard masks appear in OSPF network statements and in ACL entries. A 0 bit means "must match" and a 1 bit means "ignore":

R1(config)# router ospf 1
R1(config-router)# network 192.168.50.192 0.0.0.31 area 0
R1(config-router)# exit
R1(config)# access-list 10 permit 172.16.32.0 0.0.15.255

The first line matches the LAN C /27 from the VLSM example. The ACL line matches all of 172.16.32.0/20. Typing a subnet mask where IOS expects a wildcard is a common lab mistake, covered in our CCNA labs guide. OSPF network statements use the same wildcards, as our CCNA OSPF configuration guide shows.

How do you summarize routes?

Write the networks in binary in the octet where they differ, and count the bits they share from the left. The summary is the first network with a prefix of the shared bits.

Example: 10.1.4.0/24, 10.1.5.0/24, 10.1.6.0/24 and 10.1.7.0/24

Third octet Binary
4 00000100
5 00000101
6 00000110
7 00000111

The first 6 bits (000001) match in all four. Add them to the 16 bits of the first two octets: 16 + 6 = 22. The summary is 10.1.4.0/22, with mask 255.255.252.0. Faster check: four /24s are a block of 4 in the third octet, and 4 is a multiple of 4, so it is aligned.

The trap: non-aligned ranges. 10.1.4.0/24 through 10.1.9.0/24 is six networks. No single block of 8 starts at 4, so no /21 covers exactly those six. The smallest single summary is 10.1.0.0/20, which also covers networks you do not own. The exact answer is two routes: 10.1.4.0/22 and 10.1.8.0/23. The rules behind this are defined in RFC 4632 (CIDR).

Try every question type free (no sign-up)

What IPv6 prefix sizes do you need for the CCNA?

A standard IPv6 LAN uses a /64, with 64 bits for the network and 64 bits for the interface ID. RFC 4291 defines this structure. You do not subtract 2 for hosts, because IPv6 has no broadcast address.

IPv6 subnetting on the CCNA is mostly counting bits:

  • Subnets available = 2^(64 − site prefix). A /48 holds 2^16 = 65,536 /64 subnets. A /56 holds 2^8 = 256.
  • Subnet ID position. In 2001:db8:acad::/48, the fourth hextet is the subnet ID. So 2001:db8:acad:1::/64, 2001:db8:acad:2::/64 and so on are separate subnets.
  • Shortening. Drop leading zeros in each hextet, and replace one run of all-zero hextets with ::. RFC 5952 sets the rule: the longest run of zeros gets the ::, and only once.
Full:  2001:0db8:0000:0000:0001:0000:0000:0001
Short: 2001:db8::1:0:0:1

Other prefixes to recognize: /128 for a single host route or loopback, and /127 for point-to-point links (RFC 6164). The 2001:db8::/32 range in these examples is reserved for documentation.

Subnetting practice questions with answers

These 10 subnetting practice questions cover every type the CCNA asks. Give yourself 30 seconds each, on paper.

Subnetting example questions: hosts and prefixes

1. How many usable hosts are in 10.0.0.0/22?
Answer: 1,022. Host bits = 32 − 22 = 10. 2^10 = 1,024, minus 2 = 1,022.

2. What is the smallest prefix that supports 500 hosts on one subnet?
Answer: /23. 500 + 2 = 502. The next power of 2 is 512 = 2^9, so 9 host bits and 32 − 9 = 23. A /23 gives 510 usable hosts.

Subnet ID, broadcast and valid host questions

3. Find the subnet ID, broadcast and usable range for 192.168.1.130/25.
Answer: block size 128 in the fourth octet. 130 rounds down to 128. Subnet 192.168.1.128, broadcast 192.168.1.255, hosts 192.168.1.129 to 192.168.1.254.

4. Find the subnet ID and broadcast for 172.20.99.14/21.
Answer: the mask is 255.255.248.0, so the block size is 8 in the third octet. 99 rounds down to 96. Subnet 172.20.96.0, broadcast 172.20.103.255, hosts 172.20.96.1 to 172.20.103.254.

5. Which subnet is 10.55.200.33/12 in?
Answer: the mask is 255.240.0.0, so the block size is 16 in the second octet. 55 rounds down to 48. Subnet 10.48.0.0/12, broadcast 10.63.255.255.

6. Are 192.168.5.62/27 and 192.168.5.66/27 in the same subnet?
Answer: No. The block size is 32. 62 is in 192.168.5.32/27 (.32 to .63). 66 is in 192.168.5.64/27 (.64 to .95). They need a router to talk.

7. Can 192.168.20.39/29 be assigned to a host?
Answer: No. The block size is 8. 39 falls in 192.168.20.32/29, which runs from .32 to .39. So .39 is the broadcast address. Valid hosts are .33 to .38.

Wildcard, summary and VLSM questions

8. What wildcard mask matches 255.255.252.0?
Answer: 0.0.3.255. 255 − 252 = 3 in the third octet, and 255 − 0 = 255 in the fourth.

9. Summarize 172.16.16.0/24 through 172.16.31.0/24 in one route.
Answer: 172.16.16.0/20. That is 16 networks, a block of 16 in the third octet. 16 is a multiple of 16, so it is aligned. Sixteen /24s = 4 bits, and 24 − 4 = 20.

10. Using VLSM, split 10.10.0.0/24 for 60 hosts, 28 hosts and 12 hosts. List the subnets in order.
Answer: largest first.

  • 60 + 2 = 62, needs 64: 10.10.0.0/26 (hosts .1 to .62, broadcast .63)
  • 28 + 2 = 30, needs 32: 10.10.0.64/27 (hosts .65 to .94, broadcast .95)
  • 12 + 2 = 14, needs 16: 10.10.0.96/28 (hosts .97 to .110, broadcast .111)

The next free address is 10.10.0.112.

The five slips that cost the most points: forgetting the "+2", working in the wrong octet, rounding up instead of down, giving a host the subnet ID or broadcast, and typing a mask where a wildcard belongs.

How does subnetting show up on the CCNA exam?

Subnetting is a named Cisco objective and hides inside many other questions. As of November 2026, the live exam is CCNA 200-301 v1.1, a 120-minute exam. Its exam topics list objective 1.6, "Configure and verify IPv4 addressing and subnetting," and objective 1.8, "Configure and verify IPv6 addressing and prefix."

Cisco has announced CCNA v2.0, keeping the 200-301 number. Cisco lists February 2, 2027 as the last day for v1.1 and February 3, 2027 as the first day for v2.0. The v2.0 blueprint words it as "Troubleshoot IPv4 address configuration, assignment, and subnetting (public and private)," so the skill stays, with more weight on finding what is wrong.

Where it appears What you are asked Skill from this guide
Direct question Hosts per subnet, subnet ID, broadcast, valid host Block size, 2^h − 2
Design question Pick the right mask or VLSM plan for given host counts VLSM, largest first
Exhibit A topology or show output with a wrong mask or gateway Which subnet a host is in
ACL and OSPF items Choose or type the right wildcard Wildcard = 255 − mask
Routing table Which route matches, or what summary to configure Summarization, longest match
Lab Configure addresses and network statements on IOS All of the above, typed

Cisco does not publish how many questions involve subnetting. When we write CCNA practice questions, the hardest ones hide subnetting inside a troubleshooting exhibit: for example, a PC cannot reach its gateway because the gateway is in a different /27. For how exhibit and lab items look on screen, read CCNA 200-301 question types.

What is the best subnetting practice routine?

Short daily drills beat long sessions. Write the cheat-sheet chart from memory each morning until it is perfect. Then do 10 timed problems a day on paper, adding VLSM, summarization and wildcards in week 2. Check each answer with our free subnet calculator after you finish, never before.

Fit these drills into the first weeks of the CCNA 200-301 study plan. Our CCNA practice exams are timed, and you can lock each question once you move on, as the real exam does.

Get the CCNA Exam Pass Try every question type free (no sign-up)

Sources

Frequently asked questions

What should a subnetting cheat sheet include?

For each prefix length it should list the subnet mask, the block size, the wildcard mask and the usable hosts. Two formulas fill in the rest: block size = 256 − the mask octet, and usable hosts = 2^h − 2.

How do you subnet an IP address?

Use the block-size method. Find the octet where the mask is not 255 or 0, subtract that mask value from 256 to get the block size, and round the address down to the nearest multiple of the block size. That is the subnet ID, and the broadcast is one less than the next subnet.

How many usable hosts are in a /24, /27, /28 and /29?

A /24 has 254 usable hosts, a /27 has 30, a /28 has 14 and a /29 has 6. Each is 2 raised to the number of host bits, minus 2 for the subnet ID and broadcast address.

How do you find the broadcast address of a subnet?

Add the block size to the subnet ID and subtract 1. For 192.168.10.77/26 the block size is 64, the subnet is 192.168.10.64, and the broadcast is 192.168.10.127.

How do you calculate a wildcard mask?

Subtract each octet of the subnet mask from 255. For 255.255.255.224 the wildcard is 0.0.0.31, which is also the block size minus 1.

What is the best way to practice subnetting?

Write the cheat-sheet chart from memory each day, then do 10 timed subnetting practice questions on paper at about 30 seconds each. Add VLSM, summarization and wildcard questions once the basics are fast.

Can you use a calculator on the CCNA exam?

Candidates consistently report that no calculator is provided, so plan to subnet by hand. Practice on paper or a whiteboard until the common prefixes are memorized.

How much subnetting is on the CCNA 200-301 exam?

Cisco does not publish a question count for subnetting. It is a named objective (1.6 in v1.1), and it also appears inside ACL, OSPF, static route and troubleshooting questions.

Reading is step one. Practice is step two.

Put this plan to work: take the free CCNA practice quiz — same domains, same pressure, instant feedback.

Take the free CCNA quiz or read the full CCNA exam guide

Keep reading

All guides
CCNA
Exam fee
$300 USD + tax (Cisco)
Retake wait
5 calendar days (Cisco)
Valid for
3 years (Cisco)
Renewal
30 CE credits or an exam

CCNA Certification Cost 2026: Exam Fee, Retakes, Renewal

CCNA certification cost in 2026: the 200-301 exam is $300 USD plus tax. See retake rules, voucher options, renewal costs, free study tools and total budgets.

Read the guide
CCNA
Protocol type
Link-state IGP (RFC 2328)
Runs over
IP protocol 89
CCNA exam topic
3.4, single-area OSPFv2
Default reference bandwidth
100 Mbps (Cisco IOS)

What Is OSPF? Protocol, Cost and Configuration Guide

What is OSPF? The link-state routing protocol explained: OSPF cost, neighbor states, OSPF vs EIGRP and BGP, passive interfaces and a CCNA configuration.

Read the guide