10% OFF VCF Special Offer – Limited Seats Available! Claim my offer
Networking

Subnetting Made Simple: A Step-by-Step Method for CCNA

One reliable method for subnetting, three worked examples, and practice questions you can do on paper to get fast enough for the CCNA exam.
Subnetting Made Simple: A Step-by-Step Method for CCNA

In short: find the "interesting" octet, work out the block size (256 minus the mask value in that octet), and count in blocks. With that one method you can find the network, broadcast and host range of any IPv4 subnet in under 30 seconds.

Subnetting scares many CCNA learners, but it is really just counting. Here is a method that works every time.

Step 1: Know the mask values

In any octet, a subnet mask can only be one of these values:

Bits on 1 2 3 4 5 6 7 8
Mask value 128 192 224 240 248 252 254 255

Step 2: Find the interesting octet and the block size

The interesting octet is where the mask is not 255 or 0. The block size is 256 − mask value in that octet.

  • /26 → mask 255.255.255.192 → interesting octet is the 4th → block size 256 − 192 = 64
  • /20 → mask 255.255.240.0 → interesting octet is the 3rd → block size 256 − 240 = 16

Step 3: Count in blocks

Subnets start at multiples of the block size. The broadcast is one less than the next subnet. Hosts are everything in between.

Example 1: 192.168.10.0/26

Block size 64 in the 4th octet, so the subnets are .0, .64, .128 and .192.

Subnet First host Last host Broadcast
192.168.10.0 .1 .62 .63
192.168.10.64 .65 .126 .127
192.168.10.128 .129 .190 .191
192.168.10.192 .193 .254 .255

Each /26 has 64 addresses and 62 usable hosts (minus network and broadcast).

Example 2: which subnet is 172.16.35.100/20 in?

Block size 16 in the 3rd octet. Multiples of 16: 0, 16, 32, 48… The value 35 falls between 32 and 48, so:

  • Network: 172.16.32.0
  • Broadcast: 172.16.47.255
  • Hosts: 172.16.32.1 to 172.16.47.254

Example 3: how many hosts in a /27?

A /27 leaves 5 host bits: 2⁵ = 32 addresses, so 30 usable hosts. Quick rule: usable hosts = 2^(32 − prefix) − 2.

Practice on paper (answers below)

  1. Network and broadcast of 10.1.1.77/28?
  2. How many /30 subnets fit in a /24?
  3. Which subnet is 192.168.5.200/27 in?
  4. Usable hosts in a /22?

Answers: 1) block 16: network 10.1.1.64, broadcast 10.1.1.79. 2) 64. 3) block 32: network 192.168.5.192, broadcast .223. 4) 2¹⁰ − 2 = 1,022.

Common mistakes and how to avoid them

  • Forgetting that the network and broadcast addresses are not usable. A /29 has 8 addresses but only 6 hosts.
  • Using the wrong octet. For a /20, the interesting octet is the third one. If you count blocks in the fourth octet, every answer will be wrong.
  • Mixing up "how many subnets" and "how many hosts". Borrowed bits decide subnets (2 to the power of borrowed bits); remaining host bits decide hosts.
  • Rushing the last step. The broadcast address is one less than the next subnet, not the next subnet itself.

A quick self-check: the network address is always a multiple of the block size in the interesting octet, and the broadcast address always ends in an odd number in that octet (or 255). If your answer breaks either rule, look again.

On exam day, write the mask values table (128, 192, 224, 240, 248, 252, 254, 255) on your note sheet as soon as you start. It saves time on every subnetting question that follows.

Get fast

Do ten questions a day for two weeks. Speed matters in the exam, and it matters even more when you are troubleshooting a real network. Test yourself with the free CCNA practice test, or join the CCNA course for live classes and router and switch labs.

VLSM: give each network only what it needs

Real networks are not all the same size, so you carve a block into subnets of different sizes — Variable Length Subnet Masking (VLSM). The rule is simple: serve the largest requirement first, then keep splitting what is left.

Say you own 192.168.1.0/24 and need: 50 hosts (sales), 25 hosts (support), 10 hosts (servers), and two point-to-point links.

Requirement Hosts needed Prefix Block Range
Sales 50 /26 64 192.168.1.0 – .63
Support 25 /27 32 192.168.1.64 – .95
Servers 10 /28 16 192.168.1.96 – .111
Link 1 2 /30 4 192.168.1.112 – .115
Link 2 2 /30 4 192.168.1.116 – .119

