Everyday Guidebooks
Cover of CCNA Certification

Cybersecurity & IT

CCNA Certification: Subnetting Step by Step

An Unofficial IPv4 Workbook for Masks, Address Ranges, Host Counts, and VLSM

by Todd Michael

Available now

Subnetting does not have to be the topic that stalls your networking studies. This focused, unofficial workbook breaks IPv4 calculations into manageable steps, then gives you the practice to make those steps stick.

Start by connecting binary place values to decimal addresses and subnet masks. Learn to find network and broadcast addresses, calculate usable host counts, identify address ranges, and choose prefixes for practical requirements. As your confidence grows, work through variable-length subnet masking (VLSM) scenarios that require you to allocate address space without overlaps.

Original exercises progress from guided examples to mixed problems, and every solution shows the reasoning in words alongside the numbers. Whether you are preparing for ccna certification or strengthening an essential networking skill, you can use this book alongside a broader study guide to build accuracy and confidence.

This independent workbook is not affiliated with or endorsed by Cisco.

Contents
  1. 1. The IPv4 Address: Four Numbers with a Purpose
  2. 2. Binary Without the Mystery
  3. Eight Places, Two Choices
  4. Binary to Decimal: Add the Ones
  5. Decimal to Binary: Subtract from Left to Right
  6. Converting a Complete IPv4 Address
  7. A Few Useful Patterns
  8. Practice: Individual Octets
  9. Solutions: Individual Octets
  10. Practice: Complete Addresses
  11. Solutions: Complete Addresses
  12. From Conversion to Subnetting
  13. 3. Subnet Masks and Prefix Lengths
  14. 4. Finding the Network Address
  15. 5. Broadcast Addresses and Usable Ranges
  16. Start with the Network Address
  17. Why the Broadcast Ends the Block
  18. When the Boundary Is Not in the Last Octet
  19. Boundary Conditions That Deserve Attention
  20. Special Cases: /31 and /32
  21. Guided Example: Work from Either End
  22. Practice Exercises
  23. Solutions
  24. A Reliable Final Check
  25. 6. Counting Addresses and Hosts
  26. Exercise Solutions
  27. Preparing for Subdivision
  28. 7. Subnetting Within One Octet
  29. The Parent Prefix and the New Prefix
  30. From Block Size to Boundaries
  31. Worked Example: Four `/26` Subnets
  32. Worked Example: Eight Smaller Subnets
  33. A Compact Reference for This Chapter
  34. A Repeatable Procedure
  35. 8. Crossing Octet Boundaries
  36. A Reliable Boundary Check
  37. 9. Choosing a Fixed-Length Subnet Plan
  38. 10. VLSM: The Allocation Method
  39. Worked Scenario: One Parent, Four LANs
  40. Alignment Is Not Optional

Read a sample: 1. The IPv4 Address: Four Numbers with a Purpose

An IPv4 address can look like four unrelated numbers joined by periods:

192.0.2.37

Those numbers are not a room number, a device serial number, or a secret code to memorize. Together, they form an address that helps identify an interface on an IPv4 network. The address becomes much more useful when it is paired with information that tells us which part identifies the network and which part identifies a location within that network.

That division is the foundation of subnetting. Before calculating ranges or choosing masks, you need a clear picture of what the address contains and what it does not tell you by itself.

In this chapter, you will learn to recognize the structure of an IPv4 address, describe its parts, and explain why a subnet mask or prefix matters. The exercises are deliberately short. Their purpose is to establish a baseline, not to test your ability to perform calculations you have not learned yet.

An IPv4 address contains 32 bits. A bit is a binary digit: it can be either 0 or 1. For readability, the 32 bits are divided into four groups of eight bits. Each group is called an octet.

In the familiar written form, each octet appears as a decimal number, and periods separate the four numbers. This format is called dotted-decimal notation.

Consider the address again:

192.0.2.37

Read from left to right:

The periods make the groups easier to see. They are separators, not additional values in the address.

