Subnetting Practice: Work Problems Step by Step

Share

Subnetting practice gets easier when you use the same method every time: read the prefix, find the block size, then work out the network address, broadcast address, and usable host range. If the question gives you a host requirement or asks you to split a network, you still use the same method, but you choose the smallest prefix that fits first. This guide gives you a repeatable way to do that on paper, in an exam, or on the job without freezing.

What you need to know before you start

You do not need to be fast at binary to do subnetting practice, but you do need a few basics.

  • An IPv4 address has 32 bits, split into four octets.
  • A CIDR prefix like /24 tells you how many bits belong to the network.
  • The remaining bits belong to hosts inside that subnet.
  • The network address is the first address in the subnet.
  • The broadcast address is the last address in the subnet.
  • Usable host addresses are the addresses between those two, so you usually exclude the network and broadcast addresses.

Two facts help most of the time. First, subnet masks are just a way to show where the network part ends, such as 255.255.255.0 for /24. Second, subnetting questions usually care about one of four things: the network address, the broadcast address, the usable host range, or the number of subnets and hosts. If you can tell which one is being asked, the rest gets much simpler.

Before you calculate

  • Read the IP address and the prefix or subnet mask.
  • Decide whether you need the network, broadcast, usable range, or host count.
  • Check whether the question is about one subnet or several subnets.
  • If the question asks for a host count, work out the prefix before you calculate the range.

The fastest way to read a subnetting question

Before you calculate anything, pull out the exact pieces of the question. Most mistakes happen because people start doing math before they know what the question wants.

  1. Find the IP address and the prefix. - Example: 192.168.10.77/26 - If there is no prefix, look for a subnet mask instead.
  2. Identify the task. - Network address? - Broadcast address? - Usable host range? - How many hosts per subnet? - How many subnets are needed?
  3. Check whether the question is about a single address or a block of addresses. - A single IP with a prefix usually means you must find the subnet it belongs to. - A host requirement usually means you must choose a prefix first. - A word problem may ask for several subnets, so you may need to split a network into multiple ranges.
  4. Decide whether the question is asking for the subnet mask in decimal, the prefix length, or both. - On exams, they often expect you to know both forms.

A useful habit is to rewrite the question in your own words before calculating. For example: “Given 192.168.10.77/26, find the network, broadcast, and usable range.” That keeps you from solving the wrong problem.

Repeatable method

  1. Write down the prefix or subnet mask.
  2. Find the block size for the subnetted octet.
  3. Mark the valid network boundaries.
  4. Pick the boundary the IP falls into.
  5. Write the network address.
  6. Find the next boundary and subtract 1 to get the broadcast address.
  7. Add 1 to the network address and subtract 1 from the broadcast address to get the usable host range.
  8. If the question is about host requirements, choose the smallest prefix that gives enough usable hosts before you do the range.

That process works for normal IPv4 questions and for common exam-style word problems. The only thing that changes is whether you start with an IP address or with a host requirement.

Work through an easy example first

Start with a simple example: split 192.168.1.0/24 into smaller subnets. A /24 leaves 8 host bits, so the whole range runs from 192.168.1.0 to 192.168.1.255. If you split a /24 into /26 subnets, you are borrowing 2 bits from the host portion.

That means each subnet has 2^2 = 4 blocks of size 64 addresses, because /26 leaves 6 host bits and 2^6 = 64 total addresses per subnet.

The subnet ranges are:

  • 192.168.1.0/26 → network 192.168.1.0, broadcast 192.168.1.63, usable 192.168.1.1 to 192.168.1.62
  • 192.168.1.64/26 → network 192.168.1.64, broadcast 192.168.1.127, usable 192.168.1.65 to 192.168.1.126
  • 192.168.1.128/26 → network 192.168.1.128, broadcast 192.168.1.191, usable 192.168.1.129 to 192.168.1.190
  • 192.168.1.192/26 → network 192.168.1.192, broadcast 192.168.1.255, usable 192.168.1.193 to 192.168.1.254

