Skip to main content

PeakHop blog

How to Subnet Fast: Block-Size Method for Network+ and CCNA

Subnet in under a minute with the block-size method. One table to memorize, five worked examples, and the /31, /32 and third-octet traps on both exams.

By PeakHop Editorial Team · Published

To subnet fast, skip binary and use the block size. Find the last mask octet that isn't 0 and subtract it from 256: that's the block size. Subnets start at multiples of the block size in that octet. The broadcast address is one less than the next subnet, and the usable hosts are everything in between. Once you've memorized the eight possible mask values and practiced the five problem types below, most subnetting questions take well under a minute.

  • Block size = 256 minus the interesting octet of the mask.
  • Subnet ID = the largest multiple of the block size that's not above the address.
  • Broadcast = the next subnet ID minus one.
  • Usable hosts = everything between the subnet ID and the broadcast.

Why speed matters on the exam

CompTIA Network+ N10-009 has a maximum of 90 questions in 90 minutes, mixing multiple-choice and performance-based questions (CompTIA). That's about a minute per question, and performance-based questions take longer than that, so subnetting has to be quicker. The CCNA 200-301 exam is 120 minutes (Cisco), and subnetting shows up inside routing, ACL and troubleshooting questions as well as on its own.

Subnetting is a listed topic on both exams: objective 1.7 in the Network+ N10-009 exam objectives and topic 1.6 in the CCNA 200-301 v1.1 exam topics.

The block-size method in four steps

The interesting octet is the last octet of the subnet mask that isn't 0. All the work happens there. Octets before it are copied from the address, and octets after it are 0 in the subnet ID and 255 in the broadcast.

  1. Find the interesting octet of the mask. For a prefix, /25 to /32 is the fourth octet, /17 to /24 the third, and /9 to /16 the second.
  2. Block size = 256 minus that octet's value.
  3. Subnet ID: in the interesting octet, take the largest multiple of the block size that's not above the address's value.
  4. Broadcast: the next multiple minus one. The usable hosts sit between the subnet ID and the broadcast.

The same steps work for prefixes of /8 and shorter, in the first octet, though the exams rarely ask for them. Prefix notation itself comes from CIDR (RFC 4632).

Professor Messer teaches the same idea as magic number subnetting for Network+. The "magic number" is the block size.

The one table to memorize

Only eight values can appear in the interesting octet. Learn them and you never need to convert to binary.

Mask octetPrefix if 4th octetPrefix if 3rd octetBlock sizeUsable hosts if 4th octet
128/25/17128126
192/26/186462
224/27/193230
240/28/201614
248/29/2186
252/30/2242
254/31/2322 on point-to-point links (RFC 3021)
255/32/2411, a single host

The block sizes are powers of two, halving each row. From /25 to /30, usable hosts are the block size minus two, because the subnet ID and broadcast can't be assigned to hosts. You can rebuild this table from memory at the start of the exam. For Cisco exams, Pearson VUE test centers give you an erasable noteboard, and online exams have a digital whiteboard (Cisco). CompTIA's online exams allow the built-in digital whiteboard (CompTIA).

Example 1: which subnet is a host in?

Question: what are the subnet ID, broadcast address and usable range for 192.168.10.77/26?

StepWorkResult
Interesting octet/26 is in the fourth octet; mask 255.255.255.192192
Block size256 - 19264
Subnet IDMultiples of 64: 0, 64, 128. The largest not above 77 is 64192.168.10.64
BroadcastNext subnet 128, minus 1192.168.10.127
Usable hostsBetween them192.168.10.65 to 192.168.10.126

This is the core question type, and most other subnetting questions build on it. Practice it until you can do it without writing anything except the multiples.

Example 2: the most efficient mask for a number of hosts

Question: a LAN needs 50 hosts. What's the smallest subnet that fits?

Read the "usable hosts" column from the bottom up and stop at the first value of 50 or more. 30 is too small, 62 fits, so the answer is /26 (255.255.255.192). Usable hosts are 2 to the power of the host bits, minus 2, and /26 leaves 6 host bits: 64 - 2 = 62.

When you design several subnets from one block (VLSM), allocate the largest subnet first. Each subnet then starts on a boundary of its own block size and the space you have left stays in one piece.

Example 3: subnets in the third octet

Question: what subnet is 10.30.77.9/20 in?

/20 falls in the third octet, so the mask is 255.255.240.0 and the interesting octet is 240.

Block size:   256 - 240 = 16, counted in the third octet
Multiples:    0, 16, 32, 48, 64, 80
Subnet ID:    10.30.64.0       (64 is the largest multiple not above 77)
Broadcast:    10.30.79.255     (next subnet 10.30.80.0, minus 1)
Usable hosts: 10.30.64.1 to 10.30.79.254

The trap is the fourth octet. Because the interesting octet is the third, the subnet ID ends in .0 and the broadcast ends in .255. A common mistake is applying the block size to the last octet out of habit.

The same method works when a question splits a block into equal parts. To divide 10.30.64.0/19 into 64 site subnets, borrow 6 bits (2 to the power of 6 is 64), giving /25. The block size is 128 in the fourth octet, so the second subnet is 10.30.64.128/25, with usable hosts from .129 to .254.

