Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 4

Subnet Host IP Ranges

Recommended resources

Hello! Welcome back.

In our last few lessons, we've been assembling the foundational tools for subnetting. You learned how to find a subnet's boundaries—the Network Address and Broadcast Address—and how to calculate the number of usable IPs available within those boundaries using the formula.

Today, we'll connect those two concepts to achieve our next objective: to identify the valid host IP address range for any given subnet. This is the final piece of the puzzle for analyzing a single subnet. Knowing this range tells you exactly which IP addresses you can assign to switches, servers, and workstations when you're at the command line.

Let's get started.

1. The Principle: From Boundaries to Range

This concept is straightforward and builds directly on what you already know. The "usable" or "valid" host addresses are simply all the IP addresses that exist between the network address and the broadcast address.

  • First Usable Host IP: The address immediately following the network address.
  • Last Usable Host IP: The address immediately preceding the broadcast address.

Therefore, the rule is simple:

  • First Host IP = Network Address + 1
  • Last Host IP = Broadcast Address - 1

The main task, then, is to accurately find the network and broadcast addresses for a given IP and prefix. Let's look at a highly effective method for doing this quickly.


2. A Fast Method for Finding the Range

For someone comfortable on the CLI, speed and pattern recognition are essential. The following video demonstrates a very popular and fast technique for solving any subnetting problem by focusing on the "group size" or "block size" of the subnet.

How to solve ANY Subnetting Problems in 60 seconds or less - Subnetting Mastery - Part 3 of 7

This video from Practical Networking demonstrates a fast and effective method for finding all the key subnet attributes, including the valid host range. This is a great technique for quickly solving problems without getting bogged down in binary math.

Watch the video from 00:41 to 05:35. The host walks through two examples (/28 and /29). Pay close attention to these simple steps he uses after finding the network and broadcast addresses: To find the First host IP, he adds 1 to the network ID. To find the Last host IP, he subtracts 1 from the broadcast IP.

As you saw, once you determine the network ID (the start of the block) and the next network ID, everything else falls into place:

  • Network ID: The multiple of the block size that is less than or equal to the IP's relevant octet.
  • Broadcast ID: The IP address right before the next network's ID.
  • First Host: Network ID + 1.
  • Last Host: Broadcast ID - 1.

3. Understanding the Logic (Beyond the Last Octet)

The block size method is excellent for subnets within the last octet (e.g., /25 to /32). But what about larger subnets like a /20 or /22, where the subnetting happens in the third octet? The same logic applies, but it's helpful to visualize the binary operations to solidify your understanding.

The next video provides a methodical walkthrough that focuses on the "interesting octet" and uses binary logic to find the network boundaries. This directly addresses your desire for a well-explained theoretical foundation.

IP Subnetting from CIDR Notations

For a deeper understanding, especially for more complex subnets that don't fall neatly on the last octet, it's useful to see the underlying binary logic. This video from Joshua Butcher provides a step-by-step walkthrough of this process.

Watch the segment from 03:49 to 12:23. He works through two examples (/20 and /22). Notice how after he calculates the Network ID and Broadcast ID, he determines the usable range. For the /20 example, he explicitly states the first usable is 192.168.48.1 and the last is 192.168.63.254.

The key insight here is that when the subnet boundary is in an earlier octet (like the third), the usable range spans across all possible values of the later octets.

  • The First Host IP will have .1 in the last octet.
  • The Last Host IP will have .254 in the last octet.

For a text-based breakdown of similar examples, the article from IPCisco is a useful reference.

IP Subnetting and Subnetting Examples - IPCisco

This article from IPCisco provides a text-based explanation that shows the same logic. It breaks down the binary and clearly states the resulting host address range.

Read through 'Example 1' (/24) and 'Example 2' (/30). In both cases, notice how the article first finds the Network and Broadcast addresses, and then explicitly lists the 'host addresses' or 'middle addresses' that fall between them.


4. Practice Problems

Let's apply these methods. For each problem, determine the Network Address, Broadcast Address, and the full range of valid host IPs.

Problem 1: Your IP is 198.51.100.75 /27

Problem 2: Your IP is 172.20.50.100 /22

Problem 3: Your IP is 10.10.10.101 /30


Solutions:

Problem 1: 198.51.100.75 /27

  1. Prefix/Block Size: A /27 has a block size of 32 in the last octet.
  2. Network Address: Find multiples of 32: 0, 32, 64, 96... The IP's last octet (75) falls between 64 and 96. So, the network address is 198.51.100.64.
  3. Broadcast Address: The next network starts at .96. The broadcast address is the one right before it: 198.51.100.95.
  4. Host Range:
    • First Host: 198.51.100.64 + 1 = 198.51.100.65
    • Last Host: 198.51.100.95 - 1 = 198.51.100.94
    • Range: 198.51.100.65 to 198.51.100.94

Problem 2: 172.20.50.100 /22

  1. Prefix/Block Size: A /22 is in the third octet. The block size is 4 (256 - 252).
  2. Network Address: Find multiples of 4 in the third octet: ..., 40, 44, 48, 52... The IP's third octet (50) falls between 48 and 52. The network address is 172.20.48.0.
  3. Broadcast Address: The next network starts at 172.20.52.0. The broadcast address is the one before it: 172.20.51.255.
  4. Host Range:
    • First Host: 172.20.48.0 + 1 = 172.20.48.1
    • Last Host: 172.20.51.255 - 1 = 172.20.51.254
    • Range: 172.20.48.1 to 172.20.51.254

Problem 3: 10.10.10.101 /30

  1. Prefix/Block Size: A /30 has a block size of 4.
  2. Network Address: Multiples of 4: ..., 96, 100, 104... The IP's last octet (101) falls between 100 and 104. The network address is 10.10.10.100.
  3. Broadcast Address: The next network is .104. The broadcast address is 10.10.10.103.
  4. Host Range:
    • First Host: 10.10.10.100 + 1 = 10.10.10.101
    • Last Host: 10.10.10.103 - 1 = 10.10.10.102
    • Range: 10.10.10.101 to 10.10.10.102 (Just two IPs, perfect for a point-to-point link).

5. High-Volume Practice

You asked for plenty of practice, and this is the best way to build the muscle memory you need. The following website generates unlimited subnetting problems for you to solve.

Practice and Learn Subnetting

This is an excellent tool for getting the high volume of practice you requested. It generates random subnetting problems and lets you check your work instantly.

Go to the website. A new problem will be generated each time you load the page or click 'Next Problem'. Your goal is to fill in the 'First Host IP' and 'Last Host IP' fields correctly. Use the methods we've just discussed. Spend some time here to build speed and accuracy.


Conclusion

You have now completed the fundamental toolkit for analyzing any single subnet. You can take any IP address and prefix and determine its network address, broadcast address, the number of usable hosts, and the exact range of those host addresses.

Key Takeaways:

  • The valid host IP range is defined by the first and last IPs that are not the network or broadcast address.
  • First Host IP = Network ID + 1
  • Last Host IP = Broadcast ID - 1
  • The core skill is quickly finding the network and broadcast addresses, often by determining the subnet's block size.

In our next lesson, we will focus on making this process even faster. We'll work on methods to rapidly determine the block size and starting addresses for common prefixes without a calculator. This will sharpen the pattern-recognition skills you'll need for efficient network design.