Achievable logo
Achievable blue logo on white background

What is subnetting? A CCNA beginner’s guide

Learn what subnetting is, how subnet masks and CIDR work, and how to find network, broadcast, and host addresses, with a worked CCNA example.
Julia Tache's profile picture
Julia Tache
29 Oct 2026, 7 min read
Achievable blue logo on white background
Digital illustration of a network engineer dividing one long block into four parts, each connected to its own group of devices, representing splitting a network into subnets
Achievable
Achievable blue logo on white background

Subnetting is one of the first skills every networking student has to learn, and often one of the most feared. If you’re preparing for the Cisco Certified Network Associate (CCNA), you’ll meet it early and use it all the way through.

Cisco itself says that for candidates without IT experience, “the most challenging topics are often subnetting (the mathematical process of dividing networks) and the command line interface (text commands) for network devices.” The good news is that subnetting isn’t hard math. It’s a short set of steps with binary numbers, and it gets fast with practice.

This guide explains what subnetting is and why networks use it, how IPv4 addresses and subnet masks work in binary, and how to find the network address, broadcast address, and usable hosts for any subnet. It finishes with a worked example and a cheat sheet of common prefixes.

IT technician labeling network cables at a switch in a small office
Achievable

What is subnetting and why do networks use it?

Subnetting is dividing one IP network into smaller networks, called subnets. Each subnet is its own group of addresses, and devices in different subnets talk to each other through a router.

Networks use subnetting for a few practical reasons:

  • Every link needs its own network: each network segment a router connects needs a unique network ID, so one office with several floors or departments needs several subnets.
  • Less wasted address space: Cisco notes that subnetting “allows for the more efficient use of available IP address space,” because you can size each subnet to what it needs.
  • Contained broadcasts: a broadcast reaches every device on its own network, but routers don’t forward it to other networks. Smaller subnets mean less broadcast traffic for each device.
  • Clearer control: grouping devices by subnet makes it easier to apply security rules and troubleshoot problems one group at a time.

On the CCNA, subnetting is part of the first domain in both versions of the exam. In version 2.0, which starts on February 3, 2027, topic 1.3 is “Troubleshoot IPv4 address configuration, assignment, and subnetting (public and private).” In the current version 1.1, topic 1.6 asks you to configure and verify IPv4 addressing and subnetting, and topic 1.7 covers private addressing.


IPv4 addresses and subnet masks in binary

An IPv4 address is 32 bits long, split into four groups of eight bits called octets. Each octet is written as a decimal number from 0 to 255, with dots between them: 192.168.10.77. Computers read it in binary:

  • 192.168.10.77: 11000000.10101000.00001010.01001101

Every address has two parts. The network portion identifies the subnet, and the host portion identifies one device on it. The subnet mask tells you where one ends and the other begins.

Subnet masks

A subnet mask is also 32 bits: a run of 1s followed by a run of 0s. Address bits under the 1s are the network portion, and bits under the 0s are the host portion. For example, 255.255.255.192 in binary is:

  • 255.255.255.192: 11111111.11111111.11111111.11000000

That mask has 26 network bits and six host bits.

CIDR prefix notation

Writing out masks gets long, so networks use Classless Inter-Domain Routing (CIDR) notation instead: a slash and the number of 1s in the mask. 255.255.255.192 is /26, and 255.255.255.0 is /24. You’ll see addresses written like 192.168.10.77/26, and you’ll need to switch between the two forms quickly.

CIDR replaced the old “classful” system, where networks came in only three sizes (Class A, B, and C). Today a prefix can be any length, which is what makes flexible subnetting possible.

Private address ranges

Some addresses are reserved for private networks such as homes and offices. They aren’t routed on the public internet, so any organization can reuse them. RFC 1918 sets aside three blocks:

Private rangePrefix
10.0.0.0-10.255.255.25510.0.0.0/8
172.16.0.0-172.31.255.255172.16.0.0/12
192.168.0.0-192.168.255.255192.168.0.0/16

Topic 1.3’s “public and private” means you should recognize these ranges on sight.


How to subnet: Network, broadcast, and usable hosts