Always round up to the next prefix that fits: 50 hosts need a /26 (62 usable), not a /27 (30 usable).

A router-to-router link only ever has two ends, so a /30 (two usable hosts) is the classic choice. Modern designs use a /31 (RFC 3021), which gives exactly two usable addresses with no waste — handy when you have hundreds of links. If an exam question gives you a /31, both addresses are usable hosts.

Wildcard masks (ACLs and OSPF)

Access lists and OSPF do not use a subnet mask — they use a wildcard mask, which is the mask inverted (255 − each octet). A /24 subnet mask 255.255.255.0 becomes wildcard 0.0.0.255. So access-list 10 permit 192.168.1.0 0.0.0.255 matches the whole /24, and network 192.168.1.0 0.0.0.255 area 0 advertises it in OSPF. A 0 in the wildcard means "must match"; a 255 means "don't care".

A two-step method for exam day

  1. Decode the mask into a block size in the interesting octet (256 − mask value). Write the subnet boundaries.
  2. Place the address between two boundaries — the lower one is the network, one below the next is the broadcast.

Memorise this reference and most questions take seconds:

Prefix Mask Usable hosts
/24 255.255.255.0 254
/25 .128 126
/26 .192 62
/27 .224 30
/28 .240 14
/29 .248 6
/30 .252 2

Subnets vs hosts: the question behind the question

Every subnetting problem is really one of two questions, and reading which one is being asked saves most of your mistakes. How many subnets depends on the bits you borrow from the host part: borrow 3 bits and you get 2³ = 8 subnets. How many hosts depends on the bits left over: 5 host bits give 2⁵ − 2 = 30 usable hosts. If a question says "you need at least 6 subnets", borrow bits until 2ⁿ ≥ 6 (that is 3 bits → 8 subnets). If it says "each subnet needs 50 hosts", leave host bits until 2ⁿ − 2 ≥ 50 (that is 6 bits → 62 hosts). The two pull in opposite directions, which is the whole art of subnetting.

Route summarization keeps tables small

Once you can subnet, summarization is the reverse skill and a favourite exam topic. Four /24 networks — 192.168.0.0, 192.168.1.0, 192.168.2.0 and 192.168.3.0 — share the same first 22 bits, so they summarize to a single 192.168.0.0/22 advertised to the rest of the network. Smaller routing tables mean faster lookups and more stable networks, which is exactly why ISPs and large campuses design their address plans around clean, summarizable blocks.

A quick word on IPv6

The good news: IPv6 subnetting is easier, not harder. Addresses are written in hexadecimal, a site is almost always given a /48, and each subnet is a /64 — so you rarely do host maths at all; you just number your /64s. The place-value thinking you build on IPv4 carries straight over. For CCNA you need to read an IPv6 address, shorten it (drop leading zeros, use :: once for the longest run of zeros) and recognise the common prefixes, rather than count hosts.

Three traps that cost marks

First, the "first usable" trap: the first usable host is one above the network address, and the last is one below the broadcast — candidates who write the network address as the first host lose easy marks. Second, the off-by-one on the broadcast: it is the address just before the next subnet boundary, so for a /26 starting at .64 the broadcast is .127, not .128. Third, the "usable = total" trap on small subnets: a /30 has four addresses but only two usable, and forgetting the −2 breaks every point-to-point link question. Slow down on these three and your accuracy climbs immediately — speed comes from the block-size method, but marks come from not tripping on the edges.

Frequently asked questions

Do I need to subnet in my head for CCNA?

You need to be quick, but you are allowed a note board in the exam. Being able to find the block size mentally makes most questions take seconds instead of minutes.

Is subnetting still used in real jobs?

Yes. Cloud networks (Azure VNets, AWS VPCs), firewalls and VLAN designs all need correct address planning. A wrong subnet causes overlap and routing problems that are hard to fix later.

What about IPv6 subnetting?

IPv6 uses the same idea with much larger numbers. Most designs use /64 subnets for networks, so the work is mostly about planning prefixes rather than counting hosts.

How long does it take to get fast?

With ten questions a day, most learners are comfortable within two weeks.

Ready to turn reading into results?

Explore instructor-led courses with labs, proctored exams and verifiable badges, or talk to a counselor about the right path.

Keep reading

Related articles

All articles