Each octet contains eight bits. Those eight bits can represent decimal values from 0 through 255, inclusive. A dotted-decimal IPv4 address therefore has four decimal octets, each within that range.

For example:

- 198.51.100.24 has four octets, all within the permitted range. - 203.0.113.255 also has four octets within the range. An octet value of 255 is not automatically invalid. - 192.0.2.300 is not a valid dotted-decimal IPv4 address because 300 is greater than 255. - 192.0.2 is incomplete because it contains only three octets.

Being structurally valid does not automatically mean an address is suitable for a particular device or subnet. That decision depends on context, including the prefix and the address’s role. For now, keep the basic distinction in mind: valid format and appropriate use are separate questions.

It is common to say that a computer or router “has an IP address.” That is useful shorthand, but the more precise idea is that an IPv4 address is assigned to a network interface. An interface is a connection point through which a device participates in a network.

A device may have more than one interface. A router, for example, can connect multiple networks, and its interfaces may have addresses associated with different networks. A computer may also have separate wired and wireless interfaces.

This distinction matters because subnetting is about organizing addresses into networks. When you examine an address, imagine asking two questions:

1. Which network does this interface belong to? 2. Which address identifies the interface within that network?

The address helps answer both questions, but you cannot reliably identify the dividing line from the dotted-decimal numbers alone.

An IPv4 address has a network portion and a host portion. The network portion identifies the subnet. The host portion provides the remaining bits used to distinguish addresses within that subnet.

Think of the division as a boundary running through the 32 bits of the address. Bits to one side belong to the network portion; bits to the other side belong to the host portion. The boundary does not have to fall at a period. It can fall inside an octet.

A prefix length states how many bits, starting at the left, belong to the network portion. It is written after a slash. For example:

192.0.2.37/24

The /24 means that the first 24 of the 32 bits are network bits. The remaining eight bits are host bits:

Calculation: 32 total bits − 24 network bits = 8 host bits

Because 24 bits fill exactly three octets, the boundary in this example falls after the third octet. The first three octets, 192.0.2, are in the network portion; the fourth octet, 37, is in the host portion.

Now look at the same address with a different prefix:

192.0.2.37/16

Here, the first 16 bits form the network portion, leaving 16 host bits:

Calculation: 32 total bits − 16 network bits = 16 host bits

Since 16 bits fill two octets, 192.0 is the network portion, while 2.37 is the host portion.

The address numbers have not changed. The prefix has changed the boundary. This is why you should resist the habit of assuming that the first three octets always identify the network or that the last octet always identifies the host. Those statements happen to fit a /24; they are not rules for every IPv4 prefix.

A subnet mask is another way to describe which bits belong to the network portion. In dotted-decimal form, a common mask is:

255.255.255.0

This mask corresponds to /24. For the moment, you can treat these as two ways to state the same boundary: 24 network bits followed by eight host bits.

Written together, an address and mask might look like this:

- Address: 192.0.2.37 - Subnet mask: 255.255.255.0

Or the same information might be written more compactly as:

192.0.2.37/24

Chapter 3 will explain how masks work in binary and how to translate between masks and prefix lengths. You do not need to…

More Cybersecurity & IT

Cover of The White Hat Bible, Volume 1The White Hat Bible, Volume 1Available nowCover of The White Hat Bible, Volume 2The White Hat Bible, Volume 2Available nowCover of The White Hat Bible, Volume 3The White Hat Bible, Volume 3Available nowCover of The White Hat Bible, Volume 4The White Hat Bible, Volume 4Available nowThe White Hat Bible, Volume 5Available nowCover of The White Hat Pocket GuideThe White Hat Pocket GuideAvailable now

About Todd Michael

Todd Michael is an American author and the founder of ToddMichael.tv. He writes practical, plain-English books on money, health, preparedness, technology, games, humor and more.

About the author Todd Michael · Todd Michael’s author site

Part of the ToddMichael.tv network.