The pattern matters more than memorizing the list. Once you know the block size is 64, you can count subnet boundaries by adding 64 each time: 0, 64, 128, 192. For any address inside the block, the network address is the nearest lower boundary, and the broadcast address is the address just before the next boundary.

How to handle host counts without getting lost

If a problem gives you the number of hosts needed, work backward from that number to the prefix.

Use this idea: usable hosts per subnet = 2^host bits - 2. The -2 is for the network and broadcast addresses in a normal IPv4 subnet.

For example:

  • /26 leaves 6 host bits, so usable hosts = 2^6 - 2 = 62
  • /27 leaves 5 host bits, so usable hosts = 2^5 - 2 = 30
  • /28 leaves 4 host bits, so usable hosts = 2^4 - 2 = 14

If a question says you need at least 50 usable hosts, /27 is too small because it only gives 30. /26 fits because it gives 62. If you need at least 25 usable hosts, /27 fits and /28 does not.

A simple way to choose the prefix is:

  1. Write the required usable host count.
  2. Add 2 for network and broadcast.
  3. Find the next power of 2 that is equal to or larger than that total.
  4. Convert that to a prefix.

Example: 50 usable hosts → 52 total addresses needed → next power of 2 is 64 → 6 host bits → /26.

That shortcut works well in exam-style subnetting practice because it avoids building the whole binary table every time.

A harder practice problem with multiple subnets

Now use a more realistic example: 10.20.30.0/24 must be split into four subnets, and you need to list the network, broadcast, and usable range for each one.

Four equal subnets from a /24 means borrowing 2 bits, so the new prefix is /26. That gives a block size of 64 addresses per subnet.

The four subnets are:

  • 10.20.30.0/26 → network 10.20.30.0, broadcast 10.20.30.63, usable 10.20.30.1 to 10.20.30.62
  • 10.20.30.64/26 → network 10.20.30.64, broadcast 10.20.30.127, usable 10.20.30.65 to 10.20.30.126
  • 10.20.30.128/26 → network 10.20.30.128, broadcast 10.20.30.191, usable 10.20.30.129 to 10.20.30.190
  • 10.20.30.192/26 → network 10.20.30.192, broadcast 10.20.30.255, usable 10.20.30.193 to 10.20.30.254

If you want to keep the boundaries straight, write only the subnet starts first: 0, 64, 128, 192. Then fill in the end of each range by subtracting 1 from the next start. That keeps you from drifting by one address, which is one of the most common exam mistakes.

For a word problem, the same logic still applies. If the prompt says one subnet needs 50 hosts, another needs 25, and another needs 10, you do not split them evenly. You choose different prefixes for each one, starting with the largest host requirement and assigning ranges that fit. That is where VLSM comes in: different subnet sizes inside the same parent network.

How to check your answer in 30 seconds

A fast check can save you from simple arithmetic slips.

  1. Confirm the network address is on a valid boundary. - For a /26, the last octet must start at 0, 64, 128, or 192. - If your network address is 10.20.30.70/26, it is wrong because 70 is not a boundary.
  2. Confirm the broadcast address is the last address before the next subnet. - If the subnet starts at 64 and the next start is 128, the broadcast must be 127.
  3. Confirm the usable range stays between them. - Usable hosts should start one higher than the network address. - Usable hosts should end one lower than the broadcast address.
  4. Check the host count. - A /26 should give 62 usable hosts. - If your count does not match the prefix, something is off.
  5. Check that the ranges do not overlap. - Each subnet should end exactly where the next one begins minus 1.

If all five checks pass, your answer is usually solid. This quick review catches most boundary mistakes without making you redo the whole problem.

The mistakes that break most subnetting answers

A few errors show up over and over in subnetting practice.

  • Starting on the wrong boundary. If the block size is 32, the subnet starts should be 0, 32, 64, 96, and so on. Starting at 50 means the answer is off.
  • Confusing total addresses with usable hosts. /27 gives 32 total addresses, but only 30 usable hosts.
  • Forgetting the network and broadcast addresses. On normal IPv4 subnets, those are not assignable to hosts.
  • Using the wrong octet for the block size. Only one octet changes in a simple subnetting problem, and it is usually the last non-255 octet in the mask.
  • Skipping the question wording. If the prompt asks for the “next subnet,” that is not the same as the broadcast address.
  • Mixing up prefix length and subnet mask. /26 is the same setting as 255.255.255.192, just written in CIDR notation instead of dotted decimal.