Example 4: /30, /31 and /32

These three prefixes show up on router links and in routing tables.

PrefixAddressesUsableTypical use
/3042Point-to-point link between two routers
/3122Point-to-point link, under RFC 3021
/3211Host route or loopback address

For 10.0.12.4/30, the block size is 4. The subnet ID is 10.0.12.4, the broadcast is 10.0.12.7, and the two usable addresses are 10.0.12.5 and 10.0.12.6, one for each router.

A /31 normally leaves no usable hosts, because its only two addresses would be the subnet ID and broadcast. RFC 3021 defines /31 for point-to-point links, where both addresses can be used, since a two-device link doesn't need a broadcast address (RFC 3021). A /32 matches exactly one address, which is why it's used for host routes.

Example 5: find the wrong mask

Troubleshooting questions turn the method around. Instead of asking for the subnet, they show a device that can't reach something and expect you to spot the wrong setting.

Scenario: the office network is 10.51.10.0/24 with the gateway at 10.51.10.1. A client at 10.51.10.25 can reach local devices but not a server at 10.51.20.50, while other clients can.

Check the client's mask first. If it's set to 255.255.0.0 (/16), the client thinks its subnet is 10.51.0.0 to 10.51.255.255. The server at 10.51.20.50 then looks local, so the client tries to reach it directly instead of sending the traffic to its gateway, and the connection fails. (A router with proxy ARP enabled can hide this fault; exam questions assume it doesn't.) With the correct /24 mask, 10.51.20.50 is outside the subnet and goes through 10.51.10.1.

So when one host can't reach remote networks but its neighbors can, work out the subnet from its mask and ask: does the destination look local to this host? Then separate the mask from the gateway. If the host still reaches the internet but not other 10.51.x.x networks, suspect the mask. If it reaches nothing outside its own subnet, suspect the gateway. To practice this kind of fault, see our guide to Network+ labs and performance-based questions.

Wildcard masks in ten seconds

A wildcard mask, used in Cisco ACLs and OSPF network statements, is the subnet mask inverted. Subtract each octet of the mask from 255.

PrefixSubnet maskWildcard mask
/24255.255.255.00.0.0.255
/26255.255.255.1920.0.0.63
/30255.255.255.2520.0.0.3
/20255.255.240.00.0.15.255

The interesting octet of the wildcard is always the block size minus one: 63 for a block of 64, 15 for a block of 16. That's an easy way to check your answer.

A two-week drill plan

The method makes subnetting possible without binary; repetition makes it fast. A routine that fits around other studying:

  • Days 1 to 3: write the table from memory every day until it takes under a minute.
  • Days 4 to 10: solve 20 timed problems a day, mixing the five example types. Time each problem and redo any that take over a minute. The practice mode in our subnet calculator generates and times these problems for you.
  • Days 11 to 14: practice subnetting inside other tasks: configuring interface addresses, reading routing tables, writing ACL wildcards and finding misconfigured hosts.

For the last stage, configuring real interfaces helps the most, because the device tells you when an address and mask don't fit. If you don't have equipment, see how to practice Cisco CLI commands without buying equipment.

Practice problems

Time yourself and aim for under a minute each. Pick an answer to see whether it's right and how to work it out.

  1. 1.What are the subnet ID and broadcast address for 172.16.45.200/27?

  2. 2.A VLAN needs 500 hosts. What's the most efficient mask?

  3. 3.What subnet is 10.1.150.33/21 in?

  4. 4.What wildcard mask matches 192.168.4.0/22 in an ACL?

  5. 5.A host is set to 192.168.1.130/25 with a default gateway of 192.168.1.1. Can it reach remote networks?

0 of 5 answered.

If you got one wrong, redo the matching example above, then try a similar problem with different numbers.

Frequently asked questions

Can you use a calculator on the Network+ or CCNA exam?

Plan to subnet by hand. Neither Cisco's exam information nor CompTIA's online exam guidelines lists a calculator. Cisco exams give you a noteboard at a test center or a digital whiteboard online, and CompTIA's online exams have a digital whiteboard. That's where you write the table.

How many hosts are in a /26?

62 usable hosts. A /26 has 64 addresses, minus the subnet ID and the broadcast.

What is the magic number in subnetting?

It's the block size: 256 minus the interesting octet of the mask. For 255.255.255.224 it's 32, so the subnets go up in steps of 32.

Is subnetting on Network+ or only the CCNA?

Both. It's part of objective 1.7 on Network+ N10-009 and topic 1.6 on CCNA 200-301 v1.1. The CCNA expects you to configure addresses on devices as well as calculate them. If you're deciding between the two exams, see Network+ or CCNA: which to take first.

Practice subnetting in real networks

Memorize the eight-value table, practice the five problem types until each takes under a minute, and watch for the three traps: subnets in the third octet, /31 and /32, and wrong masks in troubleshooting questions.

To practice where subnetting matters, PeakHop includes a Network+ simulation where you repair a host's subnet mask and default gateway, and CCNA labs where you address router links from a /30 and site subnets from a /19. See the Network+ study guide and the CCNA study guide for what each course covers and what's included free.

Start studying with PeakHop

Sources

Related posts

Back to PeakHop