Reference

Subnet Mask Cheat Sheet

Below is the subnetting reference every CCNA student memorises: each CIDR prefix, its dotted-decimal subnet mask, the block size (the increment between networks), and how many usable hosts it gives you.

CIDR → mask → hosts (the /24 block)

These are the nine prefixes you use every day. The block size is the key number — it tells you where the next subnet starts.

CIDRSubnet maskBlock sizeUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422 (RFC 3021)
/32255.255.255.25511 (host route)

Usable hosts = 2(32 − prefix) − 2. You subtract 2 for the network address and the broadcast address. (A /31 is the exception — RFC 3021 allows both addresses on point-to-point links.)

The mask octet values

A subnet mask is just 1-bits followed by 0-bits. Only eight values can ever appear in a mask octet — memorise them and subnetting becomes mental arithmetic:

PrefixMask octetBinary
/2512810000000
/2619211000000
/2722411100000
/2824011110000
/2924811111000
/3025211111100
/3125411111110
/24 or /320 or 25500000000 / 11111111

128 · 192 · 224 · 240 · 248 · 252 · 254 · 255 — that is the whole list.

How to use the block size

To find which subnet an address belongs to: take the block size in the "interesting" octet, then count up in that block size until you pass the address. The last multiple you did not pass is the network address.

Example: for /26 the block size is 64, so subnets in the last octet are .0, .64, .128, .192. The address .200 falls in the .192 subnet.

Want to check your working instantly? Use our free subnet calculator.

Frequently asked questions

How do I calculate usable hosts?

Usable hosts = 2 raised to (32 minus the prefix length), minus 2 for the network and broadcast addresses. A /26 gives 2^6 − 2 = 62 hosts.

What is block size in subnetting?

Block size is 256 minus the mask value in the interesting octet. It is the increment between consecutive subnets — for a /27 (mask 224) the block size is 32, so subnets are .0, .32, .64, and so on.

Why do you subtract 2 for hosts?

One address in every subnet is the network ID (all host bits 0) and one is the broadcast (all host bits 1). Neither can be assigned to a device, so you subtract 2.

Is this cheat sheet enough to pass CCNA subnetting?

It covers the reference values, but you must also practise applying them fast. Work through our subnetting practice questions until you can subnet without the chart.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.