A good habit is to write the block size next to the mask before you start the rest of the math. That one line often prevents the rest of the answer from drifting.

More subnetting practice problems you can try

Work these by hand first, then check each answer using the 30-second method.

  1. Find the network, broadcast, and usable host range for 192.168.5.77/27.
  2. Find the network, broadcast, and usable host range for 172.16.12.200/28.
  3. How many usable hosts are available in a /25 subnet?
  4. You need at least 50 usable hosts. What prefix should you use?
  5. Split 192.168.100.0/24 into four equal subnets and list each subnet range.
  6. A company has 10.0.0.0/24 and needs three subnets for 100 hosts, 50 hosts, and 20 hosts. What prefixes would you choose, starting with the largest subnet?

Answers:

  1. 192.168.5.77/27 belongs to 192.168.5.64/27. Broadcast is 192.168.5.95, usable range is 192.168.5.65 to 192.168.5.94.
  2. 172.16.12.200/28 belongs to 172.16.12.192/28. Broadcast is 172.16.12.207, usable range is 172.16.12.193 to 172.16.12.206.
  3. /25 has 128 total addresses and 126 usable hosts.
  4. 50 usable hosts needs /26.
  5. The four subnets are 192.168.100.0/26, 192.168.100.64/26, 192.168.100.128/26, and 192.168.100.192/26.
  6. 100 hosts needs /25, 50 hosts needs /26, and 20 hosts needs /27.

If you miss one, do not restart from the beginning. Check only the boundary you used, the block size, and the usable host count. That usually shows where the slip happened.

When subnetting still feels confusing

A few recurring questions tend to come up after you’ve practiced a bit.

Subnet masks and prefixes are two ways of saying the same thing. /24 means 255.255.255.0, /26 means 255.255.255.192, and so on. If you can move between those forms, many questions become easier to read.

VLSM means you use different subnet sizes inside the same parent network. That is common in real networks because not every department needs the same number of hosts. The basic method does not change: sort the largest need first, choose the smallest subnet that fits, assign it, then move on to the next one.

The common formulas work because IPv4 has a fixed 32-bit size. Every time you borrow bits from the host part, you reduce the host count and increase the number of subnets. Once that clicks, the table becomes a tool instead of something to memorize under pressure.

If you want better subnetting practice, keep doing the same kinds of problems until you can recognize the block size and boundary without hesitation. That recognition is what makes the rest of the math feel routine.

Completion

You know the process worked when you can take any IPv4 or CIDR subnetting question, identify what it is asking, and write the network address, broadcast address, usable host range, or matching prefix without guessing. For a quick self-check, your network address should land on a valid boundary, your broadcast address should be the last address before the next subnet, and your usable range should sit cleanly between them. If those three things line up, your answer is usually right.

Conclusion

The fastest way to improve at subnetting is to use one method every time: identify the prefix, find the block size, mark the network boundary, then derive the broadcast and usable range. After a few rounds, the pattern starts to stick. If you want more practice, redo the examples in this article without looking at the answers, then mix in a few host-count questions so you can switch between reading a subnet and choosing one.

Frequently Asked Questions

How do I know which octet to use for subnetting?

Look for the octet where the subnet mask stops being 255 or starts being something other than 0. That is usually the octet that changes the subnet boundaries. For example, `255.255.255.192` affects the last octet.

Why do I subtract 2 from the total addresses?

In a normal IPv4 subnet, the first address is the network address and the last address is the broadcast address. Those two are not assigned to hosts, so usable hosts equal total addresses minus 2.

What is the easiest way to choose a prefix from a host requirement?

Add 2 to the host requirement, round up to the next power of 2, then convert that to a prefix. That gives you the smallest subnet that fits the request.