CCNA Study GuideCCNA 200-301

CCNA Subnetting: The Complete Guide With Practice Problems

Subnetting is the single most tested skill on the CCNA exam. You’ll encounter it across routing, switching, and troubleshooting scenarios. Without a solid grasp, you’ll struggle with route summarizati

6 min read
7 sections
Courseiva Study Hub
JA

Reviewed by Johnson Ajibi, MSc IT Security

12+ years in network and security engineering · Founder, JTNetSolutions Limited & Courseiva

Quick answer

Subnetting is the single most tested skill on the CCNA exam. You’ll encounter it across routing, switching, and troubleshooting scenarios. Without a solid grasp, you’ll struggle with route summarizati

Quick answer: Subnetting divides a larger network into smaller, manageable subnetworks. For CCNA, master the four-step method: determine the number of subnet bits, calculate the subnet mask, find the network address, and identify the valid host range. Practice with at least 10–15 problems daily to build speed and accuracy.

Why Subnetting Matters for CCNA

Subnetting is the single most tested skill on the CCNA exam. You’ll encounter it across routing, switching, and troubleshooting scenarios. Without a solid grasp, you’ll struggle with route summarization, VLSM, and ACL design. The goal isn’t just to pass the exam—it’s to build networks that scale efficiently.

Every subnet reduces broadcast domains and conserves IP address space. In modern networks, you rarely use flat /24 or /16 subnets. You need Variable-Length Subnet Masking (VLSM) and Classless Inter-Domain Routing (CIDR) to match subnet sizes to actual host requirements.

The Four-Step Subnetting Method

Memorize this sequence. It works for any classful or classless network.

Step 1: Determine Subnet Bits

Given a network address and a required number of subnets, find how many bits to borrow from the host portion. Use the formula: 2^n >= required subnets (where n = borrowed bits).

Step 2: Calculate the New Subnet Mask

Add the borrowed bits to the default prefix length. For example, borrowing 3 bits from a /24 gives /27.

Step 3: Find the Network (Subnet) Address

The network address is the first address in each subnet. It’s always even (when using binary). The block size (increment) is 256 - subnet mask octet value.

Step 4: Identify Valid Host Range and Broadcast

Valid hosts are all addresses between the network address and the broadcast address. Broadcast is the last address in the subnet.

CCNA Subnetting Practice Problems With Answers

Below are 10+ worked examples. Each shows the step-by-step method and the final answer. Use these to build muscle memory.

Example 1: /24 into 4 Subnets

Network: 192.168.1.0/24
Required: 4 subnets

  • Borrowed bits: 2^2 = 4 → borrow 2 bits
  • New mask: /26 (255.255.255.192)
  • Block size: 256 - 192 = 64
  • Subnets:
    • 192.168.1.0/26 (hosts 1–62)
    • 192.168.1.64/26 (hosts 65–126)
    • 192.168.1.128/26 (hosts 129–190)
    • 192.168.1.192/26 (hosts 193–254)

Answer: Valid hosts per subnet: 62.

Example 2: /16 into 8 Subnets

Network: 172.16.0.0/16
Required: 8 subnets

  • Borrowed bits: 2^3 = 8 → borrow 3 bits
  • New mask: /19 (255.255.224.0)
  • Block size: 256 - 224 = 32 (in third octet)
  • Subnets: 172.16.0.0/19, 172.16.32.0/19, 172.16.64.0/19 ... up to 172.16.224.0/19

Answer: Each subnet has 8190 valid hosts.

Example 3: /30 for Point-to-Point Link

Network: 10.0.0.0/24
Requirement: A /30 subnet for a WAN link

  • /30 mask: 255.255.255.252
  • Block size: 256 - 252 = 4
  • First usable subnet: 10.0.0.0/30 (hosts 10.0.0.1–10.0.0.2)
  • Broadcast: 10.0.0.3

Answer: Only 2 valid hosts per /30.

Example 4: /27 with 30 Hosts

Network: 192.168.5.0/24
Requirement: Subnet that supports at least 30 hosts

  • Host bits needed: 2^5 - 2 = 30 → 5 host bits
  • Prefix: /27 (32 - 5 = 27)
  • Block size: 256 - 224 = 32
  • Subnet: 192.168.5.0/27 (hosts 1–30)

Answer: 30 valid hosts, broadcast 192.168.5.31.

Example 5: /28 for 14 Hosts

Network: 10.10.10.0/24
Requirement: Subnet for 14 hosts

  • Host bits: 2^4 - 2 = 14 → 4 host bits
  • Prefix: /28
  • Block size: 16
  • Subnet: 10.10.10.0/28 (hosts 1–14)

Answer: 14 valid hosts, broadcast 10.10.10.15.

Example 6: /26 with 62 Hosts

Network: 172.16.0.0/16
Requirement: Subnet for 62 hosts

  • Host bits: 2^6 - 2 = 62 → 6 host bits
  • Prefix: /26
  • Block size: 64
  • Subnet: 172.16.0.0/26 (hosts 1–62)

