Cisco CCNA prep
Cisco CCNA
Cisco CCNAGuides
Get accessfrom $24

Cisco CCNA guides

CCNA subnetting: a fast way to subnet by hand

The short answerFind the octet where the mask changes, subtract the mask value from 256 to get the block size, and list the multiples of that block. The address you are given falls between two multiples. The lower one is the network address, the next multiple minus one is the broadcast address, and everything between is usable.

Learn the six masks in the last octet

Memorize this small table. Every value comes from the same pattern: block size equals 256 minus the mask value, and usable hosts equal the block size minus 2.

  • /25 is 255.255.255.128, block 128, 126 hosts.
  • /26 is 255.255.255.192, block 64, 62 hosts.
  • /27 is 255.255.255.224, block 32, 30 hosts.
  • /28 is 255.255.255.240, block 16, 14 hosts.
  • /29 is 255.255.255.248, block 8, 6 hosts.
  • /30 is 255.255.255.252, block 4, 2 hosts.

Find the interesting octet

The interesting octet is the first one that is neither 255 nor 0 in the mask. For a /20, the mask is 255.255.240.0, so the third octet is the one that matters, and its block size is 256 minus 240, which is 16.

Octets to the left of it copy from the address. Octets to the right are 0 in the network address and 255 in the broadcast address.

Run the four steps

Do the same steps every time so that you do not have to think about the method during the exam.

  • Convert the prefix to a mask and find the interesting octet.
  • Compute the block size, 256 minus the mask value.
  • List multiples of the block until you pass the address. The last multiple at or below it is the network.
  • The next multiple minus one is the broadcast. The first and last usable hosts sit one above the network and one below the broadcast.

Size a subnet from a host requirement

When the question gives a host count, find the smallest power of two that is at least the hosts plus 2. For 50 hosts, 2 to the 6th is 64, and 62 usable hosts cover it, so you need 6 host bits and a /26. A /27 gives only 30 hosts, which is too few.

A worked example

A host has the address 10.4.77.130 with a /27 mask. Find its subnet, the usable range, and whether 10.4.77.160 can be assigned to a host in that subnet.

  1. A /27 is 255.255.255.224, so the interesting octet is the fourth.
  2. The block size is 256 minus 224, which is 32.
  3. The multiples of 32 are 0, 32, 64, 96, 128, 160. The address ends in 130, which falls between 128 and 160.
  4. The network address is 10.4.77.128 and the broadcast address is 10.4.77.159, because the next multiple is 160.
  5. The usable range is 10.4.77.129 through 10.4.77.158, which is 30 hosts.
  6. The address 10.4.77.160 is the next network address, so it cannot be a host in this subnet.

Take it with youA /20 works the same way in the third octet. For 172.16.37.9, the block is 16, the multiples run 32 and 48, so the network is 172.16.32.0 and the broadcast is 172.16.47.255.

Three mistakes to avoid

  • Using the wrong octet, which happens when the prefix is not a multiple of eight and you start in the last octet by habit.
  • Forgetting that the network and broadcast addresses are not usable, so the host count is two lower than the block size.
  • Stopping the multiples at the first one above the address and reporting that one as the network.

Now try one

This routing question uses the same block size arithmetic to find which prefixes contain a given address.

answer it, then read why
Try itPractice

A router has these routes: 192.168.0.0/16 learned by OSPF, 192.168.16.0/20 as a static route, 192.168.20.0/22 learned by OSPF, and a static default route. Static routes use the default administrative distance. A packet arrives for 192.168.21.77. Which route does the router use to forward it?

Where this comes from

We wrote this guide from the documents the exam’s owner publishes. Check them for the latest details before you register.

  1. Cisco: CCNA 200-301 exam topics

Easy Prep Editorial writes and updates these guides. Easy Prep is independent and is not affiliated with or endorsed by Cisco.

Cisco CCNA plans

Ready for the rest of the Cisco CCNA?

Every plan includes everything, and every plan is covered by the Pass Guarantee.

nothing to loseDon’t pass? You get your money back.And you keep studying free until your next attempt. How the Pass Guarantee works

Get 3 months of access$49

$49 today. Renews every 3 months at the same price. Cancel anytime.

Secured by StripeCard, Apple Pay, Google Pay
  1. Pick the plan that covers your test date.
  2. Pay securely. Your account is created from your email.
  3. Start your first Cisco CCNA session right away.

Reading helps. Practice decides.

800 Cisco CCNA questions, each with the detail that decides it marked for you.