For any address and mask, you can work out three things: the network address, the broadcast address, and the range of addresses you can give to devices.

  1. Count the host bits: Subtract the prefix from 32. A /26 has six host bits.
  2. Find the block size: Each subnet holds 2 to the power of the host bits in addresses. Six host bits give 64. A shortcut for prefixes from /24 to /30 is 256 minus the last octet of the mask: 256 − 192 = 64.
  3. Find the network address: Set all the host bits to 0. In decimal, that’s the multiple of the block size at or just below the address.
  4. Find the broadcast address: Set all the host bits to 1. That’s the network address plus the block size, minus 1.
  5. Find the usable hosts: Everything between the network and broadcast addresses. A host portion of all 0s or all 1s can’t be assigned to a device, so usable hosts are the block size minus 2.

Take 192.168.10.77/26. The block size is 64, so the subnets in the last octet start at 0, 64, 128, and 192. 77 falls between 64 and 127, so:

  • Network address: 192.168.10.64
  • Broadcast address: 192.168.10.127
  • Usable hosts: 192.168.10.65-192.168.10.126 (62 addresses)

In binary, the last octet of 77 is 01001101. Keep the first two bits (the network bits) and set the last six to 0 to get 01000000, or 64. Set them to 1 to get 01111111, or 127.

Worked example: Split 192.168.10.0/24 into four subnets

Say a small office has the network 192.168.10.0/24 and wants four equal subnets, one for each department.

  1. Borrow bits for the subnets: Four subnets need two bits, because two bits give four combinations (00, 01, 10, 11). The prefix grows from /24 to /26.
  2. Work out the new mask: /26 is 255.255.255.192.
  3. Find the block size: 32 − 26 leaves six host bits, so each subnet has 64 addresses and 62 usable hosts.
  4. List the subnets: Count up from 0 in steps of 64.

Here are the four subnets you end up with:

SubnetUsable hostsBroadcast
192.168.10.0/26.1-.62192.168.10.63
192.168.10.64/26.65-.126192.168.10.127
192.168.10.128/26.129-.190192.168.10.191
192.168.10.192/26.193-.254192.168.10.255

Each department gets 62 addresses for computers, printers, and the router’s own interface. Older material sometimes says not to use the first and last subnets (“subnet zero” and the “all-ones subnet”), but Cisco routers have allowed both by default since IOS 12.0, so you can use all four.

Student working through subnetting problems in a notebook in a library
Achievable

Subnetting cheat sheet: Common prefixes from /24 to /30

These are the prefixes you’ll use most for subnets inside a /24. It’s worth knowing them well enough to rebuild the table from memory.

PrefixSubnet maskBlock size
/24255.255.255.0256
/25255.255.255.128128
/26255.255.255.19264
/27255.255.255.22432
/28255.255.255.24016
/29255.255.255.2488
/30255.255.255.2524

And here’s how many hosts and subnets each prefix gives you:

PrefixUsable hostsSubnets in a /24
/242541
/251262
/26624
/27308
/281416
/29632
/30264

A /30 is the classic choice for a link between two routers, since it has exactly two usable addresses. Cisco routers also support /31 on point-to-point links, which drops the network and broadcast addresses and uses both addresses for the two ends.


VLSM: Subnets of different sizes

In the worked example, every subnet is the same size. Real networks rarely need that. Variable-length subnet masks (VLSM) let you use a different mask for each subnet, so you don’t waste addresses on small groups.

Say the same 192.168.10.0/24 has to cover a department of 100 devices, one of 50, one of 20, and a link between two routers. Start with the largest and work down:

  • 100 devices: 192.168.10.0/25 (126 usable hosts)
  • 50 devices: 192.168.10.128/26 (62 usable hosts)
  • 20 devices: 192.168.10.192/27 (30 usable hosts)
  • Router link: 192.168.10.224/30 (two usable hosts)

Assigning the largest subnet first keeps each block lined up on its own boundary and leaves 192.168.10.228-192.168.10.255 free for later. IPv6 uses the same prefix idea with 128-bit addresses, and CCNA topic 1.4 covers its prefix sizing.


Final thoughts

Subnetting comes down to a few repeatable steps: count the host bits, find the block size, and mark the network and broadcast addresses on either side. Once those steps are automatic, troubleshooting questions about how to address them get much easier.

When preparing for an IT certification, practice a few problems every day and build them into a lab to see how a wrong mask breaks connectivity. Our CCNA labs guide shows how to set one up, and the CCNA study guide shows where subnetting fits in a full study plan. To choose a course with plenty of subnetting practice, compare the best CCNA prep courses.

Julia Tache's profile picture
Julia Tache
29 Oct 2026, 7 min read