Interactive Tool

Subnetting Practice

Random IPv4 subnetting problems at three difficulty levels, checked as you answer, with the block-size method worked out step by step.

  • 9 question types
  • 3 difficulty levels

Practice Problem

Score
0 / 0
Streak
0
Best streak
0
Difficulty and question types
Difficulty
Question types

Given …

Loading a problem…

Show the steps

    For a real network, use the subnet calculator

    Subnetting means splitting one IPv4 network into smaller ones and working out, for any address, which piece it belongs to. The practice panel above generates a new problem each time, checks your answer and shows the steps. Every question comes from the same subnet engine as the subnet calculator, so the answers match it exactly.

    How Subnetting Works with the Block-Size Method

    An IPv4 address has 32 bits, written as four octets of 8 bits each. The prefix length, the /27 in 192.168.10.37/27, says how many of those bits name the network. The remaining bits number the hosts inside it. The subnet mask is the same idea written as an address: /27 is 27 ones followed by 5 zeros, or 255.255.255.224.

    The block-size method, often called the magic number method, lets you skip binary for most problems. Here it is on one address, step by step.

    Worked example

    192.168.10.37/27

    Seven steps, all of them in the fourth octet, the one the /27 prefix ends in.

    192.168.10.32network
    192.168.10.63broadcast
    30usable hosts
    1. Find the interesting octetThe interesting octet is the one where the prefix ends. A /27 ends in the fourth octet, because 24 bits cover the first three.Octet 4
    2. Read the mask in that octetThe mask for /27 is 255.255.255.224, so its fourth octet is 224.224
    3. Subtract it from 256The result is the block size: subnets in that octet start at 0, 32, 64, 96 and every 32 after that.Block 32
    4. Find the networkTake the largest multiple of 32 that is not above the address's 37. That is 32, so the network address is 192.168.10.32.192.168.10.32
    5. Find the broadcastThe broadcast is one less than the next block: 32 + 32 − 1 = 63.192.168.10.63
    6. Find the usable rangeThe first usable host is the network plus one and the last is the broadcast minus one.33 to 62
    7. Count the usable hostsUsable hosts are 2 to the power of the host bits, minus 2 (the /31 and /32 exceptions are below). A /27 has 5 host bits, so 32 − 2 = 30.30 hosts

    The binary AND in the panel shows why this works. A host bit ANDed with a mask 0 becomes 0, so the network address is the address with every host bit cleared, and the block size is simply the value of the lowest network bit.

    When the prefix ends on an octet boundary, such as /16 or /24, there is no partial octet to work in. Keep the network octets as they are and set every later octet to 0 for the network and 255 for the broadcast: 172.16.99.4/16 sits in 172.16.0.0, with a broadcast of 172.16.255.255.

    Common Subnetting Mistakes

    Six slips to watch for. The steps under each practice problem show where each one happens.

    Working in the Wrong Octet

    A /20 ends in the third octet, not the fourth. Count 8, 16, 24 and see which group the prefix falls in before doing anything else.

    Using the Mask Value as the Block Size

    The block size is 256 minus the mask octet. For a /26 the mask octet is 192 and the block is 64, not 192.

    Forgetting the Minus 2

    A /28 has 16 addresses but 14 usable hosts, because the network and broadcast addresses can't be assigned to a device.

    Leaving Later Octets Alone

    When the interesting octet is the third, the fourth octet of the network address is 0 and of the broadcast is 255, whatever the original address had there.

    Rounding the Wrong Way When Borrowing

    If you need 6 subnets, 2 bits give only 4, so you borrow 3 bits for 8. For 50 hosts, 6 host bits give 62, so the prefix is /26, not /27.

    Treating /31 Like Any Other Prefix

    RFC 3021 lets a /31 on a point-to-point link use both addresses, with no network or broadcast address. The practice problems stop at /30, but the subnet calculator handles /31 and /32.

    How Subnetting Shows Up on Network+ and CCNA

    The CompTIA Network+ V9 exam, N10-009, lists IPv4 addressing among its networking concepts objectives: public and private ranges, APIPA, RFC 1918, loopback, subnetting with VLSM and CIDR, and address classes A through E. The troubleshooting objectives add an incorrect gateway, IP address or subnet mask as a cause of network service problems, so expect questions that hand you a misconfigured host.

    The Cisco CCNA 200-301 v1.1 exam topics include “configure and verify IPv4 addressing and subnetting” and “describe private IPv4 addressing” under Network Fundamentals. Cisco’s own CCNA FAQ names subnetting as one of the most challenging topics for people coming in without IT experience. Version 2.0 of the exam starts February 3, 2027; our CCNA guide covers what changes.

    Both exams are timed (90 minutes for Network+, 120 for the CCNA), so practice for speed as well as accuracy. If you’re choosing a degree with these exams in mind, our online networking and network administration degree ranking lists the fully online programs in that field.

    A Daily Subnetting Drill Plan

    A plan we suggest with the panel above, about 10 minutes a day for three weeks:

    Days 1 to 5Easy · 10 a day

    All question types. Check the steps on every miss until the block sizes 128, 64, 32, 16, 8 and 4 come without thinking.

    Days 6 to 10Medium · 10 a day

    Turn off the mask and CIDR questions once you get them right every time, and keep network, broadcast and which-subnet on.

    Days 11 to 15Hard · 10 a day

    Include the borrowing questions. Aim for a streak of 10 before you call a day done.

    After thatHard · 5 a day

    Five Hard questions a day until the exam, and a full set of 20 the day before.

    The session score and best streak sit beside the problem. Your best streak is kept in this browser only; nothing is sent anywhere.

    Private Ranges and CIDR in the Problems

    Most practice problems use the private ranges RFC 1918 sets aside, 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, because those are the addresses you will subnet inside real organizations. The prefixes themselves follow CIDR, described in RFC 4632, which replaced the fixed class A, B and C sizes with a prefix of any length, so a 10.x address can sit in a /27 as easily as a /8.

    Where Subnetting Leads

    Employers ask a network administrator for working knowledge of IP addressing and subnetting alongside routing, VLANs, DNS and DHCP, and the same skills show up in troubleshooting work as a network support specialist. Our network administrator guide describes the common route: a degree, a help desk or support job, then Network+ or the CCNA.

    Subnetting Practice FAQ

    What is the fastest way to subnet in your head?

    Use the block-size method. Find the octet where the prefix ends, subtract that octet of the mask from 256 to get the block size, then find the largest multiple of the block size that fits under the address in that octet. That multiple is the network; the next block minus one is the broadcast. The steps under each practice problem walk through it.

    How many usable hosts are in a /24, /26 and /30?

    A /24 has 254 usable hosts, a /26 has 62 and a /30 has 2. Each is 2 raised to the number of host bits, minus 2 for the network and broadcast addresses. A /30 is the classic point-to-point link size.

    Why does a /31 have two usable hosts?

    RFC 3021 lets a /31 on a point-to-point link use both addresses, one for each end, with no network or broadcast address. Many study guides still teach the older rule that a /31 is unusable, so expect to see both. A /32 is a single host address.

    Is subnetting on the CompTIA Network+ exam?

    Yes. The Network+ V9 objectives list IPv4 addressing, including subnetting with VLSM and CIDR, private and public ranges and address classes, and the troubleshooting objectives include an incorrect subnet mask. The objectives don't say how many subnetting questions appear.

    How much subnetting is on the CCNA?

    The CCNA 200-301 v1.1 exam topics include configuring and verifying IPv4 addressing and subnetting, and describing private IPv4 addressing, under Network Fundamentals. Cisco's own certification FAQ names subnetting as one of the hardest topics for people without IT experience.

    How long does it take to get good at subnetting?

    The drill plan on this page takes about three weeks at 10 minutes a day. Start with /24 to /30 problems until the block sizes 128, 64, 32, 16, 8 and 4 are automatic, then move to Medium and Hard, which move the work into the third and second octets.

    Keep researching

    Sources

    1. RFC 1918, Address Allocation for Private Internets
    2. RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links
    3. RFC 4632, Classless Inter-domain Routing (CIDR)
    4. CompTIA Network+ exam page
    5. Cisco’s CCNA exam topics
    6. Cisco CCNA certification page

    Sponsored

    Online IT & Cybersecurity Programs

    Schools pay to appear in these listings. They are separate from our rankings, which no school can pay to change.