Why subnetting is different from every other CCNA topic
Every other topic in the CCNA — OSPF, VLANs, NAT, ACLs, EtherChannel — can be learned through reading and reviewing until the concepts click. Subnetting cannot. You can understand subnetting completely and still fail exam questions about it because understanding isn't the same as being able to execute it accurately under time pressure while simultaneously parsing a multi-part scenario question.
The CCNA exam gives you 120 minutes for 120 questions. Subnetting questions don't get extra time. You need to calculate a subnet range, identify a network address, determine whether two hosts are on the same subnet, or figure out how many subnets a given mask creates — all while spending your time budget on reading and reasoning rather than arithmetic. The only way to do that is to practice until the calculations are automatic.
This guide covers the method, the reference table, and worked examples. Use it to learn the approach, then practice it until you don't need the guide anymore. That last part is the whole point.
The reference table you need to memorize
The foundation of subnet calculation is the value of each bit position in the last relevant octet. These values don't change.
| Prefix | Subnet Mask | Block Size | Usable Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 0 (point-to-point links) |
| /32 | 255.255.255.255 | 1 | 0 (host route) |
The Block Size column is the key number for the mental math approach. It tells you the increment between subnets. For a /27, subnets start at 0, 32, 64, 96, 128, 160, 192, 224 — each one 32 apart. For a /28, they start at 0, 16, 32, 48, and so on.
Usable hosts = (Block Size − 2). You subtract 2 because the first address is the network address and the last is the broadcast address. Neither can be assigned to a host.
Memorize this table. Write it on the whiteboard at the Pearson VUE center before you start the exam. It's the fastest path through subnetting questions.
The mental math method, step by step
Given any IP address and prefix length, you can find the network address, broadcast address, and host range using three steps.
Step 1: Look up the block size for the prefix length from the table. For /26, block size is 64.
Step 2: Find the network address. Take the last octet of the IP address and find the nearest multiple of the block size that is less than or equal to that number. That's the network address's last octet.
Step 3: The broadcast address is (network address last octet + block size − 1). The host range is everything between the network address and the broadcast address, exclusive.
Let's run it: 192.168.10.100/26.
Block size for /26 = 64. Multiples of 64: 0, 64, 128, 192. The last octet is 100. The nearest multiple of 64 that is ≤ 100 is 64. Network address: 192.168.10.64. Broadcast address: 192.168.10.64 + 64 − 1 = 192.168.10.127. Host range: 192.168.10.65 through 192.168.10.126.
Is 192.168.10.100 in this range? Yes. Is 192.168.10.130 in this range? No — it's in the next subnet (192.168.10.128/26).
Worked examples
Example 1: 172.16.5.200/27. What is the network address? What is the broadcast? Is 172.16.5.220 in the same subnet?
Block size for /27 = 32. Multiples of 32 in the last octet: 0, 32, 64, 96, 128, 160, 192, 224. Last octet is 200. Nearest multiple of 32 ≤ 200 is 192. Network address: 172.16.5.192. Broadcast: 172.16.5.192 + 32 − 1 = 172.16.5.223. Host range: 172.16.5.193 to 172.16.5.222. Is .220 in range? Yes — it falls between .193 and .222.
Example 2: 10.0.0.45/29. How many usable hosts? What is the broadcast address?
Block size for /29 = 8. Usable hosts = 8 − 2 = 6. Multiples of 8 ≤ 45: 0, 8, 16, 24, 32, 40. Network address: 10.0.0.40. Broadcast: 10.0.0.40 + 8 − 1 = 10.0.0.47. Host range: 10.0.0.41 to 10.0.0.46.
Example 3: You need a subnet that holds exactly 50 hosts. Which prefix length do you use?
50 hosts required. Usable hosts must be ≥ 50. From the table: /26 gives 62 usable hosts (block size 64). /27 gives 30 usable hosts — not enough. Use /26.
Example 4: A /24 network is subnetted with /27 masks. How many subnets are created?
A /24 has 8 host bits. A /27 borrows 3 bits from the host portion (27 − 24 = 3 borrowed bits). Number of subnets = 2³ = 8. Each subnet has 32 addresses, 30 usable hosts.
The "same subnet" question — most common exam trap
The CCNA frequently asks whether two hosts are on the same subnet, or whether a host and a router interface are on the same subnet. This is a two-step check.
Given Host A (192.168.1.65/26) and Host B (192.168.1.100/26), are they on the same subnet?
Block size for /26 = 64. Host A last octet: 65. Network = 64. Host B last octet: 100. Network = 64 (since 100 is between 64 and 128). Same network address = same subnet. Yes, they're on the same subnet.
Given Host A (10.0.0.60/28) and Host B (10.0.0.80/28)?
Block size = 16. Host A: 60. Nearest multiple of 16 ≤ 60 = 48. Network: 10.0.0.48. Host B: 80. Nearest multiple of 16 ≤ 80 = 80. Network: 10.0.0.80. Different network addresses = different subnets. They need a router between them.
VLSM: variable-length subnet masking
VLSM means using different prefix lengths on different subnets within the same address block. The CCNA tests VLSM in the context of efficient addressing — designing a scheme where you don't waste addresses by using the same large subnet for both a 200-host LAN and a 2-host point-to-point link.
The approach: size your subnets from largest to smallest. Allocate the largest subnet first from your address block, then allocate successively smaller subnets from the remaining space.
Example: You have 192.168.10.0/24 and need to create four subnets: one for 100 hosts, one for 50 hosts, one for 20 hosts, and one for a point-to-point WAN link.
100 hosts → /25 (126 usable). Allocate 192.168.10.0/25. Remaining space starts at 192.168.10.128.
50 hosts → /26 (62 usable). Allocate 192.168.10.128/26. Remaining space starts at 192.168.10.192.
20 hosts → /27 (30 usable). Allocate 192.168.10.192/27. Remaining space starts at 192.168.10.224.
Point-to-point link → /30 (2 usable). Allocate 192.168.10.224/30.
VLSM design questions on the CCNA don't require you to do all of this arithmetic under heavy time pressure — they typically give you the sizes and ask you to identify the correct prefix for a given requirement, or to identify which address belongs to which subnet. The underlying skill is the same subnet calculation you've already practiced.
IPv6 subnetting — lighter coverage, same logic
IPv6 addressing shows up on the CCNA but subnetting IPv6 is tested much more lightly than IPv4. The key things to know: the standard allocation for end-user networks is a /64, which leaves 64 bits for interface IDs. IPv6 subnetting typically happens in the third and fourth groups of the address rather than the last octet. A /48 is a common ISP allocation to a customer site, subdivided into /64s.
The exam tests IPv6 address types (unicast, multicast, anycast — no broadcast in IPv6), address format (eight groups of four hex digits, compressed with ::), and link-local addresses (fe80::/10). Heavy IPv6 subnetting math like you'd do in IPv4 rarely appears on the 200-301 exam.
How to drill this until it's automatic
The goal is to do any /24 through /30 calculation in under 15 seconds. That's achievable with the right practice method and not achievable by reading explanations repeatedly without doing the math.
Daily drill: write a random IP address and prefix length. Calculate network address, broadcast address, and whether a second random IP is in the same subnet. Check your answer. Repeat 20 times. Do this every day for the first two weeks of CCNA study. Do it again for a week before the exam.
Track your times. The point isn't just accuracy — it's speed. If you can calculate a /27 subnet correctly in 30 seconds, you'll burn through your exam time. If you can do it in 10 seconds, you have time for everything else.
Online subnet calculators are useful for checking your answers during practice, not for replacing the mental math. On exam day, there's no subnet calculator. There's a whiteboard, your reference table, and the skills you built during those daily drills.