Answer: 62 valid hosts.

Example 7: /29 for 6 Hosts

Network: 192.168.100.0/24
Requirement: Subnet for 6 hosts

  • Host bits: 2^3 - 2 = 6 → 3 host bits
  • Prefix: /29
  • Block size: 8
  • Subnet: 192.168.100.0/29 (hosts 1–6)

Answer: 6 valid hosts.

Example 8: /23 with 510 Hosts

Network: 10.0.0.0/16
Requirement: Subnet for 500 hosts

  • Host bits: 2^9 - 2 = 510 → 9 host bits
  • Prefix: /23
  • Block size: 512 (256 in third octet? Actually /23 has 512 addresses)
  • Subnet: 10.0.0.0/23 (hosts 10.0.0.1–10.0.1.254)

Answer: 510 valid hosts.

Example 9: /20 with 4094 Hosts

Network: 172.16.0.0/16
Requirement: Subnet for 4000 hosts

  • Host bits: 2^12 - 2 = 4094 → 12 host bits
  • Prefix: /20
  • Block size: 4096 (16 in third octet? Actually 2^12 = 4096)
  • Subnet: 172.16.0.0/20 (hosts 172.16.0.1–172.16.15.254)

Answer: 4094 valid hosts.

Example 10: /22 for 1022 Hosts

Network: 192.168.0.0/16
Requirement: Subnet for 1000 hosts

  • Host bits: 2^10 - 2 = 1022 → 10 host bits
  • Prefix: /22
  • Block size: 1024
  • Subnet: 192.168.0.0/22 (hosts 192.168.0.1–192.168.3.254)

Answer: 1022 valid hosts.

VLSM and CIDR: When Subnet Sizes Vary

VLSM allows different subnet masks within the same major network. CIDR is the notation (/xx) that makes VLSM possible. On the CCNA, you must design subnets that match exact host counts—no waste.

VLSM Example

Network: 192.168.1.0/24
Requirements:

  • Subnet A: 50 hosts
  • Subnet B: 20 hosts
  • Subnet C: 10 hosts
  • Two /30 WAN links

Step 1: Largest need first. 50 hosts → /26 (62 hosts). Use 192.168.1.0/26.
Step 2: Next largest: 20 hosts → /27 (30 hosts). Use 192.168.1.64/27.
Step 3: 10 hosts → /28 (14 hosts). Use 192.168.1.96/28.
Step 4: Two /30 links: 192.168.1.112/30 and 192.168.1.116/30.

Answer: Total used: 192.168.1.0–192.168.1.119. Remaining: 192.168.1.120–192.168.1.255.

Common Exam Traps

Trap 1: Forgetting to Subtract 2

The network and broadcast addresses are not usable. Always subtract 2 from total addresses.
Example: /30 has 4 addresses → 2 usable hosts.

Trap 2: Misaligning Subnet Boundaries

Subnets must start at multiples of the block size. 192.168.1.64/27 is valid; 192.168.1.65/27 is not.

Trap 3: Overlapping Subnets

In VLSM, ensure subnets don’t overlap. Always allocate largest subnets first.

Trap 4: Confusing Prefix Length with Host Bits

/24 = 8 host bits (32 - 24). /30 = 2 host bits.

Trap 5: Assuming Classful Boundaries

CIDR allows any prefix length. A /17 is perfectly valid, even though it crosses the old Class B /16 boundary.

Comparison Table: Subnet Masks and Usable Hosts

Prefix Subnet Mask Total Addresses Usable Hosts Use Case
/30 255.255.255.252 4 2 Point-to-point links
/29 255.255.255.248 8 6 Small branch or DMZ
/28 255.255.255.240 16 14 Small VLAN
/27 255.255.255.224 32 30 Medium-sized network
/26 255.255.255.192 64 62 Department subnet
/25 255.255.255.128 128 126 Larger department
/24 255.255.255.0 256 254 Standard LAN
/23 255.255.254.0 512 510 Two /24s combined
/22 255.255.252.0 1024 1022 Larger site
/20 255.255.240.0 4096 4094 Campus network

Key Takeaway

Subnetting is a repeatable skill. Master the four-step method, practice with real numbers, and memorize the common masks. The 10+ examples above cover the most frequent CCNA scenarios—from /30 WAN links to /20 campus subnets. Avoid the traps by always checking your block size and subtracting 2 for usable hosts.

For more practice, head to Courseiva.com’s CCNA subnetting question bank. You’ll find hundreds of problems with step-by-step solutions, timed drills, and exam simulations. Consistent practice is the only path to subnetting mastery.

Practise CCNA questions

Original exam-style practice questions with detailed, explained answers. Track your weak topics and review missed questions before exam day.

Courseiva provides free IT certification practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics. Explore related practice questions for Cisco, CompTIA, Microsoft Azure, AWS, and other